Skip to content

u-boot: merge the fleet branch into main - #76

Open
RyanTheTide wants to merge 160 commits into
mainfrom
aurora-wip
Open

RyanTheTide wants to merge 160 commits into
mainfrom
aurora-wip

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What: Merge the fleet U-Boot branch into main. This brings the tested Apple boot support and the GRUB editor and shell cursor to the default branch, while preserving both branch histories.

Tested: J413, J473 and J616s booted c2a5cbc629a6 in guarded Stage 2 trials and restored their saved fleet89 systems. J316s ran the same source tree. A build of the proposed merge and a build of the branch produced byte-identical loader binaries and configurations. The Apple build matrix passed at the branch tip.

Risk: Two-way door · Apple Silicon boot. This brings in the loader already tested with the fleet. Future cuts from main will use its code.

Not yet: Formal integration review and resolution of the history check.

Details

The branch tip is c2a5cbc629a69066ac8b79ec0d700b172c19d1bf. It contains the prior fleet loader and brings its existing MTP handoff and cursor changes. The conflict-free merge preview against 6dc5446b50bb5dde50405a8122a1604c9aa82119 produced tree 82dccb279abc35a1e24dd9db7c6f5a3b66950a83. The preview differs from the fleet branch only in five repository policy and CI files, with all loader build inputs identical.

This integration preserves the published commits from before 24 November 2026. The history exception covers the 45 flagged commits already on aurora-wip, beginning at c9d8521a8434 on 23 October and ending at d5433e7878fb on 11 November UTC. The current title and body and any newer commits remain subject to the standard checks.

Evidence
  • J413 (T8112, 13.5 firmware) booted with an active internal display and render node and reached 243 seconds with zero failed units or kernel errors. The saved entry and original Stage 2 were restored.
  • J473 (T8112, 27.2 firmware) reached 244 seconds with both external displays active and its render node present. The saved entry, firmware loader and boot options were restored with zero failed units. The existing systemd start-order issue reproduced on both sides.
  • J616s (T6040) reached 242 seconds Enforcing with zero failed units and restored the original signed fleet89 boot. J316s (T6000) verified cursor operation on the same source tree.
  • GCC 16.1.0, apple_m1_defconfig, fixed build epoch. Both loader binaries were 764,992 bytes with SHA-256 2522e92420ccd773f93bb1cf70161b3845c2c0a52a9d495197abc3a9749705dc.

Prior hardware and cursor results · MTP handoff · Apple builds

erykwieliczko and others added 30 commits October 20, 2026 17:40
Describe the M4 I/O windows and every supplied DRAM bank, then reuse the
internal-ESP EFI flow and companion m1n1 ANS handoff. Leave J713 HID
discovery to Linux and cover split storage BAR and PCIe map containment.

Assisted-by: LLM
Initialize the shared RTKit helper with the qualified system endpoints,
service late startup requests and wait for a pending HID header without
consuming FIFO bytes. Retain the exact buffer inventory and DART bypass
only after publishing the complete handoff on a scratch device tree.

Optional first-publication failures disable input and continue boot.
Refuse a failed later candidate while preserving the prior published
session and device tree for EFI fallback. Build the startup path only
when the MTP helper is available. Linux owns HID discovery.

Assisted-by: LLM
Document companion bootloader/kernel dependencies, retained buffer
ownership and the bootloader console/input qualification limits.

Assisted-by: LLM
Let an explicitly marked J713 OS device tree retain its static topology
while importing this boot's validated firmware resources. Translate
phandles and prepare changes on a bounded scratch tree before publishing
the retained input session and completion marker.

Enable the importer through APPLE_J713_FDT in apple_m1_defconfig. Enforce
the resolved FDT padding minimum when that capability is enabled while
preserving other Apple defconfigs and the original fallback tree.

Include EFI fixup integration, protocol documentation and production-
importer host regressions with the implementation.

Assisted-by: LLM
Carry the boot source's per-machine Bluetooth address/calibration and
banked T8132 USB3 PHY calibration into matching per-kernel device trees.
Keep the OS topology and its admission policy authoritative: disable
Bluetooth if its source calibration is incomplete, discard stale PHY
calibration and retain explicitly USB2-only ports without extending
their resources. Validate each USB3 record against its target bank.

Import optional multifunction AUX calibration when available. Preserve
USB-only operation when the source does not provide that property.
Extend importer tests with source comparisons, bank/length/alignment
rejections, USB2 fallback and optional AUX cases.

