diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-07-24 19:34:55 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-07-24 19:34:55 +0000 |
commit | bb7f2bb1da6878b638a7e702fddb091195ecdd67 (patch) | |
tree | e7ae811466e972697161f2f5689059053ff5b2de /sys/arch | |
parent | 6a7834b594147699a4d4dc75633d00b45677f1d9 (diff) |
Convert PCI addresses to proper 64-bit physical addresses.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hppa64/dev/elroy.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/hppa64/dev/elroy.c b/sys/arch/hppa64/dev/elroy.c index 846021837bf..9e689a00a95 100644 --- a/sys/arch/hppa64/dev/elroy.c +++ b/sys/arch/hppa64/dev/elroy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: elroy.c,v 1.7 2010/05/24 15:06:03 deraadt Exp $ */ +/* $OpenBSD: elroy.c,v 1.8 2010/07/24 19:34:54 kettenis Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -317,6 +317,9 @@ elroy_iomap(void *v, bus_addr_t bpa, bus_size_t size, /* volatile struct elroy_regs *r = sc->sc_regs; */ int error; + /* Convert 32-bit PCI address to a 64-bit address. */ + bpa |= (HPPA_IOBEGIN | 0xff00000000UL); + if ((error = bus_space_map(sc->sc_bt, bpa + sc->sc_iobase, size, flags, bshp))) return (error); @@ -332,6 +335,9 @@ elroy_memmap(void *v, bus_addr_t bpa, bus_size_t size, /* volatile struct elroy_regs *r = sc->sc_regs; */ int error; + /* Convert 32-bit PCI address to a 64-bit address. */ + bpa |= (HPPA_IOBEGIN | 0xff00000000UL); + if ((error = bus_space_map(sc->sc_bt, bpa, size, flags, bshp))) return (error); @@ -1314,7 +1320,7 @@ letoh64(r->eio_base), letoh64(r->eio_mask)); #endif /* XXX evil hack! */ - sc->sc_iobase = 0xfffee00000; + sc->sc_iobase = 0xfee00000; sc->sc_iot = elroy_iomemt; sc->sc_iot.hbt_cookie = sc; |