summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2010-07-24 19:34:54 +0000
committerkettenis <kettenis@openbsd.org>2010-07-24 19:34:54 +0000
commitb2d0b076f7adf2024c40c0050182ef06dd88f286 (patch)
treeb1d953fd27b5f47a9773bddbf766dd73789b8423
parentkqueue(2) is currently broken when used with /dev/null and a few other (diff)
downloadwireguard-openbsd-b2d0b076f7adf2024c40c0050182ef06dd88f286.tar.xz
wireguard-openbsd-b2d0b076f7adf2024c40c0050182ef06dd88f286.zip
Convert PCI addresses to proper 64-bit physical addresses.
-rw-r--r--sys/arch/hppa64/dev/elroy.c10
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;