fusee_cpp: implement inline storage of EmcDvfsTimingTables

This commit is contained in:
Michael Scire 2021-08-24 16:51:16 -07:00 committed by SciresM
parent 3bcdd0c3c8
commit d2f3b806d6
12 changed files with 3705 additions and 753 deletions

View file

@ -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;
}
}