Signed-off-by: Eryk Wieliczko <[email protected]>
Assisted-by: Codex:GPT-6
Use the shared announcing-interface transport on J713, which includes STM,
and enable only the discovered keyboard interface. Preserve validated INIT
packets and the original keyboard READY event for Linux. Retain the live
RTKit helper and DMA backing through the existing typed OS handoff.

Require prepared input before keyboard probing, avoid a failed helper boot
retry, and tolerate a stopped helper during EFI input polling. Freeze buffer
requests once the OS inventory is published. Bound draining and replay, check
FIFO space and observed writer interference, and refuse an incomplete cache
instead of silently dropping discovery. Stop explicitly on a damaged published
session, since EFI and booti ignore device removal errors. Keep J813 excluded.

Cover production discovery, command CRC, key delivery, readiness replay,
helper admission, stopped polling, immutable buffer inventories, failed and
partial handoffs, insufficient FIFO space, competing-producer detection and
nonreturning refusal after published handoff or DART retention failures.
MMIO, time and helper removal are host boundaries; real EFI input and Linux
keyboard/trackpad acceptance require the separate reboot test.

Signed-off-by: Eryk Wieliczko <[email protected]>
Assisted-by: Codex:GPT-6
arm: apple: add J713/T8132 (M4 MacBook Air) boot support
ft_board_setup() now returns the error of apple_rtkit_helper_fdt_fixup().
On J713 that is wanted: a refused handoff must not reach Linux. On other
machines, the T8140 MTP among them, a failed fixup used to cost only the
running-session handoff. Now it fails the FDT fixup, so the boot stops.

Keep the error fatal on J713 only. Elsewhere, log it and continue, as
before.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
arm: apple: Keep booting when the helper OS fixup fails outside J713
The SPI keyboard driver registers itself as "spikbd", but the default
environment lists "spikbid", so iomux skips it and the built-in keyboard
of SPI-keyboard Macs (the M1-family laptops) gives no input at the U-Boot
prompt or boot menu. The typo came in with the MTP keyboard support;
Asahi's rebased version of that commit (812c17b, in the
asahi-v2026.07-2 release) lists spikbd.

Fixes: 01e3985 ("input: apple: Add support for Apple MTP keyboard")
Signed-off-by: Marcelo Alcantara <[email protected]>
board: apple: Name the SPI keyboard spikbd in stdin (aurora-wip)
m1n1 now hands the J713 AOP over as on T6040: it programs the AOP DART's
DAPF, reserves the firmware segments (__ETEXT, and __OS_LOG, which iBoot
places anew at every boot) and the DAPF windows, and lists them in the
control tree AOP's memory-region, or disables the AOP. The importer
already copies those reservations; reference them from the OS tree's AOP
too, or disable the AOP there when m1n1 did not hand it over.

An OS tree whose AOP lists its own memory-region (older kernels, whose
driver programs the DAPF itself) keeps it. In an OS tree without an AOP,
the reservations have no owner, as for an omitted display.

The host test covers a handoff, an AOP m1n1 disabled or never had, a
malformed reference (refused without changes), an OS tree with its own
regions, an OS AOP at another path and an OS tree without an AOP.

