interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

GitHub aien-dev/aienux#364 (code only)

closed derived 01eafdea2c3f1b4a #364

Imported from GitHub aien-dev/aienux#364 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base 6f35eabd0cd3c0d4cf305d79c0b4ca4ef3bb3dba · Head 6c4db52e5cf953ddb178c7a3ce751656c903dafa

Apply it

git checkout -b patch-01eafdea2c3f1b4a 6f35eabd0cd3c0d4cf305d79c0b4ca4ef3bb3dba
curl -fsSL https://interplane.io/drakestapleton/aienux/patches/01eafdea2c3f1b4a.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/aienux
364
6c4db52e5cf953ddb178c7a3ce751656c903dafa
{"kind":"github-import","owner":"aien-dev","repo":"aienux","number":364,"url":"https://github.com/aien-dev/aienux/pull/364","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:36:16Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/.crumb b/.crumb
index 3ba09c0c..14231f96 100644
--- a/.crumb
+++ b/.crumb
@@ -27,33 +27,33 @@
           "purpose": "Directory crates. Purpose not yet described by a human."
         },
         {
-          "digest": "a2eb5c6669ae3a678242786963d929f044f425929e7de3d2e9ea39adfdbe8009",
-          "last_commit": "013dfa6",
+          "digest": "f2338e5e6ba11edda667a37455cf878a840dac45cdad067b9a0c98642c1cc466",
+          "last_commit": "298065e",
           "name": "docs",
           "purpose": "Directory docs. Purpose not yet described by a human."
         },
         {
-          "digest": "f497c9f7a4854444dec6fb7a02af1acbcbc2b54f9b02421817271263a7b3cae0",
-          "last_commit": "013dfa6",
+          "digest": "443333b76192539859c8e501f18091153980e715c490920441f2c7e177f5fae1",
+          "last_commit": "867c4ac",
           "name": "native",
           "purpose": "Directory native. Purpose not yet described by a human."
         },
         {
           "digest": "f94d1bca3f533e19fd6fee07f9e931ba85bacec7633de4f456534426c4a31bb4",
-          "last_commit": "013dfa6",
+          "last_commit": "6f35eab",
           "name": "scripts",
           "purpose": "Directory scripts. Purpose not yet described by a human."
         }
       ],
-      "children_root": "sha256:cb7062ed32d6f81f47c79a99fa3dd039bb664442e6f95dacfb07ae6828650f8f",
-      "compiled_at": "2026-10-13T17:02:53Z",
+      "children_root": "sha256:a49920bafccc4502104e957e660e31f51610b8470b098532300056c17e6ba8f2",
+      "compiled_at": "2026-10-13T17:23:51Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:4ceff2643dfeb46c21079cf3bf9783c4a60a27d73a9aba82a464c5e83c7b97ed",
+      "digest": "sha256:46de129e17740fade6e58e61f5edebd9db0431aa8f7e699d330cc477863efe88",
       "evidence_files": 156,
       "evidence_root": "sha256:cd53ab119be9de6ce28c4f5949b106c9622f1fe105611de3de21c3bce7932694",
-      "files": 3175,
-      "generated_at_commit": "013dfa602cad3a9f4435359ccf01f9b61eecfaf5",
-      "source_tree": "sha256:fa1d57b2d15bae766884ca889f47fedd3043373567df95ff305dd783b44ddc91"
+      "files": 3176,
+      "generated_at_commit": "298065e8f6711a85823fe4ff051738e7c30cbbd1",
+      "source_tree": "sha256:a955e5c5a6c8b3d973fe88218bfee680e7542f0a4c3e9534de5517b87f6a3ce6"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/docs/.crumb b/docs/.crumb
index 046ad41b..1d646525 100644
--- a/docs/.crumb
+++ b/docs/.crumb
@@ -30,14 +30,14 @@
         }
       ],
       "children_root": "sha256:c5d7ca9ce0145309c90a439711adcb6dd8e8e40ff48b90455f545e63c05f04c8",
