summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/i386/i386/machdep.c12
-rw-r--r--sys/arch/i386/include/bus.h3
2 files changed, 13 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index caab972c8d9..2e0ed22d293 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.518 2012/12/02 07:03:31 guenther Exp $ */
+/* $OpenBSD: machdep.c,v 1.519 2012/12/04 20:51:10 kettenis Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -3844,6 +3844,16 @@ bus_space_subregion(bus_space_tag_t t, bus_space_handle_t bsh,
return (0);
}
+paddr_t
+bus_space_mmap(bus_space_tag_t t, bus_addr_t addr, off_t off, int prot, int flags)
+{
+ /* Can't mmap I/O space. */
+ if (t == I386_BUS_SPACE_IO)
+ return (-1);
+
+ return (addr + off);
+}
+
#ifdef DIAGNOSTIC
void
splassert_check(int wantipl, const char *func)
diff --git a/sys/arch/i386/include/bus.h b/sys/arch/i386/include/bus.h
index 7b3515120ba..a6f92620a44 100644
--- a/sys/arch/i386/include/bus.h
+++ b/sys/arch/i386/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.55 2012/09/30 10:17:46 miod Exp $ */
+/* $OpenBSD: bus.h,v 1.56 2012/12/04 20:51:10 kettenis Exp $ */
/* $NetBSD: bus.h,v 1.6 1996/11/10 03:19:25 thorpej Exp $ */
/*-
@@ -101,6 +101,7 @@ void _bus_space_unmap(bus_space_tag_t, bus_space_handle_t,
bus_size_t, bus_addr_t *);
int bus_space_subregion(bus_space_tag_t t, bus_space_handle_t bsh,
bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp);
+paddr_t bus_space_mmap(bus_space_tag_t, bus_addr_t, off_t, int, int);
int bus_space_alloc(bus_space_tag_t t, bus_addr_t rstart,
bus_addr_t rend, bus_size_t size, bus_size_t align,