From 11c1b94d033d1a9009c8a4270118b83abdf9cee8 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Mon, 14 Sep 2020 16:37:33 +0200 Subject: soc/intel/common/block/cpu: Fix boot failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes commit 1b89f5e "Guard options with if-blocks". The code no longer returns if SGX is disabled, but as the PRMRR configuration is missing it runs into die(). Tested on Prodrive Hermes: Boots again into Linux. Change-Id: I6d32ca32b1b53767b2db91305103cd532823a5ca Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/45344 Tested-by: build bot (Jenkins) Reviewed-by: Christian Walter Reviewed-by: Michael Niewöhner Reviewed-by: Nico Huber --- src/soc/intel/common/block/cpu/cpulib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/soc/intel') diff --git a/src/soc/intel/common/block/cpu/cpulib.c b/src/soc/intel/common/block/cpu/cpulib.c index 5b703cfcb4..31f160a7bb 100644 --- a/src/soc/intel/common/block/cpu/cpulib.c +++ b/src/soc/intel/common/block/cpu/cpulib.c @@ -346,10 +346,8 @@ int get_prmrr_size(void) int i; int valid_size; - if (CONFIG(SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_DISABLED)) { - printk(BIOS_DEBUG, "PRMRR disabled by config.\n"); + if (!CONFIG(SOC_INTEL_COMMON_BLOCK_SGX)) return 0; - } msr = rdmsr(MSR_PRMRR_VALID_CONFIG); if (!msr.lo) { -- cgit v1.2.3