-      "compiled_at": "2026-10-13T17:02:53Z",
+      "compiled_at": "2026-10-13T17:23:51Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:a2eb5c6669ae3a678242786963d929f044f425929e7de3d2e9ea39adfdbe8009",
+      "digest": "sha256:f2338e5e6ba11edda667a37455cf878a840dac45cdad067b9a0c98642c1cc466",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "files": 77,
-      "generated_at_commit": "013dfa602cad3a9f4435359ccf01f9b61eecfaf5",
-      "source_tree": "sha256:249d191c99c98e5cfdbe01810eb16fdaa3539578e43f9fa777d9ed6ab0919c47"
+      "files": 78,
+      "generated_at_commit": "298065e8f6711a85823fe4ff051738e7c30cbbd1",
+      "source_tree": "sha256:4d9b61c78b740ce46de654971b0a0b03b1fdf5d3a31a3426c7f89124bf50908d"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/docs/native/PI5-6-INFER-RUNS.md b/docs/native/PI5-6-INFER-RUNS.md
new file mode 100644
index 00000000..5b4e7f2c
--- /dev/null
+++ b/docs/native/PI5-6-INFER-RUNS.md
@@ -0,0 +1,85 @@
+# PI5-6 cut 3: first real inference on the Raspberry Pi 5
+
+Image: `make pi5-infer` (core/infer.c, model from MODEL.MAP read by the UEFI stub through firmware Block I/O).
+Model: Llama-3.2-1B-Instruct-Q4_K_M.gguf, 807694368 bytes, sha256 `3f5a22426976ab26cfe84dba63c1d08391717abb1af893e10f1b2968d862dcc1`
+(the host sha256, and the one in crates/aienos-infer/tests/fixtures/PROVENANCE.md). Internal yardstick only (Llama licence); the file is not in the repo.
+Runs: `~/workspace/pi5-runs/pi5-infer-a` (before #361, scalar) and `pi5-infer-b` (after #361 merged, SDOT). Harness: `~/workspace/pi5/pi5-run.sh`, KLOG=1, tryboot, per-run nonce.
+
+## Route chosen: a raw model partition, MODEL.MAP on the ESP
+
+The ESP (512 MiB) is smaller than the model, but MODEL.MAP (native/boot/model_map.h:1-20) names the model as extents of absolute LBAs on the whole
+disk, found by the GPT disk GUID; the stub (native/boot/efi_model.c, read_map / find_disk) only needs the 4 KiB map on the ESP volume the image was loaded from.
+So the ESP is not enlarged and p1/p2 are not touched. A third GPT partition `AIENOS-MODEL` (784 MiB, type Linux filesystem, no file system) was appended
+in the free space after p2, the GGUF was written to it raw, and the map has one extent (LBA 9439232, 1577529 sectors).
+Written with `sfdisk --append`; read back through p3 and checked to equal the host sha256 before any reboot.
+The AIENOS Store finder matches its own type GUID, so p3 is invisible to it (kernel.log: `pi5_part: ... entries_used=` line).
+
+### Card layout, before (`sudo sfdisk -d /dev/mmcblk0`)
+```
+label-id: 2DB4CE29-B3E1-4564-B340-924422EBCAE3
+/dev/mmcblk0p1 : start=        2048, size=     1048576, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=87E06D0B-EB85-4266-B3DD-3958E0671C3E, name="AIENOSPI5-ESP"
+/dev/mmcblk0p2 : start=     1050624, size=     8388608, type=38DAAC89-5EAD-4B40-8B1E-3687A7418061, uuid=AEC31319-DDBA-4108-AE6C-972E76E3B770, name="AIENOS"
+```
+### After
+```
+/dev/mmcblk0p1    2048 1050623 1048576  512M EFI System
+/dev/mmcblk0p2 1050624 9439231 8388608    4G unknown
+/dev/mmcblk0p3: Created a new partition 3 of type 'Linux filesystem' and of size 784 MiB.
+/dev/mmcblk0p4: Done.
+/dev/mmcblk0p1    2048  1050623 1048576  512M EFI System
+/dev/mmcblk0p2 1050624  9439231 8388608    4G unknown
+/dev/mmcblk0p3 9439232 11044863 1605632  784M Linux filesystem
+label-id: 2DB4CE29-B3E1-4564-B340-924422EBCAE3
+/dev/mmcblk0p1 : start=        2048, size=     1048576, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=87E06D0B-EB85-4266-B3DD-3958E0671C3E, name="AIENOSPI5-ESP"
+/dev/mmcblk0p2 : start=     1050624, size=     8388608, type=38DAAC89-5EAD-4B40-8B1E-3687A7418061, uuid=AEC31319-DDBA-4108-AE6C-972E76E3B770, name="AIENOS"
+/dev/mmcblk0p3 : start=     9439232, size=     1605632, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=585D37FF-6C68-4130-8D88-BDED7AE8721A, name="AIENOS-MODEL"
+```
+p1 and p2 are byte-for-byte the same entries (same uuids); the disk GUID is unchanged (`2DB4CE29-...`, raw `29ceb42d...` in the map). The hub USB stick was not touched.
+
+## Kernel changes needed for a long run (native/kernel/core/infer.c)
+The Pi PM watchdog is 15 s and is petted only at boot stages (core/pi5.c); hashing 770 MiB and generating tokens are longer. Changes:
+the SHA-256 runs in 16 MiB pieces with a pet between them; the session loop pets after every step; the one-shot probe (one call, interrupts masked,
+cannot pet) is skipped on `CK_PI5_INFER` and the step-by-step session (same prompt, same expected llama.cpp tokens) is the judged run. No other image changes.
+RAM log note: the log is written only on the orderly reset path (core/pi5.c:9), so a watchdog expiry would have lost it; both runs ended orderly.
+
+## Harness
+`pi5-run.sh` got an optional `MODEL_MAP=<4096-byte map>` hook (copies the map to `\EFI\AIENOS\MODEL.MAP`, checks sha256 on the card, refuses a non-AIENMDL1 file). Backup of the original: `~/workspace/pi5/pi5-run.sh.pre-modelmap`. The script lives outside this repo.
+
+## Evidence, run B (SDOT path, after #361), `kernel.log` lines
+```
+model_map: ok len=807694368 extents=1 sector=512 disk=29ceb42de1b36445b340924422ebcae3
+model: reading 807694368 bytes in 1 extents, block_size=512 last_block=250347519 -> 0xc081000
+model: base=0xc081000 len=807694368 extents=1 read_us=8399660 declared_sha256=3f5a22426976ab26cfe84dba63c1d08391717abb1af893e10f1b2968d862dcc1
+cpu_features: dotprod=1 i8mm=0 bf16=0 fhm=0 fp16=1 sve=0 rndr=0
+infer_source_mode: boot-disk model (MODEL.MAP read by the UEFI stub through the firmware's Block I/O before ExitBootServices); the path that exists on hardware
+infer: disk base=0xc081000 size=807694368 extents=1 read_us=8399660 block_size=512
+infer: sha256=3f5a22426976ab26cfe84dba63c1d08391717abb1af893e10f1b2968d862dcc1 sha_us=5082431
+infer: one-shot probe skipped on the Pi image (watchdog); the session below runs the golden prompt step by step
+infer: dot_path=sdot cpu_dotprod=1
+infer: session open rc=0 tensors=147 vocab=128256 layers=16 kv_capacity=64 max_new=16 max_prompt_bytes=256 heap_reserve_kib=64 heap_used_kib=22900 open_us=274985
+infer: session refusals open_twice=-12 prompt_bytes=-16 step_idle=0
+infer: session prompt=1 ids=13 cancel_after_steps=3 steps=3 prefill=3 produced=0 idle_step=done heap_used_kib=22900 rc=1
+infer: session prompt=2 ids=17 steps=25 prefill=17 produced=8 last=yes prefill_us=11141714 mean_tok_us=833129 tokens=791 6864 315 9822 374 12366 13 128009 text=The capital of France is Paris. heap_used_kib=22901 request_us=16974445 rc=3
+infer: session prompt=3 ids=13 cancel_after_steps=1 steps=1 prefill=1 produced=0 idle_step=done heap_used_kib=22902 rc=1
+infer: session close rc=0 heap_used_kib=22902 heap_peak_kib=24695 frames_free_before=1603320 frames_free_after=1603320 rc=0
+infer: unloaded heap_live_kib=0 frames_free_before=1603320 frames_free_after=1603320 frames_returned=65536 rc=0,0
+```
+
+- Loaded: 807694368 bytes, one extent, read by the firmware in 8.40 s (about 96 MB/s).
+- sha256 computed by the kernel over the received bytes equals the declared and the host sha256 (5.08 s).
+- First generated token 791 (" The") and all 8 (791 6864 315 9822 374 12366 13 128009) equal the llama.cpp golden (`expect_gen`, crates/aienos-infer/tests/fixtures/ref_fr.txt); text "The capital of France is Paris."
+- Speed, 7 timed decode tokens: mean 833129 us per token = 1.20 tok/s. Prefill of 17 prompt tokens 11.1 s. Whole request 16.97 s.
+- First proof of dotprod on the A76: `cpu_features: dotprod=1`, `infer: dot_path=sdot cpu_dotprod=1`.
+
+## Run A (before #361, scalar f32 path), same card, same map
+```
+cpu_features: dotprod=1 i8mm=0 bf16=0 fhm=0 fp16=1 sve=0 rndr=0
+infer: sha256=3f5a22426976ab26cfe84dba63c1d08391717abb1af893e10f1b2968d862dcc1 sha_us=5076260
+infer: session prompt=2 ids=17 steps=25 prefill=17 produced=8 last=yes prefill_us=62198378 mean_tok_us=4564997 tokens=791 6864 315 9822 374 12366 13 128009 text=The capital of France is Paris. heap_used_kib=22892 request_us=94154192 rc=3
+```
+Scalar: 4564997 us per token = 0.22 tok/s, so SDOT is 5.5 times faster on the same model and the same 8 tokens.
+
+## Not verified / limits
+- The remaining kernel.log lines (boot, SD, entropy) are in the run directories, not reproduced here.
+- Time-to-first-token includes prefill of the chat template (17 ids); no larger prompt was run (KV capacity 64 in this probe).
+- Both runs are single runs; no variance measured.
diff --git a/native/.crumb b/native/.crumb
index 90d91958..0c639062 100644
--- a/native/.crumb
+++ b/native/.crumb
@@ -56,7 +56,7 @@
         },
         {
           "digest": "929ed085c32fffd1530eb09cec90c2554c7bf0bb02ad70db53cf8cd94761e5f4",
-          "last_commit": "013dfa6",
+          "last_commit": "6f35eab",
           "name": "boot",
           "purpose": "Directory native/boot. Purpose not yet described by a human."
         },
