Repository navigation
Conversation
|
@Alyx-ML checking open drafts today. To come out of draft, this still needs:
If it's no longer needed, say so here and we'll close it. Otherwise it stays open as a draft until these are done. |
On the T6050 and J714s profiles, the saved-state guard refuses every SMC command once an unexpected reply sets saved_fault. Nothing clears the fault. apple_smc_enter_atomic() and apple_smc_write_atomic() used the same guard, so after a fault the power-off and restart handlers could not send MBSE = off1 or phra. The machine then stayed on, and macsmc-reboot only logged the failure without its cause. Only the power-off and restart handlers enter atomic mode, and only the final MBSE write follows. So apple_smc_enter_atomic() now still enters atomic mode when the guard refuses commands. It skips the NTAP write and warns. apple_smc_write_atomic() sends the final command and warns. It stops routing replies to a saved-state command that is still marked pending, so this command's reply is taken as this command's. Every other command still goes through the guard. Atomic mode already refuses them all. macsmc-reboot now prints the error code. It also says that the next power-off or restart handler is tried, which the notifier chain does on NOTIFY_OK. A KUnit case in the macsmc suite checks the guard paths. Without a fault, notifications are turned off before atomic mode. With saved_fault set, atomic mode is still entered and no command is sent. An ordinary write is still refused with -EPROTO. The kernel and the KUnit case were not compiled or run here (macOS host, no arm64 kernel toolchain). A power-off and a reboot after a real SMC fault, on a T6050 or J714s, are needed before this is merged. Signed-off-by: Alyx-ML <[email protected]>
|
Rebased onto The KUnit link in the description is from the old base. My fork's Actions could not run this Assisted-by: LLM (Claude:Opus 5.5) |
5f71ecd to
b6e9283
Compare
Part of the #2755 split. Draft: it needs a power-off and reboot row.
Summary
Evidence
off1orphra, so themachine stayed on (found by reading).
macsmcsuite: without a fault, notifications go off beforeatomic mode; with a saved fault, atomic mode is still entered and no command is sent; an
ordinary write is still refused with -EPROTO.
macsmc-rebootnow prints the error code. Buildand KUnit: passed, Apple build and KUnit.
Merge Danger
Door: two-way
Blast Radius: power-off and reboot