emulation/qemu-q35: Enable ECAM earlier
Align implementation with real hardwares, such that ECAM
(PCI configuration via MMIO) is available for use when
console is initialised.
Change-Id: I288991f31d3f1678132aa4315168c09eabbbe98d
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76206
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
diff --git a/src/mainboard/emulation/qemu-q35/bootblock.c b/src/mainboard/emulation/qemu-q35/bootblock.c
index bacdae8..d40ff0f 100644
--- a/src/mainboard/emulation/qemu-q35/bootblock.c
+++ b/src/mainboard/emulation/qemu-q35/bootblock.c
@@ -7,7 +7,7 @@
#include "q35.h"
-static void bootblock_northbridge_init(void)
+void bootblock_soc_early_init(void)
{
/*
* The "io" variant of the config access is explicitly used to
@@ -24,9 +24,6 @@
const uint32_t pciexbar = make_pciexbar();
pci_io_write_config32(HOST_BRIDGE, D0F0_PCIEXBAR_HI, 0);
pci_io_write_config32(HOST_BRIDGE, D0F0_PCIEXBAR_LO, pciexbar);
-
- if (CONFIG(BOOTBLOCK_CONSOLE))
- mainboard_machine_check();
}
static void bootblock_southbridge_init(void)
@@ -40,6 +37,8 @@
void bootblock_soc_init(void)
{
- bootblock_northbridge_init();
+ if (CONFIG(BOOTBLOCK_CONSOLE))
+ mainboard_machine_check();
+
bootblock_southbridge_init();
}