Michael Niewöhner has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36354 )
Change subject: soc/intel/skylake: use cpu_lt_lock_memory in cpu_lock_sgx_memory ......................................................................
soc/intel/skylake: use cpu_lt_lock_memory in cpu_lock_sgx_memory
Use the new common function to set LT_LOCK_MEMORY prior to SGX activation.
Change-Id: Iefec0e61c7482a70af60dabc0bec3bf712d8b48a Signed-off-by: Michael Niewöhner foss@mniewoehner.de --- M src/soc/intel/skylake/cpu.c 1 file changed, 1 insertion(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/54/36354/1
diff --git a/src/soc/intel/skylake/cpu.c b/src/soc/intel/skylake/cpu.c index 63142b9..6e77938 100644 --- a/src/soc/intel/skylake/cpu.c +++ b/src/soc/intel/skylake/cpu.c @@ -578,11 +578,5 @@
void cpu_lock_sgx_memory(void) { - msr_t msr; - - msr = rdmsr(MSR_LT_LOCK_MEMORY); - if ((msr.lo & 1) == 0) { - msr.lo |= 1; /* Lock it */ - wrmsr(MSR_LT_LOCK_MEMORY, msr); - } + cpu_lt_lock_memory(NULL); }