@@ -79,8 +79,8 @@
           "purpose": "Directory native/disk. Purpose not yet described by a human."
         },
         {
-          "digest": "db24cfca50e9f5c96b8bec3858420bb97cc5ddaa4f2d4e2050b3b98ce0a0a660",
-          "last_commit": "013dfa6",
+          "digest": "6e575096cfcc2df4792bbae3821d3d77b414aa432bda02d3fcddc8a2ff913143",
+          "last_commit": "867c4ac",
           "name": "kernel",
           "purpose": "Directory native/kernel. Purpose not yet described by a human."
         },
@@ -109,15 +109,15 @@
           "purpose": "Directory native/store. Purpose not yet described by a human."
         }
       ],
-      "children_root": "sha256:3a49c1addd1c30a7734661248d997b9f01318df3f2845be392abe186fb1fd9ce",
-      "compiled_at": "2026-10-13T17:02:53Z",
+      "children_root": "sha256:eac95440257feb868df67082aa612e6ed39e4cc60160e6c0f3028e580bc9382b",
+      "compiled_at": "2026-10-13T17:23:51Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:f497c9f7a4854444dec6fb7a02af1acbcbc2b54f9b02421817271263a7b3cae0",
+      "digest": "sha256:443333b76192539859c8e501f18091153980e715c490920441f2c7e177f5fae1",
       "evidence_files": 4,
       "evidence_root": "sha256:e410b845507e00568e15b51a5797af32a97e0e4b8ab4e8487bb7c98e7e0cf335",
       "files": 535,
