aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / native / kernel / core / allen.h
| 1 | /* allen.h -- the ALLEN exam stage of the pi5-allen image (PI5-8 cut K, build flag CK_ALLEN; core/allen.c). |
| 2 | * |
| 3 | * QUALIFICATION ONLY, train/dev rehearsal. The run tool places \EFI\AIENOS\ALLEN.EXM on the card's EFI partition: one |
| 4 | * header line "AIENALX1 QUALIF-ALLEN-EXAM" and one "<id>|<turns>" line per case (format and bounds: |
| 5 | * crates/allen-reflex-kernel/src/card.rs; built by scripts/allen_exam_card.sh, which carries no expected answers). |
| 6 | * The UEFI stub (native/boot/efi_allen.c) reads it before ExitBootServices into ck_allen_boot; the kernel stage hands |
| 7 | * it to the Rust unit, which checks it whole. The run tool deletes the file after the run. Nothing is written by the |
| 8 | * stage: the image has no Store stage and the ALLEN gate (core/allen_gate.h) only judges. */ |
| 9 | #ifndef AIENOS_CK_ALLEN_H |
| 10 | #define AIENOS_CK_ALLEN_H |
| 11 | #include <stdint.h> |
| 12 | |
| 13 | #define CK_ALLEN_EXM_PATH "\\EFI\\AIENOS\\ALLEN.EXM" |
| 14 | #define CK_ALLEN_FILE_MAX 131072u /* = card::FILE_MAX */ |
| 15 | |
| 16 | enum { CK_ALLEN_EXM_NONE = 0, CK_ALLEN_EXM_ABSENT = 1, CK_ALLEN_EXM_REFUSED = 2, CK_ALLEN_EXM_FOUND = 3 }; |
| 17 | |
| 18 | /* What the UEFI stub found (the stub and the kernel are one image). */ |
| 19 | struct ck_allen_boot { |
| 20 | int state; /* CK_ALLEN_EXM_* */ |
| 21 | uint32_t len; /* bytes in buf while FOUND */ |
| 22 | uint8_t buf[CK_ALLEN_FILE_MAX + 1u]; |
| 23 | }; |
| 24 | extern struct ck_allen_boot ck_allen_boot; |
| 25 | |
| 26 | void ck_allen_run(void); |
| 27 | #endif |