summaryrefslogtreecommitdiffstats
path: root/kernel/architecture/architecture.h
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-13 19:28:03 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-13 19:28:03 -0400
commitbfd269ee74d166be4f386640f8b5daad31d5d6ed (patch)
tree82da0efeeea759d44605ff69b0f20c8f248623e2 /kernel/architecture/architecture.h
parent7adef330df18691acabda9f5c988742f23a2917d (diff)
downloadopen-iov-bfd269ee74d166be4f386640f8b5daad31d5d6ed.tar.gz
open-iov-bfd269ee74d166be4f386640f8b5daad31d5d6ed.zip
Phase 4: Portable Architecture Implementation
- Firmware Analyzer: Runtime firmware signature computation (CRC32, SHA256) and pattern-based RPC handler address discovery - Dynamic RPC Dispatcher: Version-aware dispatch with native firmware handlers (550/560/570/580) and emulation fallback - Hardware Architecture Layer: Turing, Ampere, Blackwell configs with BAR layouts, doorbell offsets, MSI-X vectors - Driver Version Adaptation Layer: Feature detection per driver version - Declarative YAML configs for hardware (turing/ampere/blackwell) and versions (550/560/570/580) - Kernel unit tests for GSP emulation (gsp_emulation_test.c) - Test infrastructure scripts (test_gsp_emu.sh, test_guest_driver.sh, test_cuda_workloads.sh, test_graphics_workloads.sh, test_windows_guest.sh, test_vgpu_stack.sh) - Updated kernel Makefile with new source files
Diffstat (limited to 'kernel/architecture/architecture.h')
-rw-r--r--kernel/architecture/architecture.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/kernel/architecture/architecture.h b/kernel/architecture/architecture.h
new file mode 100644
index 0000000..3745bf8
--- /dev/null
+++ b/kernel/architecture/architecture.h
@@ -0,0 +1,49 @@
+#ifndef _ARCHITECTURE_H_
+#define _ARCHITECTURE_H_
+
+#include <linux/types.h>
+
+/* BAR configuration */
+struct hw_bar_config {
+ u64 bar0;
+ u64 bar1;
+ u64 bar2;
+ u64 bar3;
+};
+
+/* Hardware architecture definition */
+struct hw_architecture {
+ const char *name;
+ u32 pci_vendor_id;
+ u32 *pci_device_ids;
+ int num_device_ids;
+ struct hw_bar_config bar_sizes;
+ u64 doorbell_offset;
+ u64 shared_mem_offset;
+ u32 shared_mem_size;
+ u64 msix_table_offset;
+ u64 msix_pba_offset;
+ u32 msix_vectors;
+ u32 max_vfs;
+ u64 vram_size;
+ u32 page_size;
+ bool supports_mig;
+ bool supports_sriov;
+ const char *gsp_version;
+};
+
+/* Architecture registry */
+struct hw_architecture *arch_get_by_name(const char *name);
+struct hw_architecture *arch_get_by_pci_id(u32 vendor_id, u32 device_id);
+struct hw_architecture *arch_get_default(void);
+
+/* Architecture queries */
+const struct hw_bar_config *arch_get_bar_config(struct hw_architecture *arch);
+u64 arch_get_doorbell_offset(struct hw_architecture *arch);
+u64 arch_get_shared_mem_offset(struct hw_architecture *arch);
+u32 arch_get_msix_vectors(struct hw_architecture *arch);
+bool arch_supports_mig(struct hw_architecture *arch);
+bool arch_supports_sriov(struct hw_architecture *arch);
+const char *arch_get_gsp_version(struct hw_architecture *arch);
+
+#endif /* _ARCHITECTURE_H_ */ \ No newline at end of file