svn commit: r296316 - head/sys/dev/pci
Bjoern A. Zeeb
bz at FreeBSD.org
Wed Mar 2 15:26:56 UTC 2016
Author: bz
Date: Wed Mar 2 15:26:55 2016
New Revision: 296316
URL: https://svnweb.freebsd.org/changeset/base/296316
Log:
Add gem5 support, so we attach there as well.
Fix the boundary limit to end at the end of the region and not one beyond (1).
Diagnosed by: andrew (1)
Reviewed by: andrew, br
Sponsored by: DARPA/AFRL
Differential Revision: https://reviews.freebsd.org/D5493
Modified:
head/sys/dev/pci/pci_host_generic.c
Modified: head/sys/dev/pci/pci_host_generic.c
==============================================================================
--- head/sys/dev/pci/pci_host_generic.c Wed Mar 2 15:20:42 2016 (r296315)
+++ head/sys/dev/pci/pci_host_generic.c Wed Mar 2 15:26:55 2016 (r296316)
@@ -143,6 +143,10 @@ generic_pcie_probe(device_t dev)
device_set_desc(dev, "Generic PCI host controller");
return (BUS_PROBE_GENERIC);
}
+ if (ofw_bus_is_compatible(dev, "arm,gem5_pcie")) {
+ device_set_desc(dev, "GEM5 PCIe host controller");
+ return (BUS_PROBE_DEFAULT);
+ }
return (ENXIO);
}
@@ -208,12 +212,11 @@ pci_host_generic_attach(device_t dev)
continue; /* empty range element */
if (sc->ranges[tuple].flags & FLAG_MEM) {
error = rman_manage_region(&sc->mem_rman,
- phys_base,
- phys_base + size);
+ phys_base, phys_base + size - 1);
} else if (sc->ranges[tuple].flags & FLAG_IO) {
error = rman_manage_region(&sc->io_rman,
- pci_base + PCI_IO_WINDOW_OFFSET,
- pci_base + PCI_IO_WINDOW_OFFSET + size);
+ pci_base + PCI_IO_WINDOW_OFFSET,
+ pci_base + PCI_IO_WINDOW_OFFSET + size - 1);
} else
continue;
if (error) {
More information about the svn-src-all
mailing list