-      "generated_at_commit": "013dfa602cad3a9f4435359ccf01f9b61eecfaf5",
-      "source_tree": "sha256:317529d8c8851c09d980a1ba4e131bcded950d15c6e99cfa808b2a2be4ab4019"
+      "generated_at_commit": "298065e8f6711a85823fe4ff051738e7c30cbbd1",
+      "source_tree": "sha256:d33b4088ae75ab0cbecb1563d7148d737c275768835a929fb0b747a10be43c7f"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/kernel/.crumb b/native/kernel/.crumb
index 47d4b74b..e83e8a80 100644
--- a/native/kernel/.crumb
+++ b/native/kernel/.crumb
@@ -57,14 +57,14 @@
           "purpose": "Directory native/kernel/artifact. Purpose not yet described by a human."
         },
         {
-          "digest": "7d244641327a07e507217ef39fafe416f7d0b970dd1c8121a73c77034703be16",
-          "last_commit": "013dfa6",
+          "digest": "7916404f955114d22a806f1726b7a2b8cf79f56076af9ee702019143feb8e0a8",
+          "last_commit": "867c4ac",
           "name": "core",
           "purpose": "Directory native/kernel/core. Purpose not yet described by a human."
         },
         {
           "digest": "a80356e38bcc9fc135fffc058dc782bc2fc4f56869f6e06caaf0c2e169338212",
-          "last_commit": "013dfa6",
+          "last_commit": "6f35eab",
           "name": "dev",
           "purpose": "Directory native/kernel/dev. Purpose not yet described by a human."
         },
