diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2023-06-02 15:30:50 +0200 |
---|---|---|
committer | Arthur Heymans <arthur@aheymans.xyz> | 2023-06-15 08:20:50 +0000 |
commit | 12a448224f512deba57221c0757f148e626240e0 (patch) | |
tree | 2b8fb113df223469245487f0e024ebc34289d152 /src/soc/amd/mendocino | |
parent | d0627c7595feb580c8c03f0335644b85bbc842aa (diff) |
soc/amd/*/root_complex: reserve IOMMU MMIO area
This makes sure that the resource allocator won't use this address range
for anything else. In the systems I looked at, this was between the end
of the above 4GB memory and the beginning of the above 4GB PCI BAR MMIO
region, but better reserve it here so nothing else will get allocated
there if this expectation isn't met.
TEST=Reserved region is printed in the console logs:
update_constraints: PCI: 00:00.0 09 base fd00000000 limit fdffffffff mem (fixed)
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I5a8150873cb019ca1d903ed269e18d6f9fabb871
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75611
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/soc/amd/mendocino')
-rw-r--r-- | src/soc/amd/mendocino/root_complex.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/soc/amd/mendocino/root_complex.c b/src/soc/amd/mendocino/root_complex.c index 7a58f015e6..0dcf2b8a02 100644 --- a/src/soc/amd/mendocino/root_complex.c +++ b/src/soc/amd/mendocino/root_complex.c @@ -7,6 +7,7 @@ #include <amdblocks/alib.h> #include <amdblocks/data_fabric.h> #include <amdblocks/ioapic.h> +#include <amdblocks/iomap.h> #include <amdblocks/memmap.h> #include <arch/ioapic.h> #include <arch/vga.h> @@ -194,6 +195,9 @@ static void read_resources(struct device *dev) gnb_apic->size = 0x00001000; gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; + /* Reserve fixed IOMMU MMIO region */ + mmio_range(dev, idx++, IOMMU_RESERVED_MMIO_BASE, IOMMU_RESERVED_MMIO_SIZE); + if (fsp_hob_iterator_init(&hob_iterator) != CB_SUCCESS) { printk(BIOS_ERR, "%s incomplete because no HOB list was found\n", __func__); |