diff options
Diffstat (limited to 'sys/arch/i386/pci/pci_machdep.c')
-rw-r--r-- | sys/arch/i386/pci/pci_machdep.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/i386/pci/pci_machdep.c b/sys/arch/i386/pci/pci_machdep.c index 0b39b27c92d..0cbf206f5d7 100644 --- a/sys/arch/i386/pci/pci_machdep.c +++ b/sys/arch/i386/pci/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.63 2011/06/08 22:57:59 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.64 2011/10/13 18:09:33 kettenis Exp $ */ /* $NetBSD: pci_machdep.c,v 1.28 1997/06/06 23:29:17 thorpej Exp $ */ /*- @@ -411,6 +411,8 @@ pci_conf_read(pci_chipset_tag_t pc, pcitag_t tag, int reg) pcireg_t data; int bus; + KASSERT((reg & 0x3) == 0); + if (pci_mcfg_addr && reg >= PCI_CONFIG_SPACE_SIZE) { pci_decompose_tag(pc, tag, &bus, NULL, NULL); if (bus >= pci_mcfg_min_bus && bus <= pci_mcfg_max_bus) { @@ -447,6 +449,8 @@ pci_conf_write(pci_chipset_tag_t pc, pcitag_t tag, int reg, pcireg_t data) { int bus; + KASSERT((reg & 0x3) == 0); + if (pci_mcfg_addr && reg >= PCI_CONFIG_SPACE_SIZE) { pci_decompose_tag(pc, tag, &bus, NULL, NULL); if (bus >= pci_mcfg_min_bus && bus <= pci_mcfg_max_bus) { |