diff --git a/exosphere/src/configitem.c b/exosphere/src/configitem.c index b685cb2d8..63a4a19a1 100644 --- a/exosphere/src/configitem.c +++ b/exosphere/src/configitem.c @@ -7,6 +7,7 @@ #include "se.h" #include "fuse.h" #include "utils.h" +#include "masterkey.h" static bool g_battery_profile = false; @@ -79,7 +80,12 @@ uint32_t configitem_get(ConfigItem item, uint64_t *p_outvalue) { *p_outvalue = fuse_get_device_id(); break; case CONFIGITEM_BOOTREASON: - *p_outvalue = bootconfig_get_boot_reason(); + /* For some reason, Nintendo removed it on 4.0 */ + if (mkey_get_revision() < MASTERKEY_REVISION_400_CURRENT) { + *p_outvalue = bootconfig_get_boot_reason(); + } else { + result = 2; + } break; case CONFIGITEM_MEMORYARRANGE: *p_outvalue = bootconfig_get_memory_arrangement(); @@ -93,6 +99,14 @@ uint32_t configitem_get(ConfigItem item, uint64_t *p_outvalue) { case CONFIGITEM_BATTERYPROFILE: *p_outvalue = (int)g_battery_profile; break; + case CONFIGITEM_ODM4BIT10_4X: + /* Added on 4.x ... where is it being used? */ + if (mkey_get_revision() >= MASTERKEY_REVISION_400_CURRENT) { + *p_outvalue = (fuse_get_reserved_odm(4) >> 10) & 1; + } else { + result = 2; + } + break; default: result = 2; break; diff --git a/exosphere/src/configitem.h b/exosphere/src/configitem.h index 71e4c431a..29f0bf12c 100644 --- a/exosphere/src/configitem.h +++ b/exosphere/src/configitem.h @@ -17,7 +17,8 @@ typedef enum { CONFIGITEM_MEMORYARRANGE = 10, CONFIGITEM_ISDEBUGMODE = 11, CONFIGITEM_KERNELMEMORYCONFIGURATION = 12, - CONFIGITEM_BATTERYPROFILE = 13 + CONFIGITEM_BATTERYPROFILE = 13, + CONFIGITEM_ODM4BIT10_4X = 14, } ConfigItem; uint32_t configitem_set(ConfigItem item, uint64_t value);