Tested on J713 (MacBook Air 13" M4) with that m1n1 and a kernel taking the
T6040 AOP path: the AOP gets the 17 regions and starts, and the
microphones, headphone jack and speakers work.

Signed-off-by: Erik Bourget <[email protected]>
Consolidate the public main branch into the bleeding-edge Aurora line
while retaining aurora-wip's platform support.

Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
The SEP driver registers with the enclave using this boot's local-policy
and iBoot manifests, and refuses to attach without them. m1n1 publishes
them on the node the sep alias names. Copy both into the per-kernel tree
when it names an apple,sep node. A manifest this boot did not publish,
including from a control tree without the SEP, is removed from the OS
tree so that an older copy never reaches the driver. An OS tree without
the SEP imports as before; a sep alias that is not apple,sep on either
side refuses the transaction.

Add host regressions: both manifests replacing stale OS copies, each one
missing, mismatched nodes, and trees without the SEP on either side.

Signed-off-by: Erik Bourget <[email protected]>
Map the T6040 I/O range and boot it with the Aurora EFI flow used on
T8140 and T8132. Every register block below DRAM in the J616s devicetree
lies in 0x2_0000_0000 to 0x6_0000_0000 (the APCIE ECAM at 0x1c_b000_0000
is not used by U-Boot); the RAM banks and the framebuffer come from the
m1n1-prepared FDT, as on T8140, so the MMU maps every bank m1n1 reports
(GPU UAT ranges included).

Leave the T6040 MTP to Linux: its helper and the DockChannel keyboard do
not bind, so U-Boot never starts the coprocessor that Linux's MTP driver
boots itself.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The T6040 ANS is a post-M4 controller (adopted from the boot loader,
never restarted), but its "nvme" register block ends at 0x10000:
LINEAR_SQ_CTRL and the linear submission queue doorbells sit at the same
offsets in the NVMMU block, and the firmware enables the linear queues
itself. Match apple,t6041-nvme-ans2, ring the doorbells through the NVMMU
block there and leave LINEAR_SQ_CTRL as the firmware set it, as m1n1
(0d2ded8b) and Linux's apple,t6041-nvme-ans2 entry do. Only namespace 1
is exposed, as on the other post-M4 controllers.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
In the apple,dockchannel-uart binding the "data" reg entry is the
channel's own data window, and apple,channel is the channel's index in
the shared interrupt mask and flag registers (bits 2n and 2n + 1). The
driver added apple,channel * 0x10000 to the named data window as well,
so on a DT with a non-zero apple,channel (the J616s KIS console is
channel 2) it would write outside the channel. Use the named data window
as it is; the offset still applies to the compact form that only names
the shared window.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The boot loader names its ESP in /chosen/asahi,efi-system-partition, and
U-Boot boots EFI/BOOT/BOOTAA64.EFI from it. On a Mac whose stub ESP
(where Stage 1 finds Stage 2) is not the ESP of the installed OS, that
ESP has no EFI boot loader and the boot falls through to bootflow, while
Linux, told the stub ESP, looks for its vendor firmware in the wrong
place. The J616s is such a Mac: Stage 1 names the AURORA ESP, and Fedora
lives on its own ESP.

Keep the named ESP whenever it has the EFI boot loader (or no ESP has
one). Otherwise use the first ESP on the same disk that has it, and tell
the OS that ESP in /chosen/asahi,efi-system-partition, so its firmware
loader (asahi-scripts) and boot files are found where they were
installed.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
U-Boot's PCIe driver probes the APCIE when a boot falls through to a
bootflow scan; without a mapping for the ECAM it took a synchronous
abort at 0x1c_b000_0000. Map the ECAM and both endpoint windows from the
J616s devicetree, as on J713.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
m1n1 and Linux program the NVMMU base of both the admin and the I/O
submission queue TCB arrays before they enable the controller. U-Boot
programmed the I/O one only when it created the I/O queue, after the
enable. Allocate each TCB array once, 16 KiB aligned as m1n1 and Linux
place them, and on post-M4 controllers program both bases when the admin
queue is set up.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
On the J616s the boot loader hands the ANS over running (CPU_CTRL.RUN,
BOOT_STATUS ok) but with the controller disabled and its RTKit session
asleep: U-Boot's adoption then waits for CSTS.RDY until the watchdog
fires. Linux in the same chain finds the controller disabled, does not
adopt, and wakes the firmware (apple_rtkit_wake(): IOP power state INIT,
then the boot handshake) without resetting the coprocessor.

Do the same on T6040 when the inherited controller is disabled: run the
RTKit handshake with our own SART-backed buffers, wait for BOOT_STATUS,
then program the controller as on adoption. At handoff, leave the ANS as
it was found (controller shut down and disabled, RTKit asleep, CPU
running), so Linux wakes it with its own buffers as it does today.
Controllers handed over enabled are still adopted.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The previous commit woke a T6040 ANS that the boot loader hands over
before the OS-side RTKit handshake and put it back to sleep at handoff.
Linux cannot use that: the firmware takes the HELLO/EPMAP handshake once
per run (Linux in the plain m1n1 chain logs "RTKit: Initializing" and a
cold "boot: mode normal"), and after U-Boot ran it neither sleeping, AP
quiescing nor stopping the IOP lets Linux's wake reach endpoint
discovery again (all three tried on the J616s: -ETIMEDOUT).

So hand the session on live, as Linux expects from a post-M4 boot
loader: after the handshake the controller is set up as on adoption, and
apple_nvme_remove() takes the existing post-M4 path, leaving the
controller enabled and ready for nvme-apple to adopt. The RTKit buffers
the firmware keeps writing come from LMB, are never freed, and are
published to the OS as no-map /reserved-memory nodes (ans-rtkit@...) by
apple_nvme_fdt_fixup(), called from ft_board_setup(); their SART entries
stay in place.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The per-kernel import refuses a source tree larger than 128 KiB. m1n1's
J713 tree is the OS DTB plus its handoff additions: 126,328 bytes with a
7.3 J713 DTB, so 4.7 KiB under the bound. A tree that also carries the
SEP node and its two boot manifests (about 10 KiB more) was refused
with -EINVAL, and the boot stopped with no console.

Raise the bound to 192 KiB. The required SYS_FDT_PAD becomes 208 KiB,
which apple_m1_defconfig's 256 KiB already provides. Add a regression
for a source of about 160 KiB.

Signed-off-by: Erik Bourget <[email protected]>
The T6040 firmware takes the OS-side RTKit handshake once per boot; every
later owner has to adopt the live session (after U-Boot ran it, Linux's
wake times out at endpoint discovery, and after an m1n1 Stage 1 ran it,
U-Boot's handshake times out the same way).

Only run the handshake when no OS-side owner has programmed the
controller yet: CC.EN clear and both the NVMMU admin TCB base and the
I/O queue aperture still zero, as iBoot leaves them. An m1n1 stage that
ran the handshake leaves them set when it disables the controller, and
that session is adopted as on the other post-M4 controllers.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
arm: apple: T6040 (M4 Pro, J616s) production boot
Apple Macs have no debug UART that U-Boot can rely on. The serial ports
in the tree m1n1 hands over are optional: the J616s device trees from
linux integration/aurora disable both the s5l UART and the DockChannel
UART. REQUIRE_SERIAL_CONSOLE (default y) then makes U-Boot panic with
"No serial driver found" before it prints anything, so a Stage 2 built
with such a tree stopped after m1n1's logo: no USB, no network, GRUB
never ran, and the PMU panic counter read 1.

Disable REQUIRE_SERIAL_CONSOLE, as its help text advises for boards
with no debug serial port. U-Boot runs without a console when the tree
has none and keeps using the UART when one is described.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
configs: apple_m1: boot without a serial console
The logo is drawn at the top right of the display, over the first rows of
the text console. Lines rewritten in place, such as the autoboot
countdown and the bootflow scan, clear to the end of their row, so they
blank a full-width band through the logo. With the double-size font on
HiDPI displays that is one 32px row across the "U-Boot" lettering.

After showing the logo, move the console cursor to the first text row
that lies wholly below it, so text never shares a row with the logo.
Displays without the logo are unchanged.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Starting the console below the logo left the top of the screen empty
beside it. Keep the text at the top, beside the logo, and keep it out of
the logo's columns instead.

After showing the logo, narrow the console so that it ends a small margin
left of the logo: text wraps there, using the width the console drivers
already wrap at. The normal console now clears and scrolls rows only up
to the console's width, so a rewritten line (the autoboot countdown
clears its whole row) ends at the logo's edge and scrolling never moves
the logo. A full-width console takes the same path as before.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Aurora EFI defaults already skip "usb start" and limit boot_targets
to the internal NVMe, so the one second autoboot countdown is now the
largest fixed wait left in U-Boot.

Set bootdelay to 0 instead. Autoboot still polls the console once with
a zero delay, so holding a key on the serial console (or on the
internal keyboard where U-Boot starts it) still stops at the prompt. A
bootdelay saved in uboot.env still wins.

This applies to every SoC that uses the Aurora EFI defaults (t8140,
t8132 and t6040).

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…irect-reg

fdt: decode /reserved-memory reg directly when ranges is empty
@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 26, 2026 08:51
@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) ci-failing A check failed at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) labels Nov 26, 2026
DjDeveloperr and others added 2 commits November 26, 2026 06:15
aura records what each boot stage checked in /chosen/aurora,boot-security
of the devicetree it passes to U-Boot. When a stage enforced, aura's
signature covers U-Boot, but the default build then still read the
saved uboot.env from the ESP, kept the boot delay and the console, and
booted through bootflow, booti or scripts with nothing checked. Only a
U-Boot built with apple_secboot.config boots signed images, and its
seed had to be built in at compile time.

