From c5731045524945a5f5f72d7842dbaeb97ba11158 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Thu, 23 Jul 2009 19:29:59 +0000 Subject: Avoid twiddling the lower bits of a BAR such that the code becomes usable for mapping ROM BARs. --- sys/dev/pci/pci_map.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/pci') diff --git a/sys/dev/pci/pci_map.c b/sys/dev/pci/pci_map.c index ae9677bf686..33d3cb0e404 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.24 2009/04/06 20:51:48 kettenis Exp $ */ +/* $OpenBSD: pci_map.c,v 1.25 2009/07/23 19:29:58 kettenis Exp $ */ /* $NetBSD: pci_map.c,v 1.7 2000/05/10 16:58:42 thorpej Exp $ */ /*- @@ -152,7 +152,7 @@ obsd_pci_mem_find(pci_chipset_tag_t pc, pcitag_t tag, int reg, pcireg_t type, pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG, csr & ~PCI_COMMAND_MEM_ENABLE); address = pci_conf_read(pc, tag, reg); - pci_conf_write(pc, tag, reg, 0xffffffff); + pci_conf_write(pc, tag, reg, PCI_MAPREG_MEM_ADDR_MASK); mask = pci_conf_read(pc, tag, reg); pci_conf_write(pc, tag, reg, address); if (is64bit) { -- cgit v1.2.3