From 37a55d16fc1002313392e63e33ca275a5c47238d Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Mon, 30 May 2022 18:11:12 +0000 Subject: soc/intel/common/cpu: Use SoC overrides to set CPU privilege level MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Change-Id: I4584516102560e6bb2a4ae8c0d036be40ed96990 Reviewed-on: https://review.coreboot.org/c/coreboot/+/64806 Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai Reviewed-by: Lean Sheng Tan --- src/soc/intel/icelake/cpu.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/soc/intel/icelake') diff --git a/src/soc/intel/icelake/cpu.c b/src/soc/intel/icelake/cpu.c index f503fcd051..37571758cb 100644 --- a/src/soc/intel/icelake/cpu.c +++ b/src/soc/intel/icelake/cpu.c @@ -24,6 +24,15 @@ bool cpu_soc_is_in_untrusted_mode(void) return !!(msr.lo & ENABLE_IA_UNTRUSTED); } +void cpu_soc_bios_done(void) +{ + msr_t msr; + + msr = rdmsr(MSR_BIOS_DONE); + msr.lo |= ENABLE_IA_UNTRUSTED; + wrmsr(MSR_BIOS_DONE, msr); +} + static void soc_fsp_load(void) { fsps_load(); -- cgit v1.2.3