Skip to content

memory: map L2 blocks over an armed CTRR range with L3 pages - #411

Merged
RyanTheTide merged 1 commit into
aurora-silicon:mainfrom
sithglan:thomas/t8152-ctrr-c-l3
Nov 21, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:mainfrom
sithglan:thomas/t8152-ctrr-c-l3

Conversation

@sithglan

@sithglan sithglan commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

With this, aura main boots the J873g (M6 Mac mini) desktop kernel from the ESP. Without it, main faults in its own console before the handoff.

Problem

iBoot can arm CTRR_C and CTRR_D over physical ranges that L2 blocks would cover. On T8152 it arms CTRR_C over the 48 KiB below its top_of_kernel_data, above the boot object.

mmu_map() uses L3 pages only below aura's base. When the armed range lands above the next 32 MiB boundary, it sits inside an L2 block, and a secondary CPU walking that block takes an address size fault at level 2. The boot core uses the same block without a fault. On the J873g the boot CPU is CPU 6, so CPU 0 (MPIDR 0x80000000) is a secondary.

Whether it hits depends on where iBoot places the object; on the M6 under macOS 27.2 it hit 5 of 10 boots. On main 3efa4a81, chainloaded on the J873g with boot= from the ESP:

  • CPU 0 faults in fb_console_scroll() → memcpy32 while cpufreq_init() prints.
  • The fault is on the framebuffer write at 0x1000fa12010 (ESR 0x96000002), in the 32 MiB block that holds CTRR_C.

Change

mmu_map() builds exactly the L2 blocks whose output range contains an armed CTRR_C or CTRR_D from L3 pages, as it already does for the firmware's read-only range:

  • Testing the output (physical) address covers every virtual alias of the RAM.
  • The cost no longer depends on where iBoot puts the range.

The ranges are read once (ctxr_range()), and only with locked Apple system registers, as kboot reads them. An absent or unarmed range changes nothing. Each armed range is logged once: MMU: L3 pages over CTRR_C [start, end). The rule that maps everything below aura's base with L3 pages is unchanged.

Testing

J873g (macOS 27.2 boot policy): main 3efa4a81 + this commit, chainloaded from the installed Stage 1 with boot=<ESP>;aurora/ctxr/Image;aurora/gpu/t8152-j873-dcp-gpu.dtb;aurora/ctxr/initramfs.cpio.gz:

  • aura log: MMU: L3 pages over CTRR_C [0x1000ef9c000, 0x1000efa8000), then the handoff. CTRR_D is not armed.
  • Linux: 7.3.0-aurora-j873-avd-usb4-perf+ comes up with CPUs 0-11 online, the GPU render node, the two USB-C displays and no failed units. HDMI did not come up: the main DCP's firmware asserted when Linux took it over, which this commit does not cause (fixed by kboot, display: T8152: report live AFK endpoints; hand the display controllers over powered off #419). Its EIZO showed simpledrm's boot framebuffer, which I first counted as the third display.
  • Control: without the commit, the fault above.

Checks:

  • make format-check (clang-format 20.1.8) is clean.
  • GCC (CHAINLOADING=1, with and without ESP_STAGE2=1, -Wstack-usage=2048 -Os) builds with no warnings in memory.c.
  • Stage 1 size (clang) is unchanged (dev-audit headroom 16304 B).
  • pytest has the same 3 failures as unmodified 3efa4a81: test_dcp_iboot_wire, test_external_dependency_group and test_xnuboot_layout.

The same boot also covers #300's post-merge row on the J873g, which is posted there.

cc @DjDeveloperr @RyanTheTide @Acelogic @LiamRay10

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for tracking this down, and for the control run without the commit; the fault and its cause are clearly shown.

One change we'd ask for. We select behaviour by a hardware property rather than by the chip it was seen on, and here the property is already in hand:

  • src/memory.c:418: if (chip_id == T8152 && ctxr_range(CTRR_RANGE_C, &start, &end) && end > top)

ctxr_range() reads the window under an exception guard and returns false on chips that don't have it or haven't armed it, and the reason in your comment (an L2 block that contains an armed CTRR_C range faults on a secondary) is not specific to T8152. Could you drop chip_id == T8152 &&, so any Mac whose iBoot arms CTRR_C above aura's base gets the L3 pages? On a chip without it the result is the same _base as today.

If you make it unconditional, we can run boot rows on our M1 Pro, M2, M4 Pro and A18 Pro to confirm nothing else moves.