When the record shows an enforcing stage (policy "enforce" on the node
or on a measurement, or state "verified"), the default build now:

- uses the built-in environment: env_get_location() offers only
  ENV_IS_NOWHERE, so uboot.env is neither read nor written. Without an
  enforcing stage a FAT build behaves as before, and the nowhere
  location is not added as its fallback;
- boots at once with no key check (bootdelay -2), ignores Ctrl-C and
  runs no preboot;
- boots only EFI/BOOT/BOOTAA64.EFI from the internal ESP through
  bootefi under UEFI Secure Boot, and resets on failure or return;
- refuses images that fail authentication even in an audit build:
  efi_init_secure_state() asks the new efi_aurora_enforce_policy() hook
  (weak, false) before it chooses CONFIG_EFI_AURORA_SECBOOT_AUDIT's
  audit state, and the Apple board answers from the record;
- refuses to boot when its seed has no PK.

apple_m1_defconfig enables EFI_SECURE_BOOT (with FIT and FIT_SIGNATURE,
which it depends on), the audit mode, ENV_IS_NOWHERE and a preseed of
board/apple/mac/uefi-seed.var: an empty variable seed in a fixed 16 KiB
region ending in the marker AURORA-UEFI-SEED, its size and version,
which aurora-secboot fills with the owner's keys before it signs
Stage 2. Without keys Secure Boot stays off and the boot is unchanged;
with keys and no enforcing stage it audits. EFI_AURORA_MEASURE records
each image, as before.

