exo2: cache soc type/hardware type for quick lookup

This commit is contained in:
Michael Scire authored and SciresM committed 2020-06-14 22:07:45 -07:00
1 parent a0b08d0540
commit 99e0448f30
4 files changed
+38 -3

No files matched your search

@@ -245,7 +245,7 @@ namespace ams::secmon::boot {
void DeriveAllKeys() {
/* Determine whether we're prod. */
const bool is_prod = fuse::GetHardwareState() != fuse::HardwareState_Development;
const bool is_prod = IsProduction();
/* Get the ephemeral work block. */
u8 * const work_block = se::GetEphemeralWorkBlock();
+4 -1
View File
@@ -94,6 +94,9 @@ namespace ams::secmon {
/* If we don't have a valid storage context, we can just use the default one. */
ctx.secmon_cfg = DefaultSecureMonitorConfiguration;
}
/* Cache the fuse info for quick access. */
ctx.secmon_cfg.SetFuseInfo();
}
void GenerateSecurityEngineAesKeySlotTestVector(void *dst, size_t size) {
@@ -387,7 +390,7 @@ namespace ams::secmon {
SLAVE_SECURITY_REG_BITS_ENUM(2, DDS, ENABLE),
SLAVE_SECURITY_REG_BITS_ENUM(2, DP2, ENABLE));
const auto hw_type = fuse::GetHardwareType();
const auto hw_type = GetHardwareType();
/* Switch Lite can't use HDMI, so set CEC to secure on hoag. */
if (hw_type == fuse::HardwareType_Hoag) {