Repository navigation
EDAC: Add Apple SoC platform error reporting - #1040
Conversation
Register the T6041 and T8140 platform-error and event-log interrupt groups with EDAC. Report fatal sources as uncorrectable errors before entering the normal panic path, allowing configured pstore backends to retain the report. Leave the DCS thermal-loop interrupts unclaimed and avoid undocumented register writes. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
No acknowledge contract is established for the error-handler and event-log status registers, so a source cannot be cleared from Linux. Panicking on the first delivery would turn any benign or stuck line into a dead machine. Count each delivery as an uncorrectable error in the EDAC core, log it rate-limited, and mask the line. Unmask it again after a backoff that doubles from 1 s to 60 s; a line still asserted after eight backoffs stays masked. A quiet minute restarts the backoff. Move the T8140 nodes to the root: they have no reg, so they do not belong on the simple bus. Build the driver as a module in defconfig and enable it in asahi.config. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
A J616s trial boot showed all sixteen AMCC error-handler lines asserted from boot: each re-asserts as soon as it is unmasked, under idle and load alike, while no other source fired. Without an acknowledge contract they cannot be told apart from real errors, so leave them unclaimed like the DCS lines. Name each EDAC control after its device: the event-log handler failed to probe with -EEXIST because both handlers registered "apple_soc". Measure a line as cleared from its last unmask rather than its last delivery. With a 60 s backoff ceiling, the old rule reset the retry count on every unmask and never left a stuck line masked. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
|
Hardware results on the J616s (fleet17 kernel, aura-try one-shot Stage 2 = production c3e88ae5 DTB plus only the two handler nodes; production restored after each run, 0 AVC both times). Trial 1 (d1f674d, log and mask with backoff):
Trial 2 (2987097: AMCC unclaimed, per-device name, stuck-line rule measured from the unmask):
Not merging yet. The driver cannot tell a line that is asserted from boot from a real error without the status/acknowledge semantics, and the clean boot-log standard rules out the extra err lines. The next step is Daybreak t-5254: read and clear each source's status, and claim AMCC again only once its semantics are known. Then retest on the same Stage 2 recipe. 🤖 Generated with Claude Code |
An asserted error-handler line is not an error by itself. The J616s hands Linux several lines that are asserted from boot, so log-only reporting either counted them as errors or masked them with warnings. Map the four AMCC and 25 NI status apertures. On delivery, read each source status, acknowledge it by writing the observed bits back, and count an uncorrectable error only when a bit in the platform error policy is set. A delivery with no pending status goes through the existing mask and backoff without being counted. Reclaim the sixteen AMCC lines, now that they are acknowledged. Leave the NSC and NSI lines unclaimed: no returning acknowledge path is established for them. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
|
Trial 3 on the J616s (5e3111b, status read and write-one-to-clear for the AMCC and NI windows, same aura-try one-shot Stage 2 recipe):
Still a draft. Before this can load: probe the 29 windows read-only one at a time to find the faulting one and its power domain. Then either add the right 🤖 Generated with Claude Code |
On the J616s the first read of an AMCC status aperture from the AP resets the machine, so the module could not be loaded with them mapped. The 25 NI status windows read safely and are kept. Leave the AMCC lines unclaimed again. A line still asserted with no pending status is not an error: report that it is left masked at info level. Keep the T8140 handler nodes disabled until they are qualified on the J700. Tested on the J616s with a one-shot trial Stage 2 carrying only these nodes: 38 error and 21 event-log sources monitored, no interrupt over 10 minutes idle and 3 minutes of stress-ng, 0 UE, 0 err-level kernel lines, 0 AVC. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Adds an EDAC driver for the SoC error-handler and event-log-handler interrupt groups on T6041/T6040 (J616s, J614s, J616c). The T8140 (J700) nodes are added disabled until they are qualified on the Neo.
What it does:
CONFIG_EDAC_APPLE_SOC=min defconfig and asahi.config.Hardware (J616s, fleet17, one-shot aura-try Stage 2 with only these nodes added; evidence in the lane kits):
Build: W=1 clean for the module and for the J616s, J614s, J616c and J700 DTBs.
dt_binding_checkand the scopeddtbs_checkpass. host-tests pass.🤖 Generated with Claude Code