Repository navigation
Conversation
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 <256263590+Alyx-ML@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Assisted-by: LLM (Claude:Opus 5.5)