mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-31 14:58:22 -04:00
Implement BootReason config
This commit is contained in:
parent
ff9322a468
commit
3d8ff446ad
5 changed files with 33 additions and 4 deletions
|
@ -34,9 +34,19 @@ static inline bootconfig_t *get_loaded_bootconfig(void) {
|
|||
return (bootconfig_t *)(TZRAM_GET_SEGMENT_ADDRESS(TZRAM_SEGEMENT_ID_SECMON_EVT) + 0x180);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
uint64_t _0x00;
|
||||
uint32_t _0x08;
|
||||
uint32_t is_recovery_boot;
|
||||
uint32_t boot_reason_low;
|
||||
uint32_t boot_reason_high;
|
||||
} boot_reason_t;
|
||||
|
||||
void bootconfig_load_and_verify(const bootconfig_t *bootconfig);
|
||||
void bootconfig_clear(void);
|
||||
|
||||
void bootconfig_load_boot_reason(volatile boot_reason_t *boot_reason);
|
||||
|
||||
/* Actual configuration getters. */
|
||||
bool bootconfig_is_package2_plaintext(void);
|
||||
bool bootconfig_is_package2_unsigned(void);
|
||||
|
@ -48,4 +58,7 @@ bool bootconfig_take_extabt_serror_to_el3(void);
|
|||
uint64_t bootconfig_get_memory_arrangement(void);
|
||||
uint64_t bootconfig_get_kernel_memory_configuration(void);
|
||||
|
||||
bool bootconfig_is_recovery_boot(void);
|
||||
uint64_t bootconfig_get_boot_reason(void);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue