aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/skylake/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/skylake/cpu.c')
-rw-r--r--src/soc/intel/skylake/cpu.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/soc/intel/skylake/cpu.c b/src/soc/intel/skylake/cpu.c
index 3439836f24..26ab2712a9 100644
--- a/src/soc/intel/skylake/cpu.c
+++ b/src/soc/intel/skylake/cpu.c
@@ -27,6 +27,10 @@
bool cpu_soc_is_in_untrusted_mode(void)
{
+ /*
+ * TODO: Add dynamic detection to identify if skylake SoC
+ * is in coffeelake board.
+ */
if (!CONFIG(MAINBOARD_SUPPORTS_COFFEELAKE_CPU))
return false;
@@ -35,6 +39,18 @@ bool cpu_soc_is_in_untrusted_mode(void)
return !!(msr.lo & ENABLE_IA_UNTRUSTED);
}
+void cpu_soc_bios_done(void)
+{
+ if (!CONFIG(MAINBOARD_SUPPORTS_COFFEELAKE_CPU))
+ return;
+
+ msr_t msr;
+
+ msr = rdmsr(MSR_BIOS_DONE);
+ msr.lo |= ENABLE_IA_UNTRUSTED;
+ wrmsr(MSR_BIOS_DONE, msr);
+}
+
static void configure_misc(void)
{
config_t *conf = config_of_soc();