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:
parent
cc05e311a2
commit
028c0b640f
|
@ -346,7 +346,7 @@ int get_prmrr_size(void)
|
||||||
int i;
|
int i;
|
||||||
int valid_size;
|
int valid_size;
|
||||||
|
|
||||||
if (!CONFIG(SOC_INTEL_COMMON_BLOCK_SGX))
|
if (!CONFIG(SOC_INTEL_COMMON_BLOCK_SGX_ENABLE))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
msr = rdmsr(MSR_PRMRR_VALID_CONFIG);
|
msr = rdmsr(MSR_PRMRR_VALID_CONFIG);
|
||||||
|
|
|
@ -26,6 +26,7 @@ config SOC_INTEL_COMMON_BLOCK_SGX_ENABLE
|
||||||
|
|
||||||
config SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE
|
config SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE
|
||||||
int
|
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_MAX
|
||||||
default 256 if SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE_256MB
|
default 256 if SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE_256MB
|
||||||
default 128 if SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE_128MB
|
default 128 if SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE_128MB
|
||||||
|
@ -35,6 +36,7 @@ config SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "PRMRR size"
|
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_SIZE_MAX if SOC_INTEL_COMMON_BLOCK_SGX_ENABLE
|
||||||
default SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_DISABLED if !SOC_INTEL_COMMON_BLOCK_SGX_ENABLE
|
default SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_DISABLED if !SOC_INTEL_COMMON_BLOCK_SGX_ENABLE
|
||||||
help
|
help
|
||||||
|
|
Loading…
Reference in New Issue