Module Name: src
Committed By: pooka
Date: Sun Sep 22 20:51:18 UTC 2013
Modified Files:
src/sys/rump/include/sys: bus.h
Log Message:
Make dma_tag_t a bit more useful.
XXX: this header should definitely not exist, but given that it does,
let's use it to make life easier. The implication of its existence is
that x86 port rump kernel components are not ABI-compatible with kernel
modules which use bus_space/bus_dma. I'm not sure if anyone is interested
in that...
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/include/sys/bus.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/rump/include/sys/bus.h
diff -u src/sys/rump/include/sys/bus.h:1.1 src/sys/rump/include/sys/bus.h:1.2
--- src/sys/rump/include/sys/bus.h:1.1 Fri Jul 15 23:40:56 2011
+++ src/sys/rump/include/sys/bus.h Sun Sep 22 20:51:18 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.1 2011/07/15 23:40:56 dyoung Exp $ */
+/* $NetBSD: bus.h,v 1.2 2013/09/22 20:51:18 pooka Exp $ */
/*
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@@ -29,20 +29,19 @@
#define _SYS_RUMP_BUS_H_
/*
- * This is a blanket header for archs which are inline/macro-happy
- * in their bus.h header. Currently, this is anything but x86.
- * After an arch is cured from inline scurvy, the native bus.h
- * should be used.
+ * This is a blanket header since archs are inline/macro-happy.
+ *
+ * XXX: this file should NOT exist here
*/
/* bus space defs */
-typedef int bus_addr_t;
-typedef int bus_size_t;
+typedef unsigned long bus_addr_t;
+typedef unsigned long bus_size_t;
typedef int bus_space_tag_t;
typedef int bus_space_handle_t;
/* bus dma defs */
-typedef int *bus_dma_tag_t;
+typedef void *bus_dma_tag_t;
typedef struct {
bus_addr_t ds_addr;
@@ -50,6 +49,14 @@ typedef struct {
} bus_dma_segment_t;
typedef struct {
+ bus_size_t _dm_size;
+ int _dm_segcnt;
+ bus_size_t _dm_maxmaxsegsz;
+ bus_size_t _dm_boundary;
+ bus_addr_t _dm_bounce_thresh;
+ int _dm_flags;
+ void *_dm_cookie;
+
bus_size_t dm_maxsegsz;
bus_size_t dm_mapsize;
int dm_nsegs;