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>
This commit is contained in:
Michael Niewöhner 2020-09-15 12:11:15 +02:00
parent cc05e311a2
commit 028c0b640f
2 changed files with 3 additions and 1 deletions

View File

@ -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);

View File

@ -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