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>
This commit is contained in:
Subrata Banik
2022-05-30 18:11:12 +00:00
committed by Paul Fagerburg
parent 0024678d17
commit 37a55d16fc
12 changed files with 101 additions and 0 deletions

View File

@ -38,6 +38,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();