Michael Niewöhner has uploaded this change for review.

View Change

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);
}

To view, visit change 36354. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iefec0e61c7482a70af60dabc0bec3bf712d8b48a
Gerrit-Change-Number: 36354
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Niewöhner
Gerrit-Reviewer: Michael Niewöhner
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-MessageType: newchange