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>
This commit is contained in:
Subrata Banik 2022-08-25 11:54:17 +05:30
parent 2c822ab513
commit 35842669da
1 changed files with 12 additions and 2 deletions

View File

@ -88,17 +88,27 @@ static void soc_die_early_ip_init(void)
soc_die_config_pwrmbase(); 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[] = { const struct sa_mmio_descriptor soc_fixed_pci_resources[] = {
{ MCHBAR, MCH_BASE_ADDRESS, MCH_BASE_SIZE, "MCHBAR" }, { MCHBAR, MCH_BASE_ADDRESS, MCH_BASE_SIZE, "MCHBAR" },
}; };
bootblock_systemagent_early_init(); bootblock_systemagent_early_init();
soc_die_early_ip_init();
/* Enable MCHBAR early, needed by IOC driver */ /* Enable MCHBAR early, needed by IOC driver */
sa_set_pci_bar(soc_fixed_pci_resources, ARRAY_SIZE(soc_fixed_pci_resources)); 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(); fast_spi_cache_bios_region();
soc_die_early_iorange_init(); soc_die_early_iorange_init();