Nico Huber has submitted this change. ( https://review.coreboot.org/c/coreboot/+/36515 )
Change subject: soc/intel: common,apl,skl: remove orphaned memory locking API ......................................................................
soc/intel: common,apl,skl: remove orphaned memory locking API
Remove the now orphaned memory locking API that was replaced by a Kconfig-based approach.
Change-Id: Iebc45f514c576d77f90f558151d25c21f0554779 Signed-off-by: Michael Niewöhner foss@mniewoehner.de Reviewed-on: https://review.coreboot.org/c/coreboot/+/36515 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Nico Huber nico.h@gmx.de --- M src/soc/intel/apollolake/cpu.c M src/soc/intel/common/block/include/intelblocks/sgx.h M src/soc/intel/skylake/cpu.c 3 files changed, 0 insertions(+), 23 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/src/soc/intel/apollolake/cpu.c b/src/soc/intel/apollolake/cpu.c index 0022b3a..6e826b8 100644 --- a/src/soc/intel/apollolake/cpu.c +++ b/src/soc/intel/apollolake/cpu.c @@ -291,9 +291,3 @@ CONFIG(BOOT_DEVICE_SPI_FLASH)) fast_spi_cache_bios_region(); } - -void cpu_lock_sgx_memory(void) -{ - /* Do nothing because MCHECK while loading microcode and enabling - * IA untrusted mode takes care of necessary locking */ -} diff --git a/src/soc/intel/common/block/include/intelblocks/sgx.h b/src/soc/intel/common/block/include/intelblocks/sgx.h index 693dd20..36634d3 100644 --- a/src/soc/intel/common/block/include/intelblocks/sgx.h +++ b/src/soc/intel/common/block/include/intelblocks/sgx.h @@ -19,12 +19,6 @@ #include <soc/nvs.h>
/* - * Lock SGX memory. - * CPU specific code needs to provide the implementation. - */ -void cpu_lock_sgx_memory(void); - -/* * Configure core PRMRR. * PRMRR needs to configured first on all cores and then * call sgx_configure() for all cores to init SGX. diff --git a/src/soc/intel/skylake/cpu.c b/src/soc/intel/skylake/cpu.c index 3ac1451..bfed528 100644 --- a/src/soc/intel/skylake/cpu.c +++ b/src/soc/intel/skylake/cpu.c @@ -575,14 +575,3 @@ return (msr1.lo & PRMRR_SUPPORTED) && (current_patch_id == new_patch_id - 1); } - -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); - } -}