@@ -82,7 +82,7 @@
         },
         {
           "digest": "11e19f80d8332984392eda3141fe2a5b50b9032fbb4d1ace6aabf29e445cf9ab",
-          "last_commit": "013dfa6",
+          "last_commit": "6f35eab",
           "name": "svc",
           "purpose": "Directory native/kernel/svc. Purpose not yet described by a human."
         },
@@ -99,15 +99,15 @@
           "purpose": "Hosted (Linux-built) checkers for the native kernel, run by `make -C native/kernel test`; nothin"
         }
       ],
-      "children_root": "sha256:295cee93e4b0844f124c3fc8d605f23e81116d11348d211f13cc3d9d19fec303",
-      "compiled_at": "2026-10-13T17:02:53Z",
+      "children_root": "sha256:15688dcd8360057fd3d4d6b0f7978f09ec0f81e5e8323bb75d707d70cd55e453",
+      "compiled_at": "2026-10-13T17:23:51Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:db24cfca50e9f5c96b8bec3858420bb97cc5ddaa4f2d4e2050b3b98ce0a0a660",
+      "digest": "sha256:6e575096cfcc2df4792bbae3821d3d77b414aa432bda02d3fcddc8a2ff913143",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 356,
-      "generated_at_commit": "013dfa602cad3a9f4435359ccf01f9b61eecfaf5",
-      "source_tree": "sha256:61283ac374ac07b5b45578895c16005cd00bd3e187c7234ea63c086221ecf736"
+      "generated_at_commit": "298065e8f6711a85823fe4ff051738e7c30cbbd1",
+      "source_tree": "sha256:3907ec2526bc6cb7207438ec3799fc07856f36855f8545a7f308057e454b42d5"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/kernel/core/.crumb b/native/kernel/core/.crumb
index 0e79a8e6..3a3992ca 100644
--- a/native/kernel/core/.crumb
+++ b/native/kernel/core/.crumb
@@ -7,14 +7,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-10-13T17:02:53Z",
+      "compiled_at": "2026-10-13T17:23:51Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:7d244641327a07e507217ef39fafe416f7d0b970dd1c8121a73c77034703be16",
+      "digest": "sha256:7916404f955114d22a806f1726b7a2b8cf79f56076af9ee702019143feb8e0a8",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 59,
-      "generated_at_commit": "013dfa602cad3a9f4435359ccf01f9b61eecfaf5",
-      "source_tree": "sha256:a9f76afbb883d34ef2a04e2b744783beca6b2cb0d6a931ffd0a7a7a6c13145c1"
+      "generated_at_commit": "298065e8f6711a85823fe4ff051738e7c30cbbd1",
+      "source_tree": "sha256:10f6ab8e1cb41f6602ae8c3d5a7709ff36fb0d952bb63d9fe8e4a0462ead52ac"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/kernel/core/infer.c b/native/kernel/core/infer.c
index e8e69a6d..8ee997de 100644
--- a/native/kernel/core/infer.c
+++ b/native/kernel/core/infer.c
@@ -100,6 +100,13 @@ extern void aienos_infer_heap_stats(uint64_t *used, uint64_t *peak);
 #define CPACR_FPEN_SHIFT 20
 #define PAGE 4096ull
 #define HEAP_BYTES (256ull << 20)    /* bump-allocator region for the Rust unit */
