ams:bpc: allow programatically setting reboot payload

This commit is contained in:
Michael Scire
2020-05-04 23:29:44 -07:00
parent 3e6031b8f4
commit 85cd2c97a0
7 changed files with 16 additions and 15 deletions

View File

@@ -29,13 +29,15 @@ namespace ams::mitm::bpc {
bpc::RebootForFatalError(&ctx);
}
void AtmosphereService::SetInitialRebootPayload(const ams::sf::InBuffer &payload) {
void AtmosphereService::SetRebootPayload(const ams::sf::InBuffer &payload) {
/* Set the reboot payload. */
bpc::SetRebootPayload(payload.GetPointer(), payload.GetSize());
/* If this is being called for the first time (by boot sysmodule), */
/* Then we should kick off the rest of init. */
if (!g_set_initial_payload) {
g_set_initial_payload = true;
/* Set the initial reboot payload. */
bpc::SetInitialRebootPayload(payload.GetPointer(), payload.GetSize());
/* Start the initialization process. */
::ams::mitm::StartInitialize();
}