From a7a8067a319bff694a47640a2a14a8d4ba1dca6c Mon Sep 17 00:00:00 2001 From: Diljit Singh Date: Fri, 20 Nov 2026 19:17:24 -0500 Subject: [PATCH] kboot: hand the T8132 AOP over by its properties, not by board dt_set_t8132_aop() only ran on the J713 and J604 trees and returned early on any other T8132 board, leaving its AOP node enabled with no firmware memory-region. On the J773g (Mac mini), whose tree requests the AOP handoff in linux-enablement-mac,dapf-handoff like the laptops, the AOP driver then fails with "No firmware memory-region from the bootloader" (-ENOENT). Its headphone jack and speaker both run on the AOP's audio service, so the machine has no sound card on either the 26.6.2 or the 27.2 firmware. Everything the handoff needs is a property: the tree's request, a halted AOP, the ADT's firmware segments and the AOP DART's DAPF instance. Drop the board list, as asked in review of #310, and keep every refusal disabling the AOP, so the gate stays fail-closed. The same segment reservation also covers the 27.2 firmware's new __EDATA segment, which sits at its remap address right after __ETEXT (EC0p + 0x8000 on the J773g's 26B123 ADT). Signed-off-by: Diljit Singh --- src/kboot.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/kboot.c b/src/kboot.c index 73c770ee5..c0955dbb8 100644 --- a/src/kboot.c +++ b/src/kboot.c @@ -9681,7 +9681,7 @@ static int dt_setup_sio(void) #define T8132_AOP_DAPF_WINDOWS 16 /* - * The J713 AOP firmware reaches its DAPF windows (MMIO) through its DART at + * The T8132 AOP firmware reaches its DAPF windows (MMIO) through its DART at * their physical addresses: reserve them there, so that the OS maps them in * the AOP's DART before it starts the firmware. */ @@ -9719,23 +9719,23 @@ static int dt_reserve_t8132_aop_windows(const char *path) } /* - * J713 and J604: iBoot leaves the AOP halted, its DART's DAPF empty, its - * external code (__ETEXT) in DRAM at a fixed address and its log (__OS_LOG) at - * a new one every boot. When the OS asks for the AOP's handoff, program the - * DAPF, then reserve both segments at the IOVAs the firmware uses (their remap - * addresses: EC0p for __ETEXT, the physical address for __OS_LOG) and the - * DAPF windows. Without all of it the firmware cannot run, so on any failure - * the AOP is disabled. + * T8132: iBoot leaves the AOP halted, its DART's DAPF empty, its external code + * (__ETEXT) in DRAM at a fixed address and its log (__OS_LOG) at a new one + * every boot; the 27.2 firmware adds its external data (__EDATA) after + * __ETEXT. When the OS tree asks for the AOP's handoff, program the DAPF, then + * reserve the DRAM segments at the IOVAs the firmware uses (their remap + * addresses: EC0p for __ETEXT and the address after it for __EDATA, the + * physical address for __OS_LOG) and the DAPF windows. The board does not + * matter, only the tree's request, the halted AOP and the ADT's segments and + * DAPF instance; the J713, J604 and J773g (whose headphone jack and speaker + * run on the AOP) all state the same contract. Without all of it the firmware + * cannot run, so on any failure the AOP is disabled. */ static int dt_set_t8132_aop(const char *path) { const char *why; int node; - if (fdt_node_check_compatible(dt, 0, "apple,j713") && - fdt_node_check_compatible(dt, 0, "apple,j604")) - return 0; /* No other M4 board's AOP handoff is qualified. */ - int chosen = fdt_path_offset(dt, "/chosen"); if (chosen < 0 || fdt_stringlist_search(dt, chosen, "linux-enablement-mac,dapf-handoff", "/arm-io/aop") < 0) {