Repository navigation
T6041 (J616C, M4 Max 16"): FDT-scoped DAPF init and NVMe split-BAR admission - #1
Merged
Merged
Conversation
dapf_init_all() programs every DAPF instance listed in the ADT. On J616C (MacBook Pro 16" M4 Max, T6041) one of them is not usable at handoff and the access takes an SError, so kboot never reaches the kernel. Use dapf_init_fdt() as T8142 already does: it only programs the DAPFs of the DARTs the device tree enables, and the handoff completes. Tested on J616C (macOS 27.0.1 SFR, 26.6.2 stub): Aura stage 1 -> ESP stage 2 -> Linux from NVMe, daily since 19 Oct. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Like the T8140 case just above it, J616C (T6041) advertises a 64 KiB 'nvme' window (0x44dcc0000, nvmmu at 0x40dcc0000) while the linear I/O submission queue doorbell sits at +0x24908, so the size check rejects the controller with "invalid split BAR geometry". Admit 0x30000 for this exact geometry so Aura's NVMe driver can read the ESP and load Linux. Tested on J616C: stage 2 loads Image + DTB from the ESP over NVMe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AxxzyWasTaken
requested review from
DjDeveloperr and
RyanTheTide
as code owners
October 20, 2026 22:05
RyanTheTide
approved these changes
Oct 24, 2026
RyanTheTide
left a comment
Contributor
There was a problem hiding this comment.
Thanks, both changes are scoped to T6041 by chip_id, so nothing changes on the other SoCs, and the split BAR case matches the T8140 one above it. I built it merged onto main (553b566) as RELEASE=1 CHAINLOADING=1 and with ESP_STAGE2=1, both clean apart from the three existing warnings. We have no T6041 here, so this goes in on your J616C testing plus the build. Merging.
DjDeveloperr
added a commit
that referenced
this pull request
Nov 3, 2026
…e MMFR4 hack - nv2_requested() lights up on any CPU implementing FEAT_NV2 (ID_AA64MMFR2_EL1.NV >= 2); the VNCR layout and Apple AVNCR map are architectural, so there is no reason to restrict it to one chip. The aura-nv2 / NV2_BOOT opt-in and the default-off behaviour are unchanged. - Bank MDSCR_EL1 (VNCR +0x158) across the L1/guest register swap. Without it a guest's debug state leaked into L1 and host single-step and hardware breakpoints silently broke. - Add nv2_probe_active, set only while a proxy nv2_probe_call()/nv2_probe_arm() is in flight. A production guest's own hvc #1 is now reflected to it like any other hvc instead of being redirected into nv2_probe_ret. - Add monitor_reflect_undef(), used by exc_sync to inject an UNDEF into the OS (plain EL1 or an NV2 virtual-EL2 guest) rather than resetting the machine. - Remove the NV2_MMFR4_PASSTHRU debug #if hack and its Makefile flag, and silence the trace-off unused-parameter warning in nv2_note_unhandled(). Assisted-by: Claude Opus 4.8
DjDeveloperr
added a commit
that referenced
this pull request
Nov 3, 2026
hvc #1 was turned into a return to nv2_probe_ret unconditionally, so a production guest's own hvc #1 could jump into proxy-only code and unwind a stack frame that was never set up. Honour it only while a proxy probe is in flight (nv2_probe_active); otherwise treat it as an unknown HVC. Under the monitor, a synchronous trap from the OS (a lower EL) that the monitor does not itself service is the OS's own to handle. Reflect it as an UNDEF into the OS via monitor_reflect_undef() instead of taking down the whole machine. The monitor's own EL2 faults and active proxy guards still fall through to the recovery path. Assisted-by: Claude Opus 4.8
DjDeveloperr
added a commit
that referenced
this pull request
Nov 7, 2026
Take aura#77, which removes the resident EL2 monitor, PSCI, NV2 and PV-KVM from the Linux boot and runs Linux at EL2 in the CTXR window. Resolutions: - monitor.c, pv_kvm.c: deleted, as in #77. This branch's NV2 already has its own EL2 setup and entry (nv2_el2_setup, nv2_enter_el1h) and used neither the monitor nor PV-KVM. - nv2.c, nv2.h, nv2_asm.S: kept from this branch. They are built only with SPTM_VIRT=1. - exception.c: #77, plus this branch's SPTM_VIRT hooks. The UNDEF reflection on the monitor's path goes, with monitor_active. The proxy's hvc #1 case is SPTM_VIRT-only as a whole. - exception_asm.S: #77's, with no lower-EL ERET gate. Until a later commit puts the gate back for SPTM_VIRT, the guest's ERETs take nv2_eret's C path, which handles all of them. - Makefile: #77's object list plus SPTM_VIRT. NV2_TRACE and NV2_TRACE_PRINT only mean something inside SPTM_VIRT. - boot_options, payload.c, main.c, kboot.c, docs/boot-options.md and their tests: #77's. This branch only removed NV2 host mode from them, and #77 removes it along with PV-KVM. Signed-off-by: Diljit Singh <hey@djdev.me>
sithglan
pushed a commit
to sithglan/aura
that referenced
this pull request
Nov 22, 2026
The checklist here was synced from 8c0f9c227cd7. Since then agent-guidelines loosened the Assisted-by wording in section 4 (aurora-silicon#1) and split section 6 into prose naming (Borealis), current code identifiers (hk_/HK_ until mesa#591 lands) and upstream/UAPI names (aurora-silicon#2). Sync from f7edafb3ce3b and update the four copies in the same commit, so the merge push has nothing to heal. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
This was referenced Nov 23, 2026
Open
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.
Two small fixes found while booting Linux from the SSD on a MacBook Pro 16" M4 Max (Mac16,5 / J616C / T6041).
kboot: use FDT-scoped DAPF init on T6041
dapf_init_all()programs every DAPF instance in the ADT. On J616C one of them is not usable at handoff and the access takes an SError, so kboot never reaches the kernel.dapf_init_fdt(dt)(as T8142 already uses) only programs the DAPFs of the DARTs the device tree enables, and the handoff completes.nvme: admit the T6041 split BAR layout
Same situation as the T8140 case just above it: the ADT advertises a 64 KiB
nvmewindow at 0x44dcc0000 (nvmmu at 0x40dcc0000), but the linear I/O submission queue doorbell is at +0x24908, so the size check rejects the controller ("invalid split BAR geometry"). Admitting 0x30000 for this exact geometry lets Aura read the ESP and load Linux from it.Testing: J616C, macOS 27.0.1 SFR with a 26.6.2 stub. Aura stage 1 (kmutil) → ESP stage 2 (ESP_STAGE2=1) → Linux 7.1.12 (omacom/linux-aurora integration/aurora) from NVMe, booted daily since 19 Oct, cold boots and reboots. Builds cleanly on main (362ae4f).
🤖 Generated with Claude Code