From 3140ddc3016d728838271598c55097ca0b88b531 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sun, 25 Mar 2018 17:02:24 -0600 Subject: [PATCH] Reserve AMS0 magic for later use, change to eXosphere Boot Config rev 0 --- exosphere/src/exocfg.c | 4 ++-- exosphere/src/exocfg.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/exosphere/src/exocfg.c b/exosphere/src/exocfg.c index e9519b6d2..35c42a8df 100644 --- a/exosphere/src/exocfg.c +++ b/exosphere/src/exocfg.c @@ -11,7 +11,7 @@ /* TODO: Should this be at a non-static location? */ #define MAILBOX_EXOSPHERE_CONFIG (*((volatile exosphere_config_t *)(MAILBOX_BASE + 0xE40ULL))) -static exosphere_config_t g_exosphere_cfg = {MAGIC_ATMOSPHERE, EXOSPHERE_TARGET_FIRMWARE_DEFAULT_FOR_DEBUG}; +static exosphere_config_t g_exosphere_cfg = {MAGIC_EXOSPHERE_BOOTCONFIG, EXOSPHERE_TARGET_FIRMWARE_DEFAULT_FOR_DEBUG}; static bool g_has_loaded_config = false; /* Read config out of IRAM, return target firmware version. */ @@ -21,7 +21,7 @@ unsigned int exosphere_load_config(void) { } g_has_loaded_config = true; - if (MAILBOX_EXOSPHERE_CONFIG.magic == MAGIC_ATMOSPHERE) { + if (MAILBOX_EXOSPHERE_CONFIG.magic == MAGIC_EXOSPHERE_BOOTCONFIG) { g_exosphere_cfg = MAILBOX_EXOSPHERE_CONFIG; } diff --git a/exosphere/src/exocfg.h b/exosphere/src/exocfg.h index a1e8b29f2..54047ccaf 100644 --- a/exosphere/src/exocfg.h +++ b/exosphere/src/exocfg.h @@ -8,8 +8,8 @@ /* This serves to set configuration for *exosphere itself*, separate from the SecMon Exosphere mimics. */ -/* "AMS0" */ -#define MAGIC_ATMOSPHERE (0x30534D41) +/* "XBC0" */ +#define MAGIC_EXOSPHERE_BOOTCONFIG (0x30434258) #define EXOSPHERE_TARGET_FIRMWARE_100 1 #define EXOSPHERE_TARGET_FIRMWARE_200 2 @@ -35,7 +35,7 @@ unsigned int exosphere_load_config(void); unsigned int exosphere_get_target_firmware(void); static inline unsigned int exosphere_get_target_firmware_physical(void) { - return MAILBOX_EXOSPHERE_CONFIG_PHYS.magic == MAGIC_ATMOSPHERE ? MAILBOX_EXOSPHERE_CONFIG_PHYS.target_firmware : EXOSPHERE_TARGET_FIRMWARE_DEFAULT_FOR_DEBUG; + return MAILBOX_EXOSPHERE_CONFIG_PHYS.magic == MAGIC_EXOSPHERE_BOOTCONFIG ? MAILBOX_EXOSPHERE_CONFIG_PHYS.target_firmware : EXOSPHERE_TARGET_FIRMWARE_DEFAULT_FOR_DEBUG; } #endif \ No newline at end of file