summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niewöhner <foss@mniewoehner.de>2020-09-15 12:11:15 +0200
committerMichael Niewöhner <foss@mniewoehner.de>2020-09-21 15:50:43 +0000
commit028c0b640f1dd148dd72ec69efec377dc5ee25a0 (patch)
tree344af91559cd4da5d1ded17161d84fb2469dba86
parentcc05e311a26132abe3139d4c5f2bc36db5a738d1 (diff)
soc/intel/common/block/sgx: make PRMRR size setting depend on SGX
PRMRR size shall only be set when SGX is enabled. Make PRMRR depend on SGX enablement in Kconfig. Change-Id: I551942fd9cb8e7123d00dbd752abffe24788148c Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45412 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
-rw-r--r--src/soc/intel/common/block/cpu/cpulib.c2
-rw-r--r--src/soc/intel/common/block/sgx/Kconfig2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/soc/intel/common/block/cpu/cpulib.c b/src/soc/intel/common/block/cpu/cpulib.c
index fd3919750f..9ff7923664 100644
--- a/src/soc/intel/common/block/cpu/cpulib.c
+++ b/src/soc/intel/common/block/cpu/cpulib.c
@@ -346,7 +346,7 @@ int get_prmrr_size(void)
int i;
int valid_size;
- if (!CONFIG(SOC_INTEL_COMMON_BLOCK_SGX))
+ if (!CONFIG(SOC_INTEL_COMMON_BLOCK_SGX_ENABLE))
return 0;
msr = rdmsr(MSR_PRMRR_VALID_CONFIG);
diff --git a/src/soc/intel/common/block/sgx/Kconfig b/src/soc/intel/common/block/sgx/Kconfig
index 771c54caa5..ef3365f312 100644
--- a/src/soc/intel/common/block/sgx/Kconfig
+++ b/src/soc/intel/common/block/sgx/Kconfig
@@ -26,6 +26,7 @@ config SOC_INTEL_COMMON_BLOCK_SGX_ENABLE
config SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE
int
+ depends on SOC_INTEL_COMMON_BLOCK_SGX_ENABLE
default 256 if SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE_MAX
default 256 if SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE_256MB
default 128 if SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE_128MB
@@ -35,6 +36,7 @@ config SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE
choice
prompt "PRMRR size"
+ depends on SOC_INTEL_COMMON_BLOCK_SGX_ENABLE
default SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE_MAX if SOC_INTEL_COMMON_BLOCK_SGX_ENABLE
default SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_DISABLED if !SOC_INTEL_COMMON_BLOCK_SGX_ENABLE
help