Skip to content

elf_loader: skip SIF teardown for HDD-backed embedded loader#403

Open
NathanNeurotic wants to merge 1 commit intoBETA-11-playfrom
fix-D-10-hdd-loader-sif
Open

elf_loader: skip SIF teardown for HDD-backed embedded loader#403
NathanNeurotic wants to merge 1 commit intoBETA-11-playfrom
fix-D-10-hdd-loader-sif

Conversation

@NathanNeurotic
Copy link
Copy Markdown
Owner

Fix D-10 black-screen regression. The parent embedded loader unconditionally shuts down the SIF subsystem before handing control to the child loader, which breaks HDD-backed launches because the child loader depends on the SIF layer. Add a check in ExecuteViaEmbeddedLoader() to skip SifExitIopHeap(), SifExitRpc(), and SifExitCmd() when launching from an HDD path (using is_hdd_backed_exec_path). Non-HDD paths continue to cleanup the SIF as before.

Pull Request

Summary

Provide a clear and concise description of the change.

  • What does this PR do?
  • Why is it necessary?
  • What problem does it solve?

Type of Change

Select all that apply:

  • Bug fix
  • Feature addition
  • Performance improvement
  • Refactor (non-functional change)
  • Documentation update
  • Breaking change
  • Other (explain below)

Related Issues

Link related issues using:

Closes #
Fixes #
Related to #


Scope

  • This PR contains a single logical change.
  • No unrelated refactoring is included.
  • No formatting-only noise is included.

If this PR modifies multiple subsystems, explain why that is necessary:


Technical Details

Describe:

  • What files are affected
  • What systems are impacted
  • Why this approach was chosen
  • Any alternative approaches considered

If modifying core logic, explain potential side effects.


Testing

  • Builds successfully
  • No new warnings introduced
  • Existing functionality tested
  • Regression risk evaluated
  • Tested on latest default branch

Describe how you tested this change:


Breaking Changes

If this is a breaking change, describe:

  • What breaks
  • Why it is justified
  • Migration path (if applicable)

If not applicable, state: "No breaking changes."


Security Considerations

Does this change affect:

  • Authentication
  • External inputs
  • File handling
  • Device access
  • Network behavior

If yes, explain impact.


Checklist

  • I have read CONTRIBUTING.md
  • I have followed the project code standards
  • I have rebased on the latest default branch
  • CI passes locally or via GitHub
  • This PR does not introduce hidden side effects

Additional Notes

Provide any additional context here.

Fix D-10 black-screen regression. The parent embedded loader unconditionally shuts down the SIF subsystem before handing control to the child loader, which breaks HDD-backed launches because the child loader depends on the SIF layer. Add a check in ExecuteViaEmbeddedLoader() to skip SifExitIopHeap(), SifExitRpc(), and SifExitCmd() when launching from an HDD path (using is_hdd_backed_exec_path). Non-HDD paths continue to cleanup the SIF as before.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request modifies the ExecuteViaEmbeddedLoader function in src/elf_loader/src/elf.c to conditionally skip SIF and RPC cleanup when the execution path is HDD-backed. Feedback was provided regarding incorrect indentation within the newly added conditional block and the subsequent FlushCache call, which should be corrected to maintain the file's code style.

Comment thread src/elf_loader/src/elf.c
Comment on lines +380 to +385
if (!is_hdd_backed_exec_path(partition_context)) {
SifExitIopHeap();
SifExitRpc();
SifExitCmd();
FlushCache(0);
}
FlushCache(0);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The indentation of the code within the if block and the following FlushCache call is incorrect. It should follow the existing tab-based indentation style of the file to maintain readability.

	if (!is_hdd_backed_exec_path(partition_context)) {
		SifExitIopHeap();
		SifExitRpc();
		SifExitCmd();
	}
	FlushCache(0);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant