diff --git a/libexosphere/source/fuse/fuse_api.cpp b/libexosphere/source/fuse/fuse_api.cpp index c7543c1d..963a7cad 100644 --- a/libexosphere/source/fuse/fuse_api.cpp +++ b/libexosphere/source/fuse/fuse_api.cpp @@ -24,6 +24,8 @@ namespace ams::fuse { static_assert(SocType_CommonInternal != SocType_Erista); static_assert(SocType_CommonInternal != SocType_Mariko); + constinit SocType g_soc_type = SocType_CommonInternal; + struct BypassEntry { u32 offset; u32 value; @@ -365,17 +367,26 @@ namespace ams::fuse { } SocType GetSocType() { - switch (GetHardwareType()) { - case HardwareType_Icosa: - case HardwareType_Copper: - return SocType_Erista; - case HardwareType_Iowa: - case HardwareType_Hoag: - case HardwareType_Calcio: - case HardwareType_Aula: - return SocType_Mariko; - default: - return SocType_Undefined; + if (AMS_LIKELY(g_soc_type != SocType_CommonInternal)) { + return g_soc_type; + } else { + switch (GetHardwareType()) { + case HardwareType_Icosa: + case HardwareType_Copper: + g_soc_type = SocType_Erista; + break; + case HardwareType_Iowa: + case HardwareType_Hoag: + case HardwareType_Calcio: + case HardwareType_Aula: + g_soc_type = SocType_Mariko; + break; + default: + g_soc_type = SocType_Undefined; + break; + } + + return g_soc_type; } }