Angel Pons | 585495e | 2020-04-03 01:21:38 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Gerd Hoffmann | ee941b38 | 2013-06-07 16:03:44 +0200 | [diff] [blame] | 2 | |
Kyösti Mälkki | a963acd | 2019-08-16 20:34:25 +0300 | [diff] [blame] | 3 | #include <arch/romstage.h> |
Patrick Rudolph | 69d5ef9 | 2018-11-11 12:43:48 +0100 | [diff] [blame] | 4 | #include <cbmem.h> |
Gerd Hoffmann | ee941b38 | 2013-06-07 16:03:44 +0200 | [diff] [blame] | 5 | #include <console/console.h> |
Patrick Rudolph | 1af8923 | 2018-11-11 12:50:51 +0100 | [diff] [blame] | 6 | #include <southbridge/intel/i82801ix/i82801ix.h> |
Patrick Rudolph | fbdeb4a | 2019-02-14 19:47:03 +0100 | [diff] [blame] | 7 | #include <device/pci_ops.h> |
| 8 | |
Angel Pons | 899525d | 2021-01-28 10:57:13 +0100 | [diff] [blame^] | 9 | #include "q35.h" |
Patrick Rudolph | fbdeb4a | 2019-02-14 19:47:03 +0100 | [diff] [blame] | 10 | |
| 11 | static void mainboard_machine_check(void) |
| 12 | { |
| 13 | /* Check that MCFG is active. If it's not qemu was started for machine PC */ |
| 14 | if (!CONFIG(BOOTBLOCK_CONSOLE) && |
| 15 | (pci_read_config32(PCI_DEV(0, 0, 0), D0F0_PCIEXBAR_LO) != |
| 16 | (CONFIG_MMCONF_BASE_ADDRESS | 1))) |
| 17 | die("You must run qemu for machine Q35 (-M q35)"); |
| 18 | } |
Gerd Hoffmann | ee941b38 | 2013-06-07 16:03:44 +0200 | [diff] [blame] | 19 | |
Kyösti Mälkki | f0a3d44 | 2019-08-18 08:02:23 +0300 | [diff] [blame] | 20 | void mainboard_romstage_entry(void) |
Gerd Hoffmann | ee941b38 | 2013-06-07 16:03:44 +0200 | [diff] [blame] | 21 | { |
Gerd Hoffmann | ee941b38 | 2013-06-07 16:03:44 +0200 | [diff] [blame] | 22 | i82801ix_early_init(); |
Gerd Hoffmann | ee941b38 | 2013-06-07 16:03:44 +0200 | [diff] [blame] | 23 | |
Patrick Rudolph | fbdeb4a | 2019-02-14 19:47:03 +0100 | [diff] [blame] | 24 | mainboard_machine_check(); |
| 25 | |
Patrick Rudolph | 1af8923 | 2018-11-11 12:50:51 +0100 | [diff] [blame] | 26 | cbmem_recovery(0); |
Gerd Hoffmann | ee941b38 | 2013-06-07 16:03:44 +0200 | [diff] [blame] | 27 | } |