summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2008-04-09 21:47:36 +0000
committerkettenis <kettenis@openbsd.org>2008-04-09 21:47:36 +0000
commitb136ae82d44fb4c99fb5bf6975a41ce1b5d862cf (patch)
treebff83279b094c4aad6d146c61094cbdbff9415c3 /sys/dev
parentImprove support for shared libs linked at non-zero addreses: (diff)
downloadwireguard-openbsd-b136ae82d44fb4c99fb5bf6975a41ce1b5d862cf.tar.xz
wireguard-openbsd-b136ae82d44fb4c99fb5bf6975a41ce1b5d862cf.zip
On sparc64, a zero base address doesn't mean the BAR is invalid. We probably
need a MD base address validation function, but skipping the check on sparc64 will do for now. ok deraadt@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/pci_map.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/pci_map.c b/sys/dev/pci/pci_map.c
index e9d6adb481c..77c8d52009d 100644
--- a/sys/dev/pci/pci_map.c
+++ b/sys/dev/pci/pci_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_map.c,v 1.20 2007/01/26 01:18:48 tsi Exp $ */
+/* $OpenBSD: pci_map.c,v 1.21 2008/04/09 21:47:36 kettenis Exp $ */
/* $NetBSD: pci_map.c,v 1.7 2000/05/10 16:58:42 thorpej Exp $ */
/*-
@@ -326,8 +326,10 @@ pci_mapreg_map(struct pci_attach_args *pa, int reg, pcireg_t type, int busflags,
if ((rv = pci_mapreg_info(pa->pa_pc, pa->pa_tag, reg, type,
&base, &size, &flags)) != 0)
return (rv);
+#ifndef __sparc64__
if (base == 0)
return (EINVAL); /* disabled because of invalid BAR */
+#endif
csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
if (PCI_MAPREG_TYPE(type) == PCI_MAPREG_TYPE_IO)