Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/tests/a64efi/boot_el1_smp.sh # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / tests / a64efi / boot_el1_smp.sh` 56 lines ยท 2648 bytes Raw Blame History 1 #!/bin/sh 2 # tests/a64efi/boot_el1_smp.sh [SPARK_EFI] [NEGATIVE_EFI]: 3 # Boots pure-Omega bare-metal Aienux SPARK.EFI on 20-core QEMU virt (GICv3, EL2 virtualization=on, EDK2) 4 # and verifies EL2->EL1h, MAIR_EL1=0x440004ff, pre-carved 512 MiB Normal-NC pool, GICv3 rev=3, 5 # 20/20 SMP cores online via PSCI CPU_ON, and clean PSCI SYSTEM_RESET. 6 # Optionally boots a negative-control image that triggers trap 8 post-EBS and verifies 7 # panichk logs to UART and resets cleanly without calling dead UEFI Boot Services. 8 # Strictly emulated (QEMU virt); NOT_RUN on physical DGX Spark silicon. 9 set -eu 10 11 efi=${1:?usage: boot_el1_smp.sh SPARK.EFI [NEG_TRAP.EFI]} 12 neg=${2:-} 13 code=${A64EFI_CODE:-} 14 for f in /opt/homebrew/share/qemu/edk2-aarch64-code.fd \ 15 /usr/share/qemu-efi-aarch64/QEMU_EFI.fd \ 16 /usr/share/edk2/aarch64/QEMU_EFI.fd \ 17 /usr/share/AAVMF/QEMU_EFI.fd; do 18 [ -z "$code" ] && [ -f "$f" ] && code=$f 19 done 20 [ -n "$code" ] && [ -f "$code" ] || { echo "FAIL: EDK2 firmware not found (set A64EFI_CODE)" >&2; exit 1; } 21 command -v qemu-system-aarch64 >/dev/null 2>&1 || { echo "FAIL: qemu-system-aarch64 not found" >&2; exit 1; } 22 23 work=$(mktemp -d "${TMPDIR:-/tmp}/slice_a_qemu.XXXXXX") 24 trap 'rm -rf "$work"' EXIT 25 26 run_qemu() { 27 img=$1 mem=$2 log=$3 28 rm -rf "$work/esp" && mkdir -p "$work/esp/EFI/BOOT" 29 cp "$img" "$work/esp/EFI/BOOT/BOOTAA64.EFI" 30 timeout 40 qemu-system-aarch64 \ 31 -M virt,gic-version=3,its=on,virtualization=on -cpu max -smp 20 -m "$mem" \ 32 -display none -bios "$code" \ 33 -drive if=none,id=d0,format=raw,file=fat:rw:"$work/esp" \ 34 -device virtio-blk-device,drive=d0 \ 35 -net none -serial file:"$log" -monitor none -no-reboot /dev/null 2>&1 36 } 37 38 echo "=== QEMU 20-core 4 GiB boot (512 MiB Normal-NC pool + GICv3 ITS) ===" 39 run_qemu "$efi" 4096 "$work/boot.log" 40 tr -d '\r' < "$work/boot.log" | grep -E 'AIENUX_A64EFI|EL1_ALIVE|free_mib=|GICV3_|ITS_|SYSRD_WR_|SMP_ONLINE|SLICE_A_QEMU' 41 grep -q 'EL1_ALIVE current_el=1 mair=0x00000000440004ff' "$work/boot.log" 42 grep -q 'nc_pool_mib=512' "$work/boot.log" 43 grep -q 'GICV3_OK rev=3' "$work/boot.log" 44 grep -q 'ITS_OK cmds=12' "$work/boot.log" 45 grep -q 'SYSRD_WR_OK=1 BBM_4K_2M_OK=1' "$work/boot.log" 46 grep -q 'SMP_ONLINE online=20 expected=20 failed=0' "$work/boot.log" 47 grep -q 'SLICE_A_QEMU_BOOT_PASS' "$work/boot.log" 48 echo "PASS qemu_20core_el1_mmu_gicv3_its_smp" 49 50 if [ -n "$neg" ]; then 51 echo "=== QEMU post-EBS trap negative control ===" 52 run_qemu "$neg" 2048 "$work/neg.log" 53 tr -d '\r' < "$work/neg.log" | grep -E 'PANIC post-EBS' 54 grep -q 'PANIC post-EBS code=0x800000000000006c' "$work/neg.log" 55 echo "PASS qemu_post_ebs_trap_guard" 56 fi