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