Repository navigation
Conversation
Stage 2 handles the powered-off post-M4 ANS handoff (nvme.sart=, see aaec599 "payload: start a post-M4 ANS an earlier stage powered off before any payload"), but hands a live session without SART entries on as it found it. T8132 Stage 1 releases from before the powered-off handoff (v1.0.0b10 and earlier, including 1.0.0b8) leave ANS running and pass no SART entries. The newer U-Boot tail (1b60b47e, U-Boot aurora-silicon#38 plus aurora-silicon#40) dropped adoption of such an inherited session and starts ANS from apple,sart-entries instead, so it refuses what Stage 2 hands on. A Mac mini M4 (J773g) on Stage 1 1.0.0b8 then stops after the Stage 1 vector: no Stage 2 display, no U-Boot output, no Linux. On T8132, when a non-boot= Stage 2 has not used NVMe and no SART entries were passed, take the inherited session over with nvme_init() and shut it down normally, so the payload receives ANS off with its SART entries. If the takeover fails, stop rather than hand over an ANS in an unknown state. The nvme.sart= and boot= paths and every other chip are unchanged. This changes the old-Stage-1 contract for every non-boot= T8132 payload. An older U-Boot that adopts a live ANS but cannot start one from off would no longer work with an old Stage 1; keep the aura and U-Boot pins coordinated. Tested on a J773g with Stage 1 1.0.0b8 and U-Boot 1b60b47e: a Stage 2 from main + aurora-silicon#113 + aurora-silicon#199 with this change booted Linux five times in a row; without it the same stack stopped before U-Boot. Assisted-by: LLM Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
9783b3d to
3de7351
Compare
|
Rebased onto main Tests on this head: Hardware (J773g Mac mini, macOS 26.6.2, Stage 1 1.0.0b8; each image installed on the ESP as a one-shot
Not covered: unchanged from the description. |
|
Hardware result on a second J773g (Mac mini M4; Stage 1 aura 1.0.0b8, stub 26.6.2, stock Aurora U-Boot e1ef8b63): A Stage 2 containing ccb99cd hangs before the payload. I built it from The same tree without ccb99cd (b8461a8 + 083dbc3 + 79fcfc0 + 7fdadb3) boots 3/3 to apple-drm HDMI and G16 READY. Happy to run a debug build or capture a console if that helps. |
|
Please hold this PR: the current head should not be merged. @FatBoy721's result is consistent with an ANS handoff mismatch:
That makes the report consistent with the code: without this change, I am working on a follow-up that chooses a handoff the appended U-Boot can consume, and I will boot it with both U-Boot generations before asking for review again. Thank you for testing this. A console capture of the hang would help if it is easy to get, but it is not needed to proceed. Dependencies: #113's branch is currently stacked on this PR's commit, so merging #113 as it stands would also bring in this change. #199 is stacked on #113's J773g work, the display-regions draft is stacked on #199, and the kernel side is linux #1192. I will either land the fix-up here first or rebase #113 so it no longer carries this commit, and I will say which on #113. |
Identify the deployed legacy U-Boot consumer by its ARM64 header, version banner, and exact adjacent property/diagnostic string-table bytes. Add an explicit nvme.handoff override while making auto and invalid input fail toward the running-ANS contract. Cover the four handoff cells and the review-blocking negative payloads, including unrelated, non-U-Boot, truncated, short, and boundary-split strings. Assisted-by: LLM Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
3de7351 to
4678159
Compare
|
@FatBoy721, thank you for the second-machine result. It exposed that the held revision gave stock Default
Host coverage includes the four cells, all override modes, the reviewer's four negative classes, Both hardware rows use the exact v2 tree on J773g Stage 1 1.0.0b8 as one-shot Stage 2 transports. I am not asking for merge. The PR stays draft, and maintainers can decide whether and when to lift |
|
Closing: not needed. Stage 1 b13.1 with the current Stage 2 boots this machine without it. |
On T8132, stock U-Boot (
e1ef8b636fc9) can only adopt a running ANS, while the deployed U-Boot#38/#40 family (
0ac2fb76985e, including1b60b47ef6a2) can start ANS from off withapple,sart-entriesand refuses a running inherited session. Stage 1 1.0.0b10 and older hand Stage2 a live ANS without entries; newer Stage 1 hands it off with
nvme.sart=. Main gives the payload arunning ANS in both cases, which suits stock and fails the #38/#40 family.
Two commits on main
eb66d6cd79a46ddcff85628599135a607fd70648:9a6b0dfe(stable patch-id0d4874f4c298) adds the T8132 takeover needed to turn an inherited livesession into off plus entries. It stops the boot if takeover fails.
4678159e(stable patch-id995147c6d070) chooses that off contract affirmatively. In defaultnvme.handoff=auto, Stage 2 requires the AArch64 U-Boot identity and the contiguous legacyapple,sart-entriesconsumer diagnostic (including its newline) present in the deployed kboot: name the product without its release date #38/Release aura 1.0.0b2 #40builds. Missing, unrelated, truncated, split, non-U-Boot, or invalid input falls back to main's
running handoff. If a future off-only U-Boot changes that diagnostic,
autotherefore logs thatthe signature was not found and hands ANS on running; that U-Boot will refuse the mismatched
contract instead of booting Linux. Integrators can recover explicitly with
nvme.handoff=off(or force the stock contract with
nvme.handoff=running). The decision and reason are logged;boot=and other chips are unchanged.nvme.sart=Host tests on
4678159e398d97f3e1e0b2ac906b7aa5308dd633(tree59ed6e9f633df7fd5ba9b4eb93a3b4e97a8f38d9): the four-cell table,auto|running|offand invalid-valuebehavior, the reviewer's unrelated-string/non-U-Boot/truncated-or-short/split-boundary negatives,
takeover failure,
boot=, other chips, and the realnvme_sart_entries()path. The table test is 8failures when overlaid on the first commit alone; the exact v2 head has 71 focused passes. The full
Ubuntu 24.04 CI-equivalent job has gcc 809 passed (main 733) and clang 748 passed (main
672); its 31 / 91 failing or erroring IDs are exactly main's LeakSanitizer/host set.
make format-checkpasses. Stage 1 headroom is gcc 18152 B and clang 83920 B, unchanged frommain (18152 / 83920).
The hardware rows are one-shot ESP Stage 2 boots on the J773g with Stage 1 1.0.0b8; the live Stage 2
and installed default kernel are untouched. The stock tail is our own
apple_m1_defconfigbuild ofe1ef8b63, not a shipped binary.Not covered: a Stage 1 1.0.0b11 or newer (
nvme.sart=) hardware boot; a direct appended Linuxkernel; other T8132 boards. The long-term ABI should be a versioned capability deliberately emitted
by U-Boot; this revision keeps a bounded legacy probe for the already-deployed unmarked builds.