Date: Fri, 19 Jun 2020 18:00:21 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362397 - head/sys/dev/pci Message-ID: <202006191800.05JI0LAG044143@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Fri Jun 19 18:00:20 2020 New Revision: 362397 URL: https://svnweb.freebsd.org/changeset/base/362397 Log: 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 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 Fri Jun 19 17:59:55 2020 (r362396) +++ head/sys/dev/pci/pci_host_generic.c Fri Jun 19 18:00:20 2020 (r362397) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006191800.05JI0LAG044143>