@sithglan sithglan changed the title memory: T8152: map iBoot's CTRR_C with L3 pages memory: map an armed CTRR_C with L3 pages Nov 20, 2026
@sithglan
sithglan force-pushed the thomas/t8152-ctrr-c-l3 branch from b7a3dd9 to 10ccc1b Compare November 20, 2026 23:01
@sithglan

Copy link
Copy Markdown
Contributor Author

@RyanTheTide done. The head is now 10ccc1b1. The condition is just ctxr_range(CTRR_RANGE_C, &start, &end) && end > top. Where CTRR_C is absent or not armed, ctxr_range() returns false and the top stays _base.

The code comment and the commit message now describe it as a property of the armed range. I also retitled the PR to "memory: map an armed CTRR_C with L3 pages".

Checks:

  • make format-check is clean.
  • GCC (CHAINLOADING=1, with and without ESP_STAGE2=1, -Wstack-usage=2048 -Os) builds with no warnings in memory.c.

J873g: main 3efa4a81 + 10ccc1b1 (1.0.0b13-g10ccc1b1 in /chosen), chainloaded with boot= from the ESP, boots the desktop kernel. All 12 CPUs, the GPU render node and no failed units.

Thanks for offering the M1 Pro, M2, M4 Pro and A18 Pro rows.

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers. The push at 10ccc1b addresses our earlier comment: the chip_id == T8152 gate is gone and the L3 extension now depends only on an armed CTRR_C (src/memory.c:419). The [start, end) handling and the 32 MiB rounding in mmu_map() are correct. ctxr_range() runs under the exception guard installed in startup, before aura_main(), so the first mmu_map() call is safe on chips without the register.

Two hardening points, since this is the stage-wide page table code:

  1. src/memory.c:419: only CTRR_C is considered. dt_reserve_secondary_ro() in kboot.c says secondaries on M4 and later enforce CTRR_D as well. On J813 that range sits below the boot object, so today it is covered by the existing _base rule. An iBoot that places CTRR_D above _base would hit the same L2-block fault on a secondary. Suggested fix: take the maximum end over {CTRR_RANGE_C, CTRR_RANGE_D} in mmu_l3_top(). It costs nothing where neither is armed.

  2. src/memory.c:416-421: the value read is trusted as is. On a chip where the register reads as a plausible but unrelated value, everything from ram_base to that address is mapped with L3 pages. That is slow, it costs heap for page tables, and nothing logs why. ctxr_exec_holds_ro_range() reads CTRR_C/D only when !cpu_features->apple_sysregs_unlocked. Suggested fix: apply the same condition here, or accept the range only when it lies inside [cur_boot_args.phys_base, phys_base + mem_size), and print the chosen top once (for example MMU: L3 up to 0x... (CTRR_C)). Boot logs would then show which machines take the new path.

Hardware rows we can run (offered earlier). On M1 Pro (T6000), M2 (T8112), M4 Pro (J616s, T6040) and A18 Pro (Neo, T8140), chainload this head as Stage 2 and boot to the desktop. Pass: all CPUs online, no SError or abort in the aura log, and the L3 top equals _base wherever CTRR_C is not armed. That last check needs the print from point 2.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

The arithmetic checks out: ctxr_range() gives [lower, upper + 4K) and returns false when CTRR_C is not there or not armed, so other chips keep _base as the L3 top. The extra pages keep the same attributes, so nothing gains a writable or executable mapping. A few points:

  • src/memory.c:418: nothing bounds the CTRR_C end. Any end > _base moves the L3 top, and every mapping whose first L2 boundary falls in [ram_base, l3_top) is then built from L3 pages all the way up to it. The RAM identity map starts at ram_base. A CTRR_C far above aura, or an odd UPR value, would therefore turn most of RAM into L3 tables: 16 KiB of heap per 32 MiB, written uncached before the MMU is on. On a chip with ram_base at 0x8_0000_0000, an end above 0xc0_0000_0000 would also catch the MMIO alias windows (memory.c:681-684). Could you either ignore the range unless it lies inside RAM (ram_base <= start && end <= ram_base + mem_size_actual), or force L3 only for the L2 blocks that intersect [start, end)? The second option also keeps the mapping cost independent of where iBoot puts the range.
  • src/memory.c:434-437: the test is on the virtual address. The RAM aliases at ram_base | REGION_RWX_EL0 / REGION_RW_EL0 / REGION_RX_EL1 (memory.c:665-678) still cover the CTRR_C physical range with L2 blocks. If the fault depends on the block's output address, a secondary going through an alias could still hit it. This is not a regression (the _base case was already like this), but was it checked?
  • PR description: it says a secondary faults on the block and the boot core does not, but the fault it quotes is on CPU 0 (MPIDR 0x80000000). If the boot core on T8152 is not CPU 0, please say so, so the comment at memory.c:406 matches what was seen.

