diff options
Diffstat (limited to 'src/mainboard/emulation/qemu-q35/romstage.c')
-rw-r--r-- | src/mainboard/emulation/qemu-q35/romstage.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mainboard/emulation/qemu-q35/romstage.c b/src/mainboard/emulation/qemu-q35/romstage.c index e409ad1e5f..dbaead982a 100644 --- a/src/mainboard/emulation/qemu-q35/romstage.c +++ b/src/mainboard/emulation/qemu-q35/romstage.c @@ -22,6 +22,18 @@ #include <timestamp.h> #include <southbridge/intel/i82801ix/i82801ix.h> #include <program_loading.h> +#include <device/pci_ops.h> + +#define D0F0_PCIEXBAR_LO 0x60 + +static void mainboard_machine_check(void) +{ + /* Check that MCFG is active. If it's not qemu was started for machine PC */ + if (!CONFIG(BOOTBLOCK_CONSOLE) && + (pci_read_config32(PCI_DEV(0, 0, 0), D0F0_PCIEXBAR_LO) != + (CONFIG_MMCONF_BASE_ADDRESS | 1))) + die("You must run qemu for machine Q35 (-M q35)"); +} asmlinkage void car_stage_entry(void) { @@ -29,6 +41,8 @@ asmlinkage void car_stage_entry(void) i82801ix_early_init(); console_init(); + mainboard_machine_check(); + cbmem_recovery(0); timestamp_add_now(TS_START_ROMSTAGE); |