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 <subratabanik@google.com>
Change-Id: I8bd9c3d3fb5e82e34f2d6af8548452c744d4b3c5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67046
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/soc/intel/meteorlake/bootblock/soc_die.c b/src/soc/intel/meteorlake/bootblock/soc_die.c
index f48981c..58de3619 100644
--- a/src/soc/intel/meteorlake/bootblock/soc_die.c
+++ b/src/soc/intel/meteorlake/bootblock/soc_die.c
@@ -88,17 +88,27 @@
 	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();