summaryrefslogtreecommitdiffstats
path: root/sys/kern/bus_if.m
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1999-05-10 17:06:14 +0000
committerdfr <dfr@FreeBSD.org>1999-05-10 17:06:14 +0000
commit1a3fdb21c5acf7af5eca2961539bd7f56a877ce4 (patch)
treebdc48f1aabde5d55cbfb9dfdcfa5aec92a0e21b3 /sys/kern/bus_if.m
parent951dcb68cee2c9e6497dc48f2e3de3440be0b3c9 (diff)
downloadFreeBSD-src-1a3fdb21c5acf7af5eca2961539bd7f56a877ce4.zip
FreeBSD-src-1a3fdb21c5acf7af5eca2961539bd7f56a877ce4.tar.gz
* Augment the interface language to allow arbitrary C code to be 'passed
through' to the C compiler. * Allow the interface to specify a default implementation for methods. * Allow 'static' methods which are not device specific. * Add a simple scheme for probe routines to return a priority value. To make life simple, priority values are negative numbers (positive numbers are standard errno codes) with zero being the highest priority. The driver which returns the highest priority will be chosen for the device.
Diffstat (limited to 'sys/kern/bus_if.m')
-rw-r--r--sys/kern/bus_if.m18
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/kern/bus_if.m b/sys/kern/bus_if.m
index d7c9cd4..33383ff 100644
--- a/sys/kern/bus_if.m
+++ b/sys/kern/bus_if.m
@@ -23,12 +23,26 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Id: bus_if.m,v 1.7 1999/04/16 21:22:37 peter Exp $
+# $Id: bus_if.m,v 1.8 1999/05/08 21:59:34 dfr Exp $
#
INTERFACE bus;
#
+# Default implementations of some methods.
+#
+CODE {
+ static struct resource *
+ null_alloc_resource(device_t dev, device_t child,
+ int type, int *rid,
+ u_long start, u_long end,
+ u_long count, u_int flags)
+ {
+ return 0;
+ }
+};
+
+#
# This is called from system code which prints out a description of a
# device. It should describe the attachment that the child has with
# the parent. For instance the TurboLaser bus prints which node the
@@ -112,7 +126,7 @@ METHOD struct resource * alloc_resource {
u_long end;
u_long count;
u_int flags;
-};
+} DEFAULT null_alloc_resource;
METHOD int activate_resource {
device_t dev;
OpenPOWER on IntegriCloud