fusee_cpp: implement inline storage of EmcDvfsTimingTables

This commit is contained in:
Michael Scire 2021-08-24 16:51:16 -07:00
parent 4043c52691
commit ae25f6f8d4

View File

@ -24,6 +24,8 @@ namespace ams::fuse {
static_assert(SocType_CommonInternal != SocType_Erista); static_assert(SocType_CommonInternal != SocType_Erista);
static_assert(SocType_CommonInternal != SocType_Mariko); static_assert(SocType_CommonInternal != SocType_Mariko);
constinit SocType g_soc_type = SocType_CommonInternal;
struct BypassEntry { struct BypassEntry {
u32 offset; u32 offset;
u32 value; u32 value;
@ -365,17 +367,26 @@ namespace ams::fuse {
} }
SocType GetSocType() { SocType GetSocType() {
switch (GetHardwareType()) { if (AMS_LIKELY(g_soc_type != SocType_CommonInternal)) {
case HardwareType_Icosa: return g_soc_type;
case HardwareType_Copper: } else {
return SocType_Erista; switch (GetHardwareType()) {
case HardwareType_Iowa: case HardwareType_Icosa:
case HardwareType_Hoag: case HardwareType_Copper:
case HardwareType_Calcio: g_soc_type = SocType_Erista;
case HardwareType_Aula: break;
return SocType_Mariko; case HardwareType_Iowa:
default: case HardwareType_Hoag:
return SocType_Undefined; case HardwareType_Calcio:
case HardwareType_Aula:
g_soc_type = SocType_Mariko;
break;
default:
g_soc_type = SocType_Undefined;
break;
}
return g_soc_type;
} }
} }