mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-31 06:48:22 -04:00
Put the loaded bootconfig in the evt page
This commit is contained in:
parent
b67ce08f84
commit
7850d3fd57
2 changed files with 27 additions and 21 deletions
|
@ -3,9 +3,12 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "memory_map.h"
|
||||
|
||||
/* This provides management for Switch BootConfig. */
|
||||
|
||||
#define LOADED_BOOTCONFIG (get_loaded_bootconfig())
|
||||
|
||||
typedef struct {
|
||||
uint8_t data[0x200];
|
||||
} bootconfig_unsigned_config_t;
|
||||
|
@ -23,9 +26,14 @@ typedef struct {
|
|||
bootconfig_unsigned_config_t unsigned_config;
|
||||
uint8_t signature[0x100];
|
||||
bootconfig_signed_config_t signed_config;
|
||||
uint8_t unknown_config[0x240];
|
||||
uint8_t unused_space[0x240]; /* remaining space in the evt page */
|
||||
} bootconfig_t;
|
||||
|
||||
static inline bootconfig_t *get_loaded_bootconfig(void) {
|
||||
/* this is also get_exception_entry_stack_address(2) */
|
||||
return (bootconfig_t *)(TZRAM_GET_SEGMENT_ADDRESS(TZRAM_SEGEMENT_ID_SECMON_EVT) + 0x180);
|
||||
}
|
||||
|
||||
void bootconfig_load_and_verify(const bootconfig_t *bootconfig);
|
||||
void bootconfig_clear(void);
|
||||
|
||||
|
@ -38,4 +46,4 @@ bool bootconfig_is_debug_mode(void);
|
|||
uint64_t bootconfig_get_memory_arrangement(void);
|
||||
uint64_t bootconfig_get_kernel_memory_configuration(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue