diff options
author | Alexander Yurchenko <grange@cvs.openbsd.org> | 2006-02-11 05:26:33 +0000 |
---|---|---|
committer | Alexander Yurchenko <grange@cvs.openbsd.org> | 2006-02-11 05:26:33 +0000 |
commit | cb49cfda2b978a8522e25874a78940e07038afac (patch) | |
tree | a222a50eee8779cbf3f5f9df3933bad4e5873de7 /sys/dev/pci | |
parent | 23f8cb61940bb86eb45ef4363ea7153e1dc03ea4 (diff) |
Mask off the highest 16 bit of the io space address.
Problem reported by kocka@hysteria.hu.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/piixpm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/piixpm.c b/sys/dev/pci/piixpm.c index 3368e1219c5..8ffa6d0d17f 100644 --- a/sys/dev/pci/piixpm.c +++ b/sys/dev/pci/piixpm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: piixpm.c,v 1.18 2006/01/18 02:57:27 brad Exp $ */ +/* $OpenBSD: piixpm.c,v 1.19 2006/02/11 05:26:32 grange Exp $ */ /* * Copyright (c) 2005, 2006 Alexander Yurchenko <grange@openbsd.org> @@ -125,7 +125,7 @@ piixpm_attach(struct device *parent, struct device *self, void *aux) /* Map I/O space */ sc->sc_iot = pa->pa_iot; - base = pci_conf_read(pa->pa_pc, pa->pa_tag, PIIX_SMB_BASE); + base = pci_conf_read(pa->pa_pc, pa->pa_tag, PIIX_SMB_BASE) & 0xffff; if (bus_space_map(sc->sc_iot, PCI_MAPREG_IO_ADDR(base), PIIX_SMB_SIZE, 0, &sc->sc_ioh)) { printf(": can't map I/O space\n"); |