summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/common/block/sgx/sgx.c6
1 files changed, 4 insertions, 2 deletions
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 <cpu/x86/mtrr.h>
#include <cpu/intel/microcode.h>
#include <cpu/intel/common/common.h>
+#include <intelblocks/cpulib.h>
#include <intelblocks/mp_init.h>
#include <intelblocks/msr.h>
#include <intelblocks/sgx.h>
@@ -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