Repository navigation
nvme: T6050: adopt a live session an earlier stage passed on - #159
Merged
Merged
Conversation
The installed M5 Stage 1 hands its ANS session on running, controller disabled. An ESP Stage 2 built from main powered that session off and started it from off, as it does for its own session after use. Behind the Stage 2 host window, 16 s after Stage 1's hand-on, the firmware acknowledged AP idle but not IOP idle, and the warm start then got no HELLO: no NVMe, no payload. Every earlier power-off of such a session ran about 7.5 s after the hand-on and was acknowledged. Adopt a healthy session as it is (RTKit untouched, controller set up again), as the M5's default Stage 2 does on every boot. If its controller doesn't come ready, the existing restart from off still runs, now with an RTKit instance made for it then. Signed-off-by: Diljit Singh <hey@djdev.me>
This was referenced Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On the M5 Pro (J714s, T6050), an ESP Stage 2 built from main loses NVMe and drops to its proxy:
The installed Stage 1 hands its ANS session on running (controller disabled,
nvme.adopt). Maintreats that as an earlier stage's session and powers it off before starting it from off. Behind
Stage 2's 15 s host window, the firmware acknowledged AP idle but not IOP idle. With no idle there
was nothing to warm-start from.
Evidence (this M5's recorded consoles)
Every one was acknowledged and every warm start came up. The one run as a real ESP Stage 2
reached NVMe 15.7 s after the hand-on and failed as above. Why the firmware stops acknowledging
later isn't known.
boots came ready, 155 of 156 at the ~22 s timing. The rare CSTS.RDY timeouts are what main's
existing T6050 restart from off covers.
Change (
src/nvme.c)is. The SART is read for kboot's reservations, there's no RTKit instance or mailbox traffic, and
the controller is set up again.
nvme_ans_power_off()now makes the RTKit instance itself when the session had none.running, with no
apple,sart-entries.Validation (M5 Pro J714sAP, 2026-11-11)
Built
USE_CLANG=1 BUILDSTD=1 CHAINLOADING=1 ESP_STAGE2=1 DEBUGUSB_PROXY=1. Installed as theESP Stage 2 with the M5's current kernel set:
22.19 s it logged
nvme: adopting the live post-M4 ANS session,nvme: initialized10 mslater, then reads verified and
leaving controller and RTKit running for Linux adoption.Linux 7.3.0 mounted its root on nvme0n1p5. A 64 MiB O_DIRECT read of /dev/nvme0n1 ran at
4.8 GB/s with no nvme errors.
read at 3.0 GB/s. This boot's console wasn't captured.
-Werror; CI runs the tests. clang-format 20.1.8 isclean.
🤖 Generated with Claude Code