summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_emulation.h
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-13 19:11:39 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-13 19:11:39 -0400
commit8e64754d9980d2423f1907ae184ec46e63e5ff7e (patch)
treeb81c8e89fa699a5f0010640e30c5acfbab818474 /kernel/gsp_emulation.h
parent4b745a1c2c0534a1850b6efe6710536b2225c3f4 (diff)
downloadopen-iov-8e64754d9980d2423f1907ae184ec46e63e5ff7e.tar.gz
open-iov-8e64754d9980d2423f1907ae184ec46e63e5ff7e.zip
Phase 2: PCI Config Space & BAR Enhancements
- Enhanced PCI config space write handlers in main.c: - Added MSI-X Message Control (0x72-0x73) write support - Added MSI-X Table Offset/BIR (0x74-0x77) write support - Added MSI-X PBA Offset/BIR (0x78-0x7B) write support - Enhanced BAR emulation in bar_emulation.c: - Added MSI-X Table emulation (32 entries at BAR0+0x2000) - Added MSI-X PBA emulation (64-bit at BAR0+0x3000) - Added nv_vgpu_msix_set_pending/clear_pending for interrupt injection - Integrated with GSP emulation constants from gsp_emulation.h - Updated bar_emulation.h with MSI-X struct definitions and function declarations - Added GSP emulation constants to gsp_emulation.h (MSIX offsets, polling params)
Diffstat (limited to 'kernel/gsp_emulation.h')
-rw-r--r--kernel/gsp_emulation.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/gsp_emulation.h b/kernel/gsp_emulation.h
index c4ceb7a..f703ae6 100644
--- a/kernel/gsp_emulation.h
+++ b/kernel/gsp_emulation.h
@@ -22,6 +22,19 @@
#include "memory.h"
/* ============================================================
+ * GSP Emulation Constants
+ * ============================================================ */
+
+#define GSP_EMU_DOORBELL_OFFSET 0x110C00
+#define GSP_EMU_SHARED_MEM_OFFSET 0x1000
+#define GSP_EMU_SHARED_MEM_SIZE 4096
+#define GSP_EMU_MSIX_TABLE_OFFSET 0x2000
+#define GSP_EMU_MSIX_PBA_OFFSET 0x3000
+#define GSP_EMU_POLL_BUSY_US 100
+#define GSP_EMU_POLL_SLEEP_MIN_US 50
+#define GSP_EMU_POLL_SLEEP_MAX_US 100
+
+/* ============================================================
* GSP Emulation Context
* ============================================================ */