Paul Menzel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/42201 )
Change subject: soc/intel/skylake: Check Kconfig symbols in C instead of preprocessor ......................................................................
soc/intel/skylake: Check Kconfig symbols in C instead of preprocessor
This unifies the file with `src/soc/intel/cannonlake/acpi.c`.
Change-Id: Ia6601bfd6e7a11eca6bbc32f6757c165ba5a4cff Signed-off-by: Paul Menzel pmenzel@molgen.mpg.de --- M src/soc/intel/skylake/acpi.c 1 file changed, 15 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/42201/1
diff --git a/src/soc/intel/skylake/acpi.c b/src/soc/intel/skylake/acpi.c index bdfacd3..5d48184 100644 --- a/src/soc/intel/skylake/acpi.c +++ b/src/soc/intel/skylake/acpi.c @@ -1,3 +1,4 @@ + /* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h> @@ -170,15 +171,20 @@ gnvs->cbmc = (u32)cbmem_find(CBMEM_ID_CONSOLE); #endif
-#if CONFIG(CHROMEOS) - /* Initialize Verified Boot data */ - chromeos_init_chromeos_acpi(&(gnvs->chromeos)); -#if CONFIG(EC_GOOGLE_CHROMEEC) - gnvs->chromeos.vbt2 = google_ec_running_ro() ? - ACTIVE_ECFW_RO : ACTIVE_ECFW_RW; -#endif - gnvs->chromeos.vbt2 = ACTIVE_ECFW_RO; -#endif + /* Update the mem console pointer. */ + if (CONFIG(CONSOLE_CBMEM)) + gnvs->cbmc = (uintptr_t)cbmem_find(CBMEM_ID_CONSOLE); + + if (CONFIG(CHROMEOS)) { + /* Initialize Verified Boot data */ + chromeos_init_chromeos_acpi(&(gnvs->chromeos)); + if (CONFIG(EC_GOOGLE_CHROMEEC)) { + gnvs->chromeos.vbt2 = google_ec_running_ro() ? + ACTIVE_ECFW_RO : ACTIVE_ECFW_RW; + } else { + gnvs->chromeos.vbt2 = ACTIVE_ECFW_RO; + } + }
/* Enable DPTF based on mainboard configuration */ gnvs->dpte = config->dptf_enable;