mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-14 15:14:23 -04:00
exo2: implement SmcGetConfig
This commit is contained in:
parent
e3eadcd2e3
commit
6bf283ec2e
15 changed files with 640 additions and 45 deletions
|
@ -23,11 +23,18 @@ namespace ams::secmon {
|
|||
constinit pkg1::BctParameters g_bct_params = {};
|
||||
constinit se::Sha256Hash g_package2_hash = {};
|
||||
|
||||
constinit u32 g_deprecated_boot_reason_value = {};
|
||||
constinit u8 g_deprecated_boot_reason_state = {};
|
||||
|
||||
}
|
||||
|
||||
void SaveBootInfo(const pkg1::SecureMonitorParameters &secmon_params) {
|
||||
/* Save the BCT parameters. */
|
||||
g_bct_params = secmon_params.bct_params;
|
||||
|
||||
/* Save the deprecated boot reason. */
|
||||
g_deprecated_boot_reason_value = secmon_params.deprecated_boot_reason_value;
|
||||
g_deprecated_boot_reason_state = secmon_params.deprecated_boot_reason_state;
|
||||
}
|
||||
|
||||
bool IsRecoveryBoot() {
|
||||
|
@ -52,4 +59,8 @@ namespace ams::secmon {
|
|||
g_package2_hash = hash;
|
||||
}
|
||||
|
||||
u32 GetDeprecatedBootReason() {
|
||||
return (static_cast<u32>(g_deprecated_boot_reason_state) << 24) | (g_deprecated_boot_reason_value & 0x00FFFFFF);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue