Skip to content

monitor: EL1 OS on T8142 too; Mach-O boot object works on J813 single-stage - #42

Closed
sithglan wants to merge 2 commits into
aurora-silicon:mainfrom
sithglan:thomas/t8142-monitor
Closed

sithglan wants to merge 2 commits into
aurora-silicon:mainfrom
sithglan:thomas/t8142-monitor

Conversation

@sithglan

@sithglan sithglan commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Tried the merged Mach-O boot object (#29) on the MacBook Air M5 (T8142, J813).
It works there too, with one change and one caveat.

Change

monitor_required() only probed on T8140. T8142 confines its secondaries
to the CTXR windows at EL2 in the same way, so let the probe decide there
too (b5eec45). Linux then reports CPU: All CPU(s) started at EL1.

Caveat: no Stage 2 chainloading in this mode

The first attempt enrolled a filled Stage 1 (fill_stage1_config.py, wrapped
with macho_boot_object.py) that chainloads an ESP Stage 2, our usual setup.
It looped. On DockChannel, Stage 1, Stage 2 and kboot all ran (GPU hand-off,
N1 link-up, NVMe adoption) up to "Vectoring to next stage". Then every CPU
printed aura exception dumps at once ("Exception taken from EL2h ... Running
in EL2"). The CTXR windows cover the enrolled Stage 1
(CTXR_D = [0x10006b64000, 0x10006ddf000), all CTXR_*_CTL_EL1 = 0 on the
boot CPU). The secondaries the chainloaded Stage 2 starts run its code outside
those windows at EL2.

Tests over the tether, from Stage 1's proxy:

  • A chainloaded Stage 2 that left the secondaries parked in Stage 1 booted
    Linux on the boot CPU at EL2 (VHE).
  • The same with the monitor forced booted Linux on the boot CPU at EL1. NVMe,
    Wi-Fi and the GPU (asahi, render node) worked.

What works is a single-stage boot object. It is the CHAINLOADING=1 ESP_STAGE2=1 build with the boot= and chosen.bootargs variables appended
after STACKBOT, then wrapped. Kernel, DTB and initramfs stay on the ESP, so
only aura updates need 1TR. Enrolled with kmutil configure-boot -c
(kcbz : 0), the J813 cold-boots untethered:

The kernel boots with idle=nop, so the WFI register wiping does not come
into play. s2idle under the monitor is not tested yet.

docs/macho-boot-object.md now records the T8142 result and the chainloading
limitation. Tested build: e7e69a4 + #14 + #32 + this commit. The rebase onto
current main (212e3d1, the ANE preload hand-off) is untested on hardware.

cc @Acelogic @DjDeveloperr @RyanTheTide @LiamRay10

The J813 (T8142) in the kcbz-0 Mach-O mode confines its secondaries to the
CTXR windows at EL2 exactly like T8140: a chainloaded Stage 2 that started
them outside the boot object took an exception storm on every secondary
as soon as it handed over. With the secondaries left in Stage 1 and the
monitor forced, Linux reports "All CPU(s) started at EL1" and runs
(network, NVMe adoption, GPU probe), so let the probe decide on T8142 too.

Assisted-by: Claude Opus 5.5
Report the J813 (T8142) result: a single-stage boot object boots Linux at
EL1 on all CPUs with TSO available, while a filled Stage 1 that chainloads
an ESP Stage 2 loops, because the CTXR windows confine the secondaries to
the enrolled Stage 1.

Assisted-by: Claude Opus 5.5
@sithglan

sithglan commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Closing on DJ's reply: anything that boots in this mode has its secondaries
confined, so the monitor check should be unconditionally true in the Mach-O
build rather than a per-chip list. DJ is doing the proper fix upstream.

For that fix, the J813 (T8142) results from this PR still stand:

  • A single-stage boot object boots Linux at EL1 on all ten CPUs, with NVMe,
    Wi-Fi/BT, the GPU and TSO (PR_SET_MEM_MODEL) working.
  • A filled Stage 1 that chainloads an ESP Stage 2 loops, because the
    secondaries that Stage 2 starts run outside the CTXR windows.

@sithglan sithglan closed this Nov 1, 2026
dmitzsaz pushed a commit to dmitzsaz/aura that referenced this pull request Nov 6, 2026
…6040-lsq-20261024

nvme: use the NVMMU block for the T6040 linear queue registers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant