diff options
Diffstat (limited to 'src/soc/intel/apollolake/cpu.c')
-rw-r--r-- | src/soc/intel/apollolake/cpu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/soc/intel/apollolake/cpu.c b/src/soc/intel/apollolake/cpu.c index af0a6dcd18..74aeee98e4 100644 --- a/src/soc/intel/apollolake/cpu.c +++ b/src/soc/intel/apollolake/cpu.c @@ -47,6 +47,14 @@ static const struct reg_script core_msr_script[] = { REG_SCRIPT_END }; +bool cpu_soc_is_in_untrusted_mode(void) +{ + msr_t msr; + + msr = rdmsr(MSR_POWER_MISC); + return !!(msr.lo & ENABLE_IA_UNTRUSTED); +} + void soc_core_init(struct device *cpu) { /* Configure Core PRMRR for SGX. */ |