D-10: skip SIF CMD teardown before embedded loader handoff on non-reset IOP#402
Open
Copilot wants to merge 1 commit intoBETA-11-playfrom
Open
D-10: skip SIF CMD teardown before embedded loader handoff on non-reset IOP#402Copilot wants to merge 1 commit intoBETA-11-playfrom
Copilot wants to merge 1 commit intoBETA-11-playfrom
Conversation
SifExitCmd() in ExecuteViaEmbeddedLoader sends a terminate packet to the IOP SIF CMD handler. On a non-reset IOP the handler enters waiting-for-re-init state. The loader then calls SifInitRpc(0) which sends SIF_CMD_INIT_CMD to the IOP and waits for a response that never arrives — hanging forever = black screen. For HDD-backed paths the IOP is never reset before this call. Skip SifExitIopHeap/SifExitRpc/SifExitCmd so the IOP SIF CMD handler stays active and responds to the loader's SifInitRpc(0) immediately. Non-HDD reboot paths go through prepare_reboot_exec_environment() first which resets the IOP; the full teardown is correct for that case and is preserved unchanged. This mechanism is consistent with DECISIONS.md line 101 (removing SIF teardown before ExecPS2 stabilized the HDD loader boundary in earlier diagnostics) and with reference launchers (wLaunchELF) which do not call SifExitCmd before their embedded loader on a non-reset IOP. Update README.md, STATE.md, ROADMAP.md, DECISIONS.md, and QA_REGRESSION_MATRIX.md. Hardware result: Unknown (verify on hardware). Agent-Logs-Url: https://github.com/NathanNeurotic/POPSLoader/sessions/64668836-b163-4b06-a989-f9d72b52c2aa Co-authored-by: NathanNeurotic <109461996+NathanNeurotic@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
NathanNeurotic
April 19, 2026 14:16
View session
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.
HDD-backed
POPSTARTER.ELFblack-screens becauseExecuteViaEmbeddedLoadercallsSifExitCmd()unconditionally beforeExecPS2(loader)— even on HDD paths where the IOP was never reset.SifExitCmd()sends a terminate packet to the IOP's SIF CMD handler, putting it in "waiting-for-re-init" state. The embedded loader starts with a zeroed.bss, callsSifInitRpc(0)→SifInitCmd()→SifSendCmd(SIF_CMD_INIT_CMD, ...), and waits for an IOP acknowledgment that never arrives. Permanent hang.Root cause
ExecuteViaEmbeddedLoaderapplies the sameSifExitIopHeap/SifExitRpc/SifExitCmdteardown regardless of whether the IOP was reset. For non-HDD reboot paths this is fine —prepare_reboot_exec_environment()already reset the IOP before this point. For HDD-backed paths the IOP is still running with all modules loaded, and terminating its SIF CMD handler breaks the loader's ability to re-establish RPC.Consistent with
DECISIONS.mdline 101 ("the embedded-loader boundary only became stable once EE-side SIF teardown beforeExecPS2was removed") and with reference launchers (wLaunchELF) that do not callSifExitCmdbefore their embedded loader on a non-reset IOP.Change
src/elf_loader/src/elf.c— gate SIF teardown on IOP-reset status:SifInitRpc(0)gets an immediate IOP response.Docs
DECISIONS.md,STATE.md,ROADMAP.md,README.md,QA_REGRESSION_MATRIX.mdupdated. Hardware result markedUnknown (verify on hardware).