interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / aienux / spark / plat_qemu.om

38 lines · 1356 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note aienux/spark/plat_qemu.om: QEMU virt test profile for spark_main.om (SPARK-QEMU.EFI, gate only; never staged).
3note QEMU has no GB20B. The edu device (1234:11e8) stands in for the GPU ONLY as a PCIe endpoint with its own
4note SMMUv3 stream + BME; GB20B register access (PMC_BOOT_0 check, IRQ bind) and Stages 4..6 are stubbed.
5note A SPARK-QEMU.EFI booted on real Spark finds no 1234:11e8 device and fails closed at stage 2 (code 201).
6const SPK_PLAT_QEMU ulong 1
7const SPK_PLAT_NEED_RTL ulong 0
8const SPK_PLAT_GPU_BAR_SZ ulong 1048576
9const SPK_PLAT_GPU_BAR_FALLBACK ulong 0
10
11text spk_q_s2 "[SPARK QEMU] stage 2 GPU stand-in edu 1234:11e8: GB20B PMC_BOOT_0 check + IRQ bind STUB\n"
12text spk_q_s2b "[SPARK QEMU] stage 2 SMMUv3 streams live: gpu-standin sid=0x"
13text spk_q_s2c " nvme sid=0x"
14text spk_q_nl "\n"
15
16fn spk_plat_is_gpu vid ulong did ulong to bool
17ret and eq vid 0x1234 eq did 0x11e8
18end
19
20fn spk_plat_verify_gpu hb long to bool
21uart_puts spk_q_s2
22ret gt hb 0
23end
24
25fn spk_plat_note_stage2 to void
26uart_puts spk_q_s2b
27uart_puthex get smmu_str_sid 0
28uart_puts spk_q_s2c
29uart_puthex get smmu_str_sid 1
30uart_puts spk_q_nl
31end
32
33note QEMU virt iommu=smmuv3: one SMMUv3 at VIRT_SMMU = 0x09050000 (hw/arm/virt.c memmap).
34const SPK_PLAT_NSMMU ulong 1
35
36fn spk_plat_smmu_base i ulong to ulong
37ret 0x09050000
38end