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_gb10.om

32 lines · 923 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note aienux/spark/plat_gb10.om: DGX Spark GB10 platform profile for spark_main.om (production SPARK.EFI).
3note Real GB20B (vendor 0x10de) with 64 MiB BAR0, mandatory RTL8127, SMMUv3 A/B/C at the GB10 bases.
4const SPK_PLAT_QEMU ulong 0
5const SPK_PLAT_NEED_RTL ulong 1
6note == SPARK_GB20B_BAR0_SZ / SPARK_GB20B_BAR0_PA (bar0_mmio.om); omc consts must be literals.
7const SPK_PLAT_GPU_BAR_SZ ulong 67108864
8const SPK_PLAT_GPU_BAR_FALLBACK ulong 603979776
9
10fn spk_plat_is_gpu vid ulong did ulong to bool
11ret eq vid 0x10de
12end
13
14fn spk_plat_verify_gpu hb long to bool
15ret bmmio_verify_gb20b hb
16end
17
18fn spk_plat_note_stage2 to void
19end
20
21note SMMUv3 nodes expected in IORT, in order: A (PCIe/NVMe/RTL), B (GB20B), C (abort-only).
22const SPK_PLAT_NSMMU ulong 3
23
24fn spk_plat_smmu_base i ulong to ulong
25if eq i 0
26ret SPARK_SMMU_A_PA
27end
28if eq i 1
29ret SPARK_SMMU_B_PA
30end
31ret SPARK_SMMU_C_PA
32end