diff options
author | Michael Niewöhner <foss@mniewoehner.de> | 2019-09-22 21:56:17 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2019-11-02 13:09:25 +0000 |
commit | c5fc753b1322a3c091356767f7369aacd44410f9 (patch) | |
tree | 1da5338915f62ff4eb5db4cbb0b74f9900ac95a3 /src/soc | |
parent | c169a4751f72b3b9515cae008fd4d524e701bd13 (diff) |
soc/intel/common: sgx: use cpu_lt_lock_memory in sgx setup
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 <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36354
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/intel/common/block/sgx/sgx.c | 6 |
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 |