aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2014-06-25 20:30:47 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2014-06-25 20:30:47 +0000
commitd2dc06ca16765436a229d28041d5b917bcf2fbc4 (patch)
tree5de6e7ecb410a7657c33b6e7fae97a4297e6832c /sys/dev/acpica
parent75c7a1d357558877da83ebc2061d4a36a6fb7aac (diff)
downloadsrc-d2dc06ca16765436a229d28041d5b917bcf2fbc4.tar.gz
src-d2dc06ca16765436a229d28041d5b917bcf2fbc4.zip
Expand r261243 even further and ignore any I/O port resources assigned to
PCI root bridges except for the one known-valid case on x86 where bridges claim the I/O port registers used for PCI config space access. Tested by: Hilko Meyer <hilko.meyer@gmx.de> MFC after: 1 week
Notes
Notes: svn path=/head/; revision=267883
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index a5b65857a74a..b37e252f2138 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -1196,15 +1196,24 @@ acpi_set_resource(device_t dev, device_t child, int type, int rid,
return (0);
/*
- * Ignore memory resources for PCI root bridges. Some BIOSes
+ * Ignore most resources for PCI root bridges. Some BIOSes
* incorrectly enumerate the memory ranges they decode as plain
- * memory resources instead of as a ResourceProducer range.
+ * memory resources instead of as ResourceProducer ranges. Other
+ * BIOSes incorrectly list system resource entries for I/O ranges
+ * under the PCI bridge. Do allow the one known-correct case on
+ * x86 of a PCI bridge claiming the I/O ports used for PCI config
+ * access.
*/
- if (type == SYS_RES_MEMORY) {
+ if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) {
if (ACPI_SUCCESS(AcpiGetObjectInfo(ad->ad_handle, &devinfo))) {
if ((devinfo->Flags & ACPI_PCI_ROOT_BRIDGE) != 0) {
- AcpiOsFree(devinfo);
- return (0);
+#if defined(__i386__) || defined(__amd64__)
+ if (!(type == SYS_RES_IOPORT && start == CONF1_ADDR_PORT))
+#endif
+ {
+ AcpiOsFree(devinfo);
+ return (0);
+ }
}
AcpiOsFree(devinfo);
}