summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/conf/files.i3865
-rw-r--r--sys/arch/i386/i386/machdep.c24
2 files changed, 26 insertions, 3 deletions
diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386
index 31a2caa0336..8fc49f6e4be 100644
--- a/sys/arch/i386/conf/files.i386
+++ b/sys/arch/i386/conf/files.i386
@@ -1,4 +1,4 @@
-# $OpenBSD: files.i386,v 1.39 1998/01/06 02:35:19 deraadt Exp $
+# $OpenBSD: files.i386,v 1.40 1998/04/26 21:03:14 provos Exp $
# $NetBSD: files.i386,v 1.73 1996/05/07 00:58:36 thorpej Exp $
#
# new style config file for i386 architecture
@@ -231,6 +231,9 @@ include "../../../compat/bsdos/files.bsdos"
include "../../../compat/freebsd/files.freebsd"
file arch/i386/i386/freebsd_machdep.c compat_freebsd
+# OSS audio driver compatibility
+include "compat/ossaudio/files.ossaudio"
+
device bios {}
attach bios at mainbus
file arch/i386/i386/bios.c bios needs-count
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 9b5699e9c3e..2cda7503f22 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.85 1998/04/25 20:31:27 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.86 1998/04/26 21:03:15 provos Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -2504,8 +2504,28 @@ _bus_dmamem_mmap(t, segs, nsegs, off, prot, flags)
bus_dma_segment_t *segs;
int nsegs, off, prot, flags;
{
+ int i;
+
+ for (i = 0; i < nsegs; i++) {
+#ifdef DIAGNOSTIC
+ if (off & PGOFSET)
+ panic("_bus_dmamem_mmap: offset unaligned");
+ if (segs[i].ds_addr & PGOFSET)
+ panic("_bus_dmamem_mmap: segment unaligned");
+ if (segs[i].ds_len & PGOFSET)
+ panic("_bus_dmamem_mmap: segment size not multiple"
+ " of page size");
+#endif
+ if (off >= segs[i].ds_len) {
+ off -= segs[i].ds_len;
+ continue;
+ }
+
+ return (i386_btop((caddr_t)segs[i].ds_addr + off));
+ }
- panic("_bus_dmamem_mmap: not implemented");
+ /* Page not found. */
+ return (-1);
}
/**********************************************************************