Changes required to the device allocator:

- leave a hole for mmapped PCIe config space if CONFIG_PCIE_CONFIGSPACE_HOLE
  is set.
- Mask moving bits to 32bit when resources are not supposed above 4G. Linux
  does not like this, even though the resource is disabled.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Myles Watson <mylesgw@gmail.com>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3699 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Stefan Reinauer 2008-10-29 03:15:42 +00:00 committed by Stefan Reinauer
parent b64aa60f1f
commit 532fd2dc3d
3 changed files with 16 additions and 0 deletions

View File

@ -1115,6 +1115,12 @@ define CONFIG_GX1_VIDEOMODE
# 4 for 1280x1024 # 4 for 1280x1024
end end
define CONFIG_PCIE_CONFIGSPACE_HOLE
default 0
export always
comment "Leave a hole for PCIe config space in the device allocator"
end
############################################### ###############################################
# Board specific options # Board specific options
############################################### ###############################################

View File

@ -366,6 +366,12 @@ void compute_allocate_resource(
(resource->flags & IORESOURCE_IO)? "io": (resource->flags & IORESOURCE_IO)? "io":
(resource->flags & IORESOURCE_PREFETCH)? "prefmem": "mem"); (resource->flags & IORESOURCE_PREFETCH)? "prefmem": "mem");
} }
#if CONFIG_PCIE_CONFIGSPACE_HOLE
#warning Handle PCIe hole differently...
if (base >= 0xf0000000 && base < 0xf4000000) {
base = 0xf4000000;
}
#endif
} }
/* A pci bridge resource does not need to be a power /* A pci bridge resource does not need to be a power
* of two size, but it does have a minimum granularity. * of two size, but it does have a minimum granularity.

View File

@ -377,7 +377,11 @@ static void pci_record_bridge_resource(
* clear it and forget it. * clear it and forget it.
*/ */
if (resource->size == 0) { if (resource->size == 0) {
#if CONFIG_PCI_64BIT_PREF_MEM == 1
resource->base = moving; resource->base = moving;
#else
resource->base = moving & 0xffffffff;
#endif
resource->flags |= IORESOURCE_ASSIGNED; resource->flags |= IORESOURCE_ASSIGNED;
resource->flags &= ~IORESOURCE_STORED; resource->flags &= ~IORESOURCE_STORED;
pci_set_resource(dev, resource); pci_set_resource(dev, resource);