mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-23 03:06:52 -04:00
Implement support for parsing/interacting with NCAs. (#942)
* fs: implement support for interacting with ncas. * spl: extend to use virtual keyslots
This commit is contained in:
parent
3a1ccdd919
commit
81f91803ec
118 changed files with 13301 additions and 405 deletions
|
@ -22,19 +22,6 @@ namespace ams::boot {
|
|||
|
||||
namespace {
|
||||
|
||||
/* Types. */
|
||||
struct BootReasonValue {
|
||||
union {
|
||||
struct {
|
||||
u8 power_intr;
|
||||
u8 rtc_intr;
|
||||
u8 nv_erc;
|
||||
u8 boot_reason;
|
||||
};
|
||||
u32 value;
|
||||
};
|
||||
};
|
||||
|
||||
/* Globals. */
|
||||
u32 g_boot_reason = 0;
|
||||
bool g_detected_boot_reason = false;
|
||||
|
@ -90,12 +77,14 @@ namespace ams::boot {
|
|||
|
||||
/* Set boot reason for SPL. */
|
||||
if (hos::GetVersion() >= hos::Version_3_0_0) {
|
||||
BootReasonValue boot_reason_value;
|
||||
boot_reason_value.power_intr = power_intr;
|
||||
boot_reason_value.rtc_intr = rtc_intr & ~rtc_intr_m;
|
||||
boot_reason_value.nv_erc = nv_erc;
|
||||
spl::BootReasonValue boot_reason_value = {};
|
||||
|
||||
boot_reason_value.power_intr = power_intr;
|
||||
boot_reason_value.rtc_intr = rtc_intr & ~rtc_intr_m;
|
||||
boot_reason_value.nv_erc = nv_erc;
|
||||
boot_reason_value.boot_reason = g_boot_reason;
|
||||
R_ABORT_UNLESS(splSetBootReason(boot_reason_value.value));
|
||||
|
||||
R_ABORT_UNLESS(spl::SetBootReason(boot_reason_value));
|
||||
}
|
||||
|
||||
g_detected_boot_reason = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue