Use the correct address when creating pci resources
When the PCI and CPU physical addresses are identical it doesn't matter which is used to create the resources, however on some systems, e.g. qemu armv7 virt, they are different. This leads to a panic as we try to map the wrong physical address into the kernel address space. Reported by: Jenkins via trasz Sponsored by: Innovate UK
This commit is contained in:
parent
9598fc63e6
commit
41b84341f5
@ -143,15 +143,15 @@ pci_host_generic_core_attach(device_t dev)
|
||||
case FLAG_TYPE_PMEM:
|
||||
sc->has_pmem = true;
|
||||
error = rman_manage_region(&sc->pmem_rman,
|
||||
phys_base, phys_base + size - 1);
|
||||
pci_base, pci_base + size - 1);
|
||||
break;
|
||||
case FLAG_TYPE_MEM:
|
||||
error = rman_manage_region(&sc->mem_rman,
|
||||
phys_base, phys_base + size - 1);
|
||||
pci_base, pci_base + size - 1);
|
||||
break;
|
||||
case FLAG_TYPE_IO:
|
||||
error = rman_manage_region(&sc->io_rman,
|
||||
phys_base, phys_base + size - 1);
|
||||
pci_base, pci_base + size - 1);
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user