From cb49cfda2b978a8522e25874a78940e07038afac Mon Sep 17 00:00:00 2001 From: Alexander Yurchenko Date: Sat, 11 Feb 2006 05:26:33 +0000 Subject: Mask off the highest 16 bit of the io space address. Problem reported by kocka@hysteria.hu. --- sys/dev/pci/piixpm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/pci') 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 @@ -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"); -- cgit v1.2.3