tools/apple_secboot_seed.py now writes the same region, so a seed built
into an apple_secboot.config build can be refilled and checked the same
way; tools/aurora_uefi_seed.py checks an image, and CI runs it on the
apple_m1 build.

lib/efi_loader/Makefile: the seed's dependency prefixed $(srctree) even
to an absolute path, so the absolute seed path apple_secboot.config asks
for could not build; a relative path now also builds with O=.

doc/board/apple/m1.rst describes the policy.

Signed-off-by: DjDeveloperr <[email protected]>
apple: follow Aura's enforce policy in the default build
@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) labels Nov 26, 2026
@RyanTheTide

RyanTheTide commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

GRUB console alignment. U-Boot's ANSI handler on 5445237 changed the line origin when GRUB positioned its centered EFI text heading. Carriage returns then inherited that offset. The line-origin fix a77367c from #74 is already included in this branch.

Tested. J473 ran the same signed Fedora GRUB 2.12-66.fc44, Aura and DTB on 5445237 and the exact integration head 84382f6. Both KIS transcripts contain the GRUB shell and two echo outputs. Both FAT readbacks contained 4,423,680 bytes of the 1920×1080 framebuffer (7680 bytes per row, x2r10g10b10) and matched the on-device hashes. The centered heading starts at x=888 in both. Help moves from x=912 to x=24. The old final prompt is at x=128 and a duplicate remains at x=888. All three surviving prompts on the PR head are at x=0.

Controlled replay and additional boot measurements

An isolated replay with only a77367c applied and the same signed GRUB executable gives prompt X=248/128 on 5445237 and 0/0 with the fix. Independent 2560×1664 and 2560×1600 QEMU controls match J713's exposed and trimmed dimensions, stride 10240. Both give the same prompt results within each loader. The installed signed GRUB binary from J713 and J473 is SHA-256 c403bc8b58aa6462f13258b5b7229578f9b616045e776d50a77cf06dafeddd7c.

On J615, the exact same loader head captured the installed GRUB shell over M1 Pro Left Back KIS with the notch exposed (2880×1864) and hidden (2880×1800). Both retained stride 11520 and x2r10g10b10. The 6,289,920-byte framebuffer readbacks matched their on-device SHA-256 digests. The first 384 decoded pixel rows are identical between modes. All three prompts start in the first 16-pixel cell (first bright pixel x=1). Help has its three-cell indent (first bright pixel x=49).

Review. Please include the EFI console origin and the two physical capture sets in the independent integration review.

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Nov 27, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: FINISH, then merge at 84382f65f6725263f1bdb3c9594607cef610e0a7

Blocker: Required PR-text CI is red on the preserved history. Obtain the Owner disposition for this exact head and rerun the check. The previous disposition covered c2a5cbc6. Keep the public branch history intact.