+#define PET_CHUNK (16ull << 20)       /* bytes hashed between two watchdog pets */
+/* Pet the Pi PM watchdog (core/pi5.c, 15 s) from a long loop; no-op where there is none. */
+static void pet(void)
+{
+    if (ck_pi5_stage)
+        ck_pi5_stage("infer");
+}
 #ifndef CK_INFER_DISK_ONLY
 #define DMA_CHUNK (64ull << 20)      /* fw_cfg DMA length is 32 bit; read in chunks */
 #define MODEL_FILE "opt/aienos/model"
@@ -285,6 +292,7 @@ static int session_request(unsigned which, const char *text, unsigned cancel_aft
         uint32_t t = 0;
         uint64_t us = 0;
         rc = aienos_infer_session_step(&t, &us);
+        pet();
         if (rc < 0 || rc == SESS_STEP_DONE) break;
         steps++;
         if (rc == SESS_STEP_PREFILL) { prefill++; pre_us += us; continue; }
@@ -599,7 +607,14 @@ void ck_infer_run(void)
     uint8_t dg[SHA256_DIGEST_SIZE];
     char dh[2 * SHA256_DIGEST_SIZE + 1];
     sha256_init(&ctx);
-    sha256_update(&ctx, (const uint8_t *)(uintptr_t)mpa, msize);
+    /* 16 MiB pieces, a watchdog pet between them: on the Pi the 15 s PM watchdog is petted only at boot
+     * stages (core/pi5.c), and hashing the whole model is longer than that. ck_pi5_stage is weak (absent
+     * on every other board). */
+    for (uint64_t o = 0; o < msize; o += PET_CHUNK) {
+        uint64_t n = msize - o < PET_CHUNK ? msize - o : PET_CHUNK;
+        sha256_update(&ctx, (const uint8_t *)(uintptr_t)(mpa + o), n);
+        pet();
+    }
     sha256_final(&ctx, dg);
     hex(dh, dg, SHA256_DIGEST_SIZE);
     ck_printf("infer: sha256=%s sha_us=%llu\n", dh, (unsigned long long)(ck_time_us() - t1));
@@ -620,6 +635,20 @@ void ck_infer_run(void)
     return;
 #endif
 
+#ifdef CK_PI5_INFER
+    /* Pi image: the one-shot probe is one call of many seconds with interrupts masked and cannot pet the
+     * 15 s PM watchdog (core/pi5.c). The session below runs the same golden prompt one step at a time
+     * with a pet per step, and is judged against the same llama.cpp token list (expect_gen). */
+    ck_puts("infer: one-shot probe skipped on the Pi image (watchdog); the session below runs the golden prompt step by step\n");
+    (void)expect_ids; /* judged by the one-shot probe only; the session checks the reply tokens */
+    {
+        uint64_t v = ck_rd(cpacr_el1);
+        v |= 3ull << CPACR_FPEN_SHIFT;
+        ck_wr(cpacr_el1, v);
+        ck_isb();
+    }
+    int f2 = ck_mm_frames_free(hpa, HEAP_BYTES / PAGE);
+#else
     /* FP/SIMD on, every exception masked for the Rust unit (see core/fpu.c).
      * The FP registers are left dirty afterwards (nothing else in the kernel
      * reads them; EL0 traps on FP). */
@@ -672,6 +701,7 @@ void ck_infer_run(void)
     aienos_infer_heap_init(0, 0);
     int f2 = ck_mm_frames_free(hpa, HEAP_BYTES / PAGE);
     ck_printf("AIENOS_CK_INFER: %s\n", ok ? "PASS" : "FAIL");
+#endif /* CK_PI5_INFER */
 
     /* Bounded session on the same model bytes, its own fresh heap region. */
     session_run(mpa, msize);