Repository navigation
Conversation
Execute-window chips (data/execute-window.json: M4, A18 Pro, M5 and later) are only qualified for EL2 suspend-to-RAM behind a padded Mach-O Stage 1 with an active CTXR execute window. When one of those chips boots an unconfined raw Stage 1 (for example T8140 with aurora#647, where CTXR_D bounds are populated but ACC_CTXR_D_CTL_EL2 has lock bits only), dt_set_s2r_mailbox() previously published aurora,s2r-mailbox despite having no execute window, causing Linux to default mem_sleep to deep on an unqualified raw wake path and reboot on suspend. Expose ctxr_exec_expected() from ctxr_exec.c (backed by data/execute-window.json) and check ctxr_exec_expected() && !ctxr_exec_window(NULL, NULL) in dt_set_s2r_mailbox() after the armed CTXR_D check. On raw boots of execute-window chips, record chosen/aurora,s2r-unavailable and skip publishing aurora,s2r-mailbox so Linux boots normally and stays on s2idle. M1 to M3 chips (below data/execute-window.json) and padded Mach-O execute-window boots (active ctxr_exec_window) are unaffected. Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
|
Merge readiness at
Areas: none matched in CODEOWNERS Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
🔵 Needs a closer look
Live hardware qualification remains pending on raw J700, padded Mach-O J616s, and legacy J314s, and host harnesses cannot establish actual bootability or Linux sleep-mode selection.
No open issues 🎉
What changed in this PR
Keeps raw boots on execute-window chips bootable while withholding deep-sleep support until a qualified CTXR execute window is active. Legacy chips and padded Mach-O boots remain unchanged.
Changes:
- Exposes the chip’s expected execute-window status.
- Withholds the S2R mailbox and records an unavailable reason on unqualified raw boots.
- Adds host regression coverage for supported and blocked boot configurations.
| File | Description |
|---|---|
| tests/python/test_s2r_mailbox_gate.py | Tests mailbox publication and rejection across boot configurations. |
| src/kboot.c | Gates mailbox publication on execute-window availability. |
| src/ctxr_exec.h | Declares the expected-window query. |
| src/ctxr_exec.c | Implements the query using generated chip data. |
Review effort: Balanced
integration/aurora-7.3: sync to v1.0.0b18 and carry aurora-silicon/aura#671
|
Hardware-verified via the carried
|
What: Withhold
/chosen/aurora,s2r-mailbox(and record/chosen/aurora,s2r-unavailable) when an execute-window chip (data/execute-window.json: M4, A18 Pro, M5 and later) boots without an active CTXR execute window (unconfined raw Stage 1), so Linux boots normally and stays ons2idleinstead of defaulting to deep sleep on an unqualified raw wake path.Tested: Host pytest at
2fc0ac9180e3:91/91passed acrosstest_s2r_mailbox_gate.py,test_ctxr_exec_probe.py,test_ctxr_exec_window.py,test_t6040_hibernate_fixed_window.py,test_secondary_ro_reservations.py,test_mmu_ctrr_l3.py, andtest_smp_forward_rvbar.py.Risk: two-way door · execute-window Macs (
data/execute-window.json: Neo, M4, M5 and later); M1 to M3 (execute_window_expected() == false) and padded Mach-O execute-window boots (ctxr_exec_window() == true) are unchanged.Not yet: Live Stage 2 boot rows on raw Stage 1 Neo (J700), padded Mach-O M4 Pro (J616s), and M1 Pro (J314s) at
2fc0ac9180e3(pending lab qualification).Details
src/ctxr_exec.h,src/ctxr_exec.c: exposectxr_exec_expected(), returningexecute_window_expected(chip_id)from the build-generatedbuild/execute_window.h(data/execute-window.json). Placed above#define CTXR_EXEC_AURA_SLOTto preserve existing host test harnesses.src/kboot.c: indt_set_s2r_mailbox(), after the existing armed-CTXR_D-without-window check, checkctxr_exec_expected() && !ctxr_exec_window(NULL, NULL). When true, logFDT: no S2R mailbox: raw boot of an execute-window chip, setchosen/aurora,s2r-unavailableto"raw boot of an execute-window chip: S2R requires Mach-O Stage 1", and return0without publishingaurora,s2r-mailbox.mem_sleepto[deep]and rebooting on suspend, while keeping padded Mach-O Stage 1 systems and M1 to M3 Macs unchanged.tests/python/test_s2r_mailbox_gate.py: compiles and executes the productionctxr_exec_expected()anddt_set_s2r_mailbox()against the generatedexecute_window.hacross M1–M3 unconfined boots, execute-window padded Mach-O boots, execute-window raw unconfined boots, and armed-CTXR_D-without-window boots.Evidence
Head commit:
2fc0ac9180e37196807a8d222d0cd17574185402