A boot row on an M4 Air (T8132) would be useful alongside the rows already offered, since that iBoot generation may also arm CTRR_C.

Assisted-by: LLM (Claude:Opus 5.5)

@sithglan
sithglan force-pushed the thomas/t8152-ctrr-c-l3 branch from 10ccc1b to 5935898 Compare November 20, 2026 23:51
@sithglan sithglan changed the title memory: map an armed CTRR_C with L3 pages memory: map L2 blocks over an armed CTRR range with L3 pages Nov 20, 2026
@sithglan

Copy link
Copy Markdown
Contributor Author

@RyanTheTide thanks for both reviews. All points are in 59358989. I took the variant you preferred and dropped the L3-top approach.

  • Only the blocks that intersect, by output address. The L2 path now builds a block from L3 pages when its output range contains an armed CTRR range, next to the existing firmware-RO split. The head of mmu_map() keeps only the original "below _base" rule. The cost no longer depends on where iBoot puts the range, and an odd UPR value can at most split the blocks it names.
  • RAM aliases. I hadn't checked them before. Because the test is now on the output address, the REGION_* aliases of the CTRR range get L3 pages too.
  • CTRR_D. Both C and D are read, as ctxr_exec_holds_ro_range() does.
  • Locked sysregs only. Nothing is read when cpu_features->apple_sysregs_unlocked, as in kboot. T8152's features_m6 leaves it false.
  • Log. Each armed range is printed once. On the J873g: MMU: L3 pages over CTRR_C [0x1000ef9c000, 0x1000efa8000), the 48 KiB range in the block that held the fault address 0x1000fa12010. CTRR_D isn't armed there.
  • CPU 0. On the J873g the boot CPU is CPU 6 (main's SMP log parks CPUs 0-5 and 7-11), so CPU 0 is a secondary there. The commit message and the description now say so.

On this head:

  • The J873g boots the desktop kernel with CPUs 0-11, the GPU, three displays and no failed units.
  • format-check and both GCC configurations are clean, and Stage 1 headroom is unchanged.

The rows on your M1 Pro, M2, M4 Pro and A18 Pro would be very welcome. The MMU: L3 pages over CTRR_? line shows which of them take the new path; with unlocked sysregs (M1, M2) nothing is read. I don't have an M4 Air for a T8132 row.

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers. Re-checked 5935898 against both of our earlier comments; every point is addressed:

  • CTRR_D is read alongside CTRR_C (mmu_ctrr_ranges(), src/memory.c:419-438).
  • Nothing is read with unlocked Apple system registers, the same condition ctxr_exec_holds_ro_range() uses. init_cpu() sets cpu_features in startup before aura_main(), so the check sees the real value. ctxr_range() also returns false outside EL2.
  • The cost no longer depends on where iBoot puts the range: only the L2 blocks whose output range intersects an armed range get L3 pages (mmu_holds_ctrr()). An odd UPR value can split only the blocks it names.
  • The test is on the output address, so the REGION_* aliases of the range are split too.
  • Each armed range is printed once.

I also checked the interval test ([start, end) against [target, target + 2 MiB), and end <= start is skipped), the interaction with the firmware-RO split (RO first, then CTRR, then a plain L2 block), and the paths that come after it. Unmaps pass to = 0, so they never split and stay correct. Once the MMU is on, the L2 branch is skipped, so no later mapping can create an L2 block over the range.

One small point, not blocking:

  1. src/memory.c:471 (the L1 branch in mmu_map()): the L1 path doesn't consult the ranges. It is unreachable on Apple's 16K granule, so nothing breaks today. A one-line comment that the CTRR split assumes no L1 blocks (or the same mmu_holds_ctrr() test there) would keep a 4K build from silently mapping an armed range with a 1 GiB block.

Hardware rows we can run on this head, chainloaded as Stage 2 and booted to the desktop. Pass on every Mac: all CPUs online, and no SError or abort in the aura log.

  • M1 Pro (T6000), M2 (T8112): no MMU: L3 pages over CTRR_ line, because their system registers are unlocked. Boot otherwise unchanged.
  • M4 Pro (J616s, T6040), A18 Pro (Neo, T8140): the boot log shows whether either range is armed. If one is, it is mapped with L3 pages and the desktop boot is unchanged.
  • M4 Air (J713, T8132), now in our lab: the same check. This covers the T8132 row you didn't have.

Assisted-by: LLM (Claude:Opus 5.5)

@sithglan

Copy link
Copy Markdown
Contributor Author

Correction to my J873g row above: under main + this commit, HDMI did not come up. Only the two USB-C displays worked. The main DCP's firmware asserted when Linux took it over (DCP firmware crashed, no disp0-service). The HDMI EIZO kept simpledrm's boot framebuffer, and I had counted that as the third display. I've fixed the description.

This commit doesn't cause it. Main's T8152 hand-off leaves the endpoints aura started for HDMI running and doesn't report them, so apple_dcpib INITs a live endpoint. #419 reports them. With #419 on top of this commit, HDMI comes up at 2560x1440 alongside both USB-C displays.

iBoot can arm CTRR_C and CTRR_D over physical ranges that L2 blocks
would cover: on T8152 it arms CTRR_C over the 48 KiB below its
top_of_kernel_data, above the boot object. mmu_map() keeps L3 pages
only below aura's base, so on a boot where that range lands above the
next 32 MiB boundary it sits in an L2 block. A secondary that walks such
a block takes an address size fault at level 2 (seen on CPU 0, a
secondary there: the J873g boots on CPU 6, as its first stack access
after mmu_init_secondary_local()), and the payload path's
smp_start_secondaries() then brought the machine down. The boot core
uses the same block without a fault. Whether it hits depends on where
iBoot places the object: 5 of 10 boots of the M6 mini (27.2), each time
CTRR_C was inside an L2 block.

Main hits it on the J873g too: chainloaded with boot= from the ESP, CPU
0 (MPIDR 0x80000000) faulted in fb_console_scroll() while
cpufreq_init() printed, on the framebuffer write at 0x1000fa12010 (ESR
0x96000002) in the L2 block that holds CTRR_C, before the handoff.

Build exactly the L2 blocks whose output range contains an armed CTRR_C
or CTRR_D from L3 pages, as mmu_map() already does for the firmware's
read-only range. Testing the output address covers every virtual alias
of the RAM, and the cost no longer depends on where iBoot puts the
range. The ranges are read once, and only with locked Apple system
registers, as kboot reads them; an absent or unarmed range changes
nothing, and each armed one is logged ("MMU: L3 pages over CTRR_C
[...)"). With this, main boots the J873g desktop kernel from the ESP
with all twelve CPUs.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
@sithglan
sithglan force-pushed the thomas/t8152-ctrr-c-l3 branch from 5935898 to d1322d6 Compare November 21, 2026 00:59
@sithglan

Copy link
Copy Markdown
Contributor Author

@RyanTheTide thanks. The L1 point is in d1322d62, as a comment on the L1 branch of mmu_map(): the CTRR split checks L2 blocks only, so it relies on 16K having no L1 blocks, and a 4K build would map an armed range there with an L1 block. Nothing else changed (format-check is clean).

Thanks for lining up the M1 Pro, M2, M4 Pro, A18 Pro and J713 rows.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed d1322d6. Approving the code:

  • Only L2 blocks whose output range intersects an armed CTRR_C/D get L3 pages (src/memory.c:498 plus mmu_holds_ctrr()), so every RAM alias is covered, and the cost doesn't depend on where iBoot puts the range.
  • Nothing is read with unlocked Apple system registers (:428), the same rule kboot uses.
  • ro_start/ro_end are only read under split_ro.
  • Unmaps never split.
  • The L1 note covers the 4K case.

This is stage-wide page-table code, so it needs rows on this head (or its merge with main) before merging. Each Mac chainloads it as Stage 2 and boots to the desktop. Pass on every Mac: all CPUs online, no SError or abort in the aura log, and boot otherwise unchanged:

  • M1 Pro (T6000) and M2 (T8112): no MMU: L3 pages over CTRR_ line, since their sysregs are unlocked.
  • M4 Pro (J616s, T6040), A18 Pro (J700, T8140), M4 Air (J713, T8132) and M5 Pro (J714s, T6050): the log shows whether either range is armed. Where one is, it's mapped with L3 pages.

The J873g row (with and without the commit) is in. CI on this head is still queued.

Assisted-by: Claude Opus 5.5

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks. The L1 note in mmu_map() in d1322d6 covers the 4K case we raised, and nothing else changed, so our points are resolved.

We'll run d1322d6 as Stage 2 on our M1 Pro, M2, M4 Pro and A18 Pro and post the rows here: all CPUs online, no SError or abort in the log, and on the M4 Pro and A18 Pro whether a CTRR range is armed and mapped with L3 pages.

@RyanTheTide

Copy link
Copy Markdown
Contributor

J713 (13" MacBook Air M4, T8132, 27.2 stub) row on d1322d6 merged with main a4df613 (Stage 2 1.0.0b13-gd92526a1). It ran as an aura-try one-shot of the J713's configured Stage 2 with only the aura head swapped, booted to Linux on the default kernel.

  • CTRR_C is armed on this Mac, and the new path takes it: FDT: reserved M4+ SMP-RO CTRR_C [0x1000fa1c000, 0x1000fa28000) then MMU: L3 pages over CTRR_C [0x1000fa1c000, 0x1000fa28000).
  • All 10 CPUs are online (present 0-9, online 0-9).
  • No SError, abort or exception in the aura log or dmesg.
  • Enforcing, 0 failed units, 0 AVC, NVMe root, 0 DART faults.

The boot is otherwise the same as main a4df613 on the same setup, which showed the same CTRR_C reservation without the L3 line.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

J616s (M4 Pro, T6040) row on d1322d6 merged with main a4df613 (Stage 2 1.0.0b13-g2a2cc857), as an aura-try one-shot on the fleet kernel, booted to the desktop.

  • 14/14 CPUs online. No SError, abort or exception in the aura log. Enforcing, 0 failed units, 0 AVCs, 0 kernel errors, 0 DART faults, NVMe and Wi-Fi up.
  • Both ranges are armed on this boot. kboot logs reserved M4+ SMP-RO CTRR_C [0x1000f658000, 0x1000f664000) and CTXR_D is armed at [0x10005cb0000, 0x1000efb0000).
  • The one-time MMU: L3 pages over CTRR_ line isn't in the log Linux reads back. The Stage 2 log buffer had wrapped (the text kept starts at about 6.8 s), and that line is printed earlier, at the first RAM mapping. A boot with a serial console would show it.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

M1 Pro (J316s, T6000) row on d1322d6 merged with main 83d2841 (Stage 2 1.0.0b13-g6ea18260), as an aura-try one-shot on the fleet kernel, booted to the desktop.

  • 10/10 CPUs online. No SError, abort or exception in either stage's log.
  • No MMU: L3 pages over CTRR_ line. This Stage 2 log is complete from MMU: Initializing... on, so the line is really absent, as expected with unlocked system registers.
  • Enforcing, 0 failed units, 0 AVCs, 0 kernel errors, NVMe and Wi-Fi up, 0 DART faults, camera streams (90/90 NV12 frames).

The J616s row is above.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

M2 (J413, T8112) row on d1322d6 merged with main 83d2841 (Stage 2 1.0.0b13-g6ea18260), as an aura-try one-shot on the fleet kernel, booted to the desktop.

  • 8/8 CPUs online. No SError, abort or exception in either stage's log.
  • No MMU: L3 pages over CTRR_ line. The Stage 2 log is complete from the start, so the line is really absent (unlocked system registers).
  • The Stage 2 log matches a plain main 83d2841 trial apart from the version string and CPU start-up timestamps. Enforcing, 0 failed units, 0 AVCs, 0 kernel errors, NVMe, Wi-Fi and the internal panel up, 0 DART faults.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr

Copy link
Copy Markdown
Contributor

J700 (MacBook Neo, A18 Pro, T8140, macOS 26.6.2 firmware) row on d1322d6 merged with main afc8ec1 (1.0.0b13-gcc058ee0). The Stage 2 was the ESP Stage 2 from this head's build run 44847399589, aura.bin sha256 c6c71c063ad35c798faa380efaff4354baeac8c94cc9c52c69b3b5c269b31418. It ran as an aura-try one-shot behind the installed Stage 1 (1.0.0b8), with the configured Stage 2's DTB, U-Boot and options tail kept byte for byte. It booted to the desktop on the fleet kernel, 7.3.0-41.fc44.aurora.aarch64.

  • CPUs: all 6 started in Stage 2 (Starting CPU 0..3, 5 ... Started, MPIDR ...). Linux has present 0-5, online 0-5.
  • No exceptions: neither stage's log has an SError, abort or exception line. Linux has no Oops or internal error, and 0 DART faults.
  • Range armed on this boot: CTRR_D. kboot logs CTXR exec: CTXR_D is armed at [0x10005004000, 0x1000e2d8000): secondaries are confined at EL2, then FDT: reserved CTXR_D [0x10005004000, 0x1000e2d8000) less the OS window. No CTRR_C (SMP-RO) reservation is logged; the firmware RO range is reserved as on the configured Stage 2.
  • The L3 line isn't readable here. The one-time MMU: L3 pages over CTRR_ line isn't in the log Linux reads back. As on the J616s, the 16 KiB Stage 2 log ring has wrapped: the text kept on this boot starts at 7.48 s, and the line is printed earlier, at the first RAM mapping. A serial console would show it.
  • Clean boot: Enforcing, 0 failed units, 0 AVCs, 0 new kernel errors against the default boots, NVMe up, PMU panic count 0, GPU up.
  • Restore: back on 1.0.0b13-g5dcf62d0, and the ESP is byte-identical.

The one-shot boot added rd.emergency=reboot panic=30 watchdog.open_timeout=150 to its own kernel command line as a dead-man.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide
RyanTheTide merged commit 9dfa46c into aurora-silicon:main Nov 21, 2026
15 checks passed
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merged. Thanks, @sithglan. Rows on this head: J713 and J616s (an armed range mapped with L3 pages), M1 Pro and M2 (no range, logs identical to main), Dj's J700, and your J873g. Nothing has touched memory.c on main since those rows. #301's J873g cold-boot row can run on main now.

@RyanTheTide

Copy link
Copy Markdown
Contributor

A18 Pro (J700) row after the merge: main 6affb8e as the Stage 2, as an aura-try one-shot on the fleet kernel, booted to the desktop.

  • 6/6 CPUs online. No SError, abort or exception in the aura log. Enforcing, 0 failed units, 0 AVCs, 0 kernel errors, NVMe, Wi-Fi and the panel up, 0 DART faults, s2idle 3/3.
  • kboot reports CTXR_D is armed at [0x10005004000, 0x1000e2d8000). As on the J616s, the one-time MMU: L3 pages over CTRR_ line is outside the Stage 2 log that Linux reads back (the buffer had wrapped).

Assisted-by: LLM (Claude:Opus 5.5)

term-guy pushed a commit to term-guy/aura that referenced this pull request Nov 23, 2026
…50 handoff bounds

Three merged changes had no test in the tree. Each gets a host test
that builds the code unchanged, with the registers, the ADT and the
device tree as stand-ins:

- test_mmu_ctrr_l3.py (aurora-silicon#411): the page-table builder of memory.c and
  ctxr_range() run on host memory with 16K pages. An L2 block whose
  output range holds an armed CTRR_C or CTRR_D is built from L3 pages,
  in every alias of the RAM, and no other block is. The ranges are read
  once, and not at all with unlocked Apple system registers, off EL2 or
  for an unmapping; a register that faults under the guard changes
  nothing. Seeded layouts are compared with a model of the mapping rule.
- test_sptm_virt_cpu_ids.py (aurora-silicon#407): the S2R trace's walk of /cpus, the
  stop-mode and go-mode core masks and the DCC transport's per-core
  cookie and errno, each driven with cpu-ids on both sides of 32, up to
  MAX_CPUS - 1.
- test_t6050_handoff_bounds.py (aurora-silicon#408): a panel-less board through
  dt_set_display_handoff(), and the panel path's ADT checks. A boot
  framebuffer that starts at or past the end of /vram, and a bandwidth
  scratch in a PMC metadata block of under 4 bytes, are refused and the
  device tree is left as it was; the edges on the allowed side are
  still handed off. Seeded cases are compared with the rule in whole
  numbers, which cannot wrap.

Each test takes another source through an environment variable
(AURA_MMU_SOURCE, AURA_SPTM_SOURCE, AURA_T6050_SOURCE), so the same
file can be run against a changed copy as a negative control.

No production code changes.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
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.

3 participants