D-10: restore post-load reset HDD child handoff#401
D-10: restore post-load reset HDD child handoff#401NathanNeurotic wants to merge 1 commit intoBETA-11-playfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the HDD-partition-aware loading logic to use a post-load reset handoff, reverting the previous no-reset strategy to resolve hardware black-screen issues. The implementation now utilizes SifLoadElf for all partition-aware loads and performs an IOP reset and module reload before execution. Feedback indicates that SifLoadModule should be corrected to SifLoadStartModule to comply with PS2SDK standards and that SifExitCmd should be added to the HDD path for consistent SIF cleanup.
| SifLoadModule("rom0:SIO2MAN", 0, NULL); | ||
| SifLoadModule("rom0:MCMAN", 0, NULL); | ||
| SifLoadModule("rom0:MCSERV", 0, NULL); |
There was a problem hiding this comment.
The function SifLoadModule is not a standard PS2SDK function and is likely the cause of the compilation failure mentioned in the PR description. It should be replaced with SifLoadStartModule, which is the standard function for loading IOP modules. Note that SifLoadStartModule takes four arguments; the fourth argument (a pointer to an integer to receive the module's return value) can be set to NULL if not needed.
SifLoadStartModule("rom0:SIO2MAN", 0, NULL, NULL);
SifLoadStartModule("rom0:MCMAN", 0, NULL, NULL);
SifLoadStartModule("rom0:MCSERV", 0, NULL, NULL);| SifLoadFileInit(); | ||
| load_post_reset_mc_modules(); | ||
| SifLoadFileExit(); | ||
| SifExitRpc(); |
There was a problem hiding this comment.
The HDD-specific path is missing a call to SifExitCmd() before jumping to the target ELF. This is inconsistent with the else block (line 405) and the standard cleanup sequence used in elf.c. Ensuring a clean SIF command state is important for a stable handoff to the child ELF, especially when trying to resolve black-screen issues.
SifExitRpc();
SifExitCmd();
Motivation
D-10on recorded hardware, so the partition-aware handoff must be narrowed to a deterministic contract the embedded loader historically used.pfs0:branch to reduce experiment noise for the next CI hardware artifact.Description
src/elf_loader/src/loader/src/loader.cto always callSifLoadElffor mountedpfs0:loads and restore a post-load IOP reset and module reload sequence beforeExecPS2.load_post_reset_mc_modules()and the sequenceSifIopReset("")/SifIopSync()/SifInitRpc(0)/SifLoadFileInit()+ module reloads (rom0:SIO2MAN,rom0:MCMAN,rom0:MCSERV) /SifLoadFileExit()in the child before jumping.fileXioandSifLoadElfbehavior for non-partition-aware/direct iomanX paths.README.md,STATE.md,ROADMAP.md,DECISIONS.md, andQA_REGRESSION_MATRIX.md.Testing
make elfloader, which failed in this environment due to missing PS2SDK build include (/samples/Makefile.eeglobal), so no local ELF artifact was produced.Unknown (verify on hardware)until the next GitHub Actions build and hardware run produce results.Codex Task