aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/skylake
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2022-05-30 18:11:12 +0000
committerPaul Fagerburg <pfagerburg@chromium.org>2022-06-02 15:58:46 +0000
commit37a55d16fc1002313392e63e33ca275a5c47238d (patch)
tree15ca9b4de279b0026b705fcb95c0daf69baa695f /src/soc/intel/skylake
parent0024678d17586aa294684e2b27acf5c04b22fb08 (diff)
soc/intel/common/cpu: Use SoC overrides to set CPU privilege level
This patch implements a SoC overridesĀ to set CPU privilege level as the MSR is not consistent across platforms. For example: On APL/GLK/DNV, it's MSR 0x120 and CNL onwards it's MSR 0x151. BUG=b:233199592 TEST=Build and boot google/taeko to ChromeOS. Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: I4584516102560e6bb2a4ae8c0d036be40ed96990 Reviewed-on: https://review.coreboot.org/c/coreboot/+/64806 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Diffstat (limited to 'src/soc/intel/skylake')
-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();