From cba669cd959299f2f4fe44f9adee6a8ddaebd448 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Thu, 28 Jan 2021 11:56:45 +0100 Subject: mb/emulation/qemu-q35: Define and use MMCONF_BUS_NUMBER Also refactor the machine type checks to avoid code duplication. Tested, still boots to payload with 256, 128 and 64 busses. Change-Id: Ib394ba605bbfeee75aa645e989c23034cceff348 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/50025 Reviewed-by: Nico Huber Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/mainboard/emulation/qemu-q35/mainboard.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/mainboard/emulation/qemu-q35/mainboard.c') diff --git a/src/mainboard/emulation/qemu-q35/mainboard.c b/src/mainboard/emulation/qemu-q35/mainboard.c index 0911671e5c..540db040c9 100644 --- a/src/mainboard/emulation/qemu-q35/mainboard.c +++ b/src/mainboard/emulation/qemu-q35/mainboard.c @@ -41,9 +41,7 @@ static void qemu_nb_read_resources(struct device *dev) { pci_dev_read_resources(dev); - /* reserve mmconfig */ - fixed_mem_resource(dev, 2, CONFIG_MMCONF_BASE_ADDRESS >> 10, 0x10000000 >> 10, - IORESOURCE_RESERVE); + mmconf_resource(dev, 2); if (CONFIG(ARCH_RAMSTAGE_X86_64)) { /* Reserve page tables in DRAM. FIXME: Remove once x86_64 page tables reside in CBMEM */ -- cgit v1.2.3