1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-12 23:16:40 +00:00
Atmosphere/exosphere/src/bootconfig.h

41 lines
1 KiB
C
Raw Normal View History

#ifndef EXOSPHERE_BOOTCONFIG_H
#define EXOSPHERE_BOOTCONFIG_H
#include <stdbool.h>
#include <stdint.h>
/* This provides management for Switch BootConfig. */
typedef struct {
2018-02-28 04:28:34 +00:00
uint8_t data[0x200];
} bootconfig_unsigned_config_t;
typedef struct {
uint8_t _0x0[8];
uint8_t package2_config;
uint8_t _0x9[7];
uint8_t hardware_info[0x10];
uint8_t disable_program_verification;
uint8_t _0x21[0xDF];
} bootconfig_signed_config_t;
typedef struct {
bootconfig_unsigned_config_t unsigned_config;
uint8_t signature[0x100];
2018-02-28 04:28:34 +00:00
bootconfig_signed_config_t signed_config;
2018-02-21 19:52:39 +00:00
uint8_t unknown_config[0x240];
} bootconfig_t;
2018-02-21 19:52:39 +00:00
void bootconfig_load_and_verify(const bootconfig_t *bootconfig);
void bootconfig_clear(void);
2018-02-21 19:52:39 +00:00
/* Actual configuration getters. */
2018-02-23 03:58:39 +00:00
bool bootconfig_is_package2_plaintext(void);
bool bootconfig_is_package2_unsigned(void);
bool bootconfig_disable_program_verification(void);
bool bootconfig_is_debug_mode(void);
uint64_t bootconfig_get_memory_arrangement(void);
uint64_t bootconfig_get_kernel_memory_configuration(void);
2018-02-21 19:52:39 +00:00
#endif