Sheng-Liang Pan has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48872 )
Change subject: soc/intel/common: move "pmc_gpe_init" to the beginning of "verstage" ......................................................................
soc/intel/common: move "pmc_gpe_init" to the beginning of "verstage"
This change will move "pmc_gpe_init()" from bootblock to verstage.
BUG=b:174118027 BRANCH=octopus TEST=build and verfiy no "TPM IRQ" error in AP log.
Signed-off-by: Pan Sheng-Liang sheng-liang.pan@quanta.corp-partner.google.com Change-Id: Icc98025b9a351078ce05a583ddafcdafaad83fd2 --- M Makefile.inc M src/device/Makefile.inc M src/security/vboot/vboot_common.h M src/security/vboot/verstage.c M src/soc/intel/apollolake/Makefile.inc M src/soc/intel/apollolake/bootblock/bootblock.c A src/soc/intel/apollolake/verstage.c 7 files changed, 18 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/48872/1
diff --git a/Makefile.inc b/Makefile.inc index 1212dae..c7146be 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -629,7 +629,6 @@ ramstage-y+=$(DEVICETREE_STATIC_C) romstage-y+=$(DEVICETREE_STATIC_C) verstage-y+=$(DEVICETREE_STATIC_C) -bootblock-y+=$(DEVICETREE_STATIC_C) postcar-y+=$(DEVICETREE_STATIC_C) smm-y+=$(DEVICETREE_STATIC_C)
diff --git a/src/device/Makefile.inc b/src/device/Makefile.inc index bb125af..44d2db9 100644 --- a/src/device/Makefile.inc +++ b/src/device/Makefile.inc @@ -11,7 +11,6 @@ ramstage-srcs += $(wildcard src/mainboard/$(MAINBOARDDIR)/hda_verb.c) endif
-bootblock-y += device_const.c postcar-y += device_const.c smm-y += device_const.c verstage-y += device_const.c diff --git a/src/security/vboot/vboot_common.h b/src/security/vboot/vboot_common.h index 512da0e..9f2c279 100644 --- a/src/security/vboot/vboot_common.h +++ b/src/security/vboot/vboot_common.h @@ -44,6 +44,7 @@ void verstage_main(void); void verstage_mainboard_early_init(void); void verstage_mainboard_init(void); +void verstage_soc_init(void);
/* Check boot modes */ #if CONFIG(VBOOT) && !ENV_SMM diff --git a/src/security/vboot/verstage.c b/src/security/vboot/verstage.c index d2a9705..49749d8 100644 --- a/src/security/vboot/verstage.c +++ b/src/security/vboot/verstage.c @@ -11,10 +11,17 @@ /* Default empty implementation. */ }
+void __weak verstage_soc_init(void) +{ + /* Default empty implementation. */ +} + + void main(void) { console_init(); exception_init(); + verstage_soc_init(); verstage_mainboard_init();
if (CONFIG(VBOOT_RETURN_FROM_VERSTAGE)) { diff --git a/src/soc/intel/apollolake/Makefile.inc b/src/soc/intel/apollolake/Makefile.inc index 64889e5..3a675dc 100644 --- a/src/soc/intel/apollolake/Makefile.inc +++ b/src/soc/intel/apollolake/Makefile.inc @@ -90,14 +90,17 @@ verstage-y += pmutil.c verstage-y += reset.c verstage-y += spi.c +verstage-y += verstage.c
ifeq ($(CONFIG_SOC_INTEL_GEMINILAKE),y) bootblock-y += gpio_glk.c +verstage-y += gpio_glk.c romstage-y += gpio_glk.c smm-y += gpio_glk.c ramstage-y += gpio_glk.c else bootblock-y += gpio_apl.c +verstage-y += gpio_glk.c romstage-y += gpio_apl.c smm-y += gpio_apl.c ramstage-y += gpio_apl.c diff --git a/src/soc/intel/apollolake/bootblock/bootblock.c b/src/soc/intel/apollolake/bootblock/bootblock.c index 14e9b11..8d1b6da 100644 --- a/src/soc/intel/apollolake/bootblock/bootblock.c +++ b/src/soc/intel/apollolake/bootblock/bootblock.c @@ -94,9 +94,6 @@
fast_spi_cache_bios_region();
- /* Initialize GPE for use as interrupt status */ - pmc_gpe_init(); - /* Program TCO Timer Halt */ tco_configure();
diff --git a/src/soc/intel/apollolake/verstage.c b/src/soc/intel/apollolake/verstage.c new file mode 100644 index 0000000..4f76810 --- /dev/null +++ b/src/soc/intel/apollolake/verstage.c @@ -0,0 +1,7 @@ +#include <security/vboot/vboot_common.h> +#include <intelblocks/pmclib.h> + +void verstage_soc_init(void) +{ + pmc_gpe_init(); +}