Pass pci_base address instead of physical address to rman_manage_region().
This should had been part of r347930 ("pci: ecam: Correctly parse memory and IO region"). Sponsored by: DARPA, AFRL
This commit is contained in:
parent
bbc08c6116
commit
7b4ec8d2fc
@ -167,11 +167,11 @@ pci_host_generic_attach(device_t dev)
|
|||||||
continue; /* empty range element */
|
continue; /* empty range element */
|
||||||
if (sc->base.ranges[tuple].flags & FLAG_MEM) {
|
if (sc->base.ranges[tuple].flags & FLAG_MEM) {
|
||||||
error = rman_manage_region(&sc->base.mem_rman,
|
error = rman_manage_region(&sc->base.mem_rman,
|
||||||
phys_base, phys_base + size - 1);
|
pci_base, pci_base + size - 1);
|
||||||
} else if (sc->base.ranges[tuple].flags & FLAG_IO) {
|
} else if (sc->base.ranges[tuple].flags & FLAG_IO) {
|
||||||
error = rman_manage_region(&sc->base.io_rman,
|
error = rman_manage_region(&sc->base.io_rman,
|
||||||
pci_base + PCI_IO_WINDOW_OFFSET,
|
pci_base + PCI_IO_WINDOW_OFFSET,
|
||||||
pci_base + PCI_IO_WINDOW_OFFSET + size - 1);
|
pci_base + PCI_IO_WINDOW_OFFSET + size - 1);
|
||||||
} else
|
} else
|
||||||
continue;
|
continue;
|
||||||
if (error) {
|
if (error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user