From 35842669da6d4096378e3ef2c06d0468a4dc4e04 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Thu, 25 Aug 2022 11:54:17 +0530 Subject: soc/intel/mtl: Program MCHBASE prior enabling extended bios range This patch resolves the SoC programming dependency order where enabling extended bios support requires MCHBASE to be enabled. BUG=b:243693375 TEST=Able to boot from RW-A slot which is mapped to extended BIOS range. Signed-off-by: Subrata Banik Change-Id: I8bd9c3d3fb5e82e34f2d6af8548452c744d4b3c5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67046 Reviewed-by: Kapil Porwal Reviewed-by: Eric Lai Reviewed-by: Ivy Jian Reviewed-by: Tarun Tuli Tested-by: build bot (Jenkins) --- src/soc/intel/meteorlake/bootblock/soc_die.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/soc/intel/meteorlake/bootblock') diff --git a/src/soc/intel/meteorlake/bootblock/soc_die.c b/src/soc/intel/meteorlake/bootblock/soc_die.c index f48981c07c..58de3619ed 100644 --- a/src/soc/intel/meteorlake/bootblock/soc_die.c +++ b/src/soc/intel/meteorlake/bootblock/soc_die.c @@ -88,17 +88,27 @@ static void soc_die_early_ip_init(void) soc_die_config_pwrmbase(); } -void bootblock_soc_die_early_init(void) +static void soc_die_early_sa_init(void) { const struct sa_mmio_descriptor soc_fixed_pci_resources[] = { { MCHBAR, MCH_BASE_ADDRESS, MCH_BASE_SIZE, "MCHBAR" }, }; bootblock_systemagent_early_init(); - soc_die_early_ip_init(); /* Enable MCHBAR early, needed by IOC driver */ sa_set_pci_bar(soc_fixed_pci_resources, ARRAY_SIZE(soc_fixed_pci_resources)); +} + +void bootblock_soc_die_early_init(void) +{ + /* + * Ensure performing SA related programming including MCHBAR prior to accessing + * IOC driver. + */ + soc_die_early_sa_init(); + + soc_die_early_ip_init(); fast_spi_cache_bios_region(); soc_die_early_iorange_init(); -- cgit v1.2.3