ams: fix boot sysmodule/kernel for 10.0.0

This commit is contained in:
Michael Scire 2020-04-14 10:07:24 -07:00
parent 9b677c81a5
commit 94b10b5779
9 changed files with 153 additions and 23 deletions

View file

@ -604,6 +604,15 @@ namespace ams::kern::arch::arm64::init {
this->state.free_bitmap = ~uintptr_t();
}
ALWAYS_INLINE void InitializeFromState(uintptr_t state_val) {
if (kern::GetTargetFirmware() >= kern::TargetFirmware_10_0_0) {
this->state = *reinterpret_cast<State *>(state_val);
} else {
this->state.next_address = state_val;
this->state.free_bitmap = 0;
}
}
ALWAYS_INLINE void GetFinalState(State *out) {
*out = this->state;
this->state = {};