From c5fc753b1322a3c091356767f7369aacd44410f9 Mon Sep 17 00:00:00 2001 From: Michael Niewöhner Date: Sun, 22 Sep 2019 21:56:17 +0200 Subject: soc/intel/common: sgx: use cpu_lt_lock_memory in sgx setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the new common function to set LT_LOCK_MEMORY prior to SGX activation based on Kconfig. Change-Id: Iefec0e61c7482a70af60dabc0bec3bf712d8b48a Signed-off-by: Michael Niewöhner Reviewed-on: https://review.coreboot.org/c/coreboot/+/36354 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/soc/intel/common/block/sgx/sgx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/soc/intel/common/block/sgx/sgx.c b/src/soc/intel/common/block/sgx/sgx.c index b12e6cfcd6..842eb43994 100644 --- a/src/soc/intel/common/block/sgx/sgx.c +++ b/src/soc/intel/common/block/sgx/sgx.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -216,8 +217,9 @@ void sgx_configure(void *unused) if (owner_epoch_update() < 0) return; - /* Ensure to lock memory before reload microcode patch */ - cpu_lock_sgx_memory(); + if (CONFIG(SOC_INTEL_COMMON_BLOCK_SGX_LOCK_MEMORY)) + /* Ensure to lock memory before reload microcode patch */ + cpu_lt_lock_memory(NULL); /* * Update just on the first CPU in the core. Other siblings -- cgit v1.2.3