Checked: Reviewed the EFI line-origin change and its integration in the current console source. ANSI positioning uses the existing text origin and moves the cursor without redefining where carriage return lands. The later cursor code retains that separation. The exact-head J473 A/B shows the final prompt moving from column 128 to 0. The J615 exposed and hidden rows both place all three prompts at 0. Confirmed the integration can be merged cleanly against the recorded main base. The two changes added after the earlier history disposition are #75 and #78, which have their own feature rows. Apple builds and readiness pass. This verdict covers the requested console change and integration check. Preserve the Owner security/history gate for rollout.

…locations

rtkit_helper_read_dma_window() reads apple,dma-range from the helper's DART node and rtkit_helper_alloc() uses it as a physical LMB allocation ceiling because U-Boot runs the DART in bypass mode.

That works when apple,dma-range overlaps physical RAM (e.g. T8122/T8140 where DRAM starts at 0x10000000000 and the window covers the low 4 GiB), but fails on T8112 (M2 / J413) once Aura propagates /arm-io/dart-mtp's 32-bit translated IOVA window [0x4000, 0xffff4000) into apple,dma-range: DRAM on T8112 starts at 0x800000000, so lmb_alloc_mem() below 0xffff4000 always returns NULL. On macOS 27.2 firmware, rtkit_helper_probe() then aborts after setting REG_CPU_CTRL_RUN, burning the one-shot MTP epoch and leaving Linux without keyboard or trackpad (-ETIME).

Only constrain physical bypass allocations to apple,dma-range when the window overlaps [gd->ram_base, gd->ram_top), falling back to normal DRAM allocation otherwise. Add a host unit test covering T8112, T8122/T8140, above-RAM, and overflow ranges.

Signed-off-by: Satya Benson <[email protected]>
The USB keyboard driver polls keyboards with usb_int_msg(..., nonblock = true)
from tstc() / efi_cin_check() every ~20 ms, including inside GRUB's
EFI_BLOCK_IO_PROTOCOL.ReadBlocks() disk reads via efi_timer_check().

Previously _xhci_submit_int_msg() ignored the nonblock flag and delegated to
xhci_bulk_tx(), which busy-waited XHCI_TIMEOUT (5 seconds) and aborted the TD
whenever an idle USB keyboard NAKed the Interrupt IN transfer. On systems with
an attached USB keyboard (such as Apple Mac mini with 05ac:024f Apple Aluminium
Keyboard), every GRUB read stalled for 5 seconds unless keys were pressed to
satisfy the pending Interrupt IN transfer.

Keep a single persistent Interrupt IN TRB armed per endpoint on xhci_int_tx()
with a DMA-coherent bounce buffer, draining completed events without blocking
and returning -EAGAIN immediately when idle. Stash any interleaved interrupt
completions observed during control, bulk, command, or abort_td event waits so
concurrent transfers never trip BUG_ON or drop keypresses, and release the
bounce buffer in xhci_free_virt_devices().

Signed-off-by: Thomas Glanzmann <[email protected]>
efi_timer_check() previously advanced periodic timers with a single
evt->trigger_next += evt->trigger_time step. After any pause longer than
trigger_time (for example a 5 us console poll timer after a multi-millisecond
disk I/O), trigger_next remained behind now and the callback fired on every
single efi_timer_check() invocation until it caught up.

Clamp periodic timers whose next deadline is still <= now to
now + evt->trigger_time.

Signed-off-by: Thomas Glanzmann <[email protected]>

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at 84382f65f672

Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.

Checked: Reviewed the EFI line-origin change and its integration in the current console source. ANSI positioning uses the existing text origin and moves the cursor without redefining where carriage return lands. The later cursor code retains that separation. The exact-head J473 A/B shows the final prompt moving from column 128 to 0. The J615 exposed and hidden rows both place all three prompts at 0. Confirmed the integration can be merged cleanly against the recorded main base. The two changes added after the earlier history disposition are #75 and #78, which have their own feature rows. Apple builds and readiness pass. This verdict covers the requested console change and integration check. Preserve the Owner security/history gate for rollout.

Follow-ups (not blocking): owner disposition for this head's history so pr-text passes; keep owner security/history gate for rollout

…ange-ram-overlap

arm: apple: ignore non-RAM apple,dma-range for bypass RTKit helper allocations
@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) ci-failing A check failed at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) labels Dec 1, 2026
usb: xhci: implement non-blocking interrupt IN transfers to fix GRUB stalls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blast:all Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.