From bea9d4e38c5eebb1471e71a81f91acd6d6487bb4 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Fri, 3 Oct 1997 20:53:38 +0000 Subject: Add links to manpages. --- en/tutorials/ddwg/ddwg.sgml | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) (limited to 'en/tutorials') diff --git a/en/tutorials/ddwg/ddwg.sgml b/en/tutorials/ddwg/ddwg.sgml index 41cbbafa64..9cb25739aa 100644 --- a/en/tutorials/ddwg/ddwg.sgml +++ b/en/tutorials/ddwg/ddwg.sgml @@ -6,7 +6,7 @@ ++ ++ Copyright Eric L. Hernes - Wednesday, August 2, 1995 ++ - ++ $Id: ddwg.sgml,v 1.3 1996-12-28 23:36:51 mpp Exp $ + ++ $Id: ddwg.sgml,v 1.4 1997-10-03 20:53:38 wosch Exp $ ++ ++ Sgml doc for something --> @@ -58,7 +58,8 @@ device opened. These are available through the macros -The manual page. It is recommended that you check these for access modes in <sys/fcntl.h> and do what is required. For example if -The d_read() and d_write() entry points are called when read(2) and -write(2) are called on your device from user-space. The transfer +The d_read() and d_write() entry points are called when + and + +are called on your device from user-space. The transfer of data can be handled through the kernel support routine uiomove(). d_ioctl() @@ -120,7 +123,9 @@ d_ioctl(dev_t dev, int cmd, caddr_t arg, int flag, struct proc *p) d_ioctl() is a catch-all for operations which don't make sense in a read/write paradigm. Probably the most famous of all ioctl's is on -tty devices, through stty(1). The ioctl entry point is called from +tty devices, through +. +The ioctl entry point is called from ioctl() in sys/kern/sys_generic.c

There are four different types of ioctl's which can be implemented. @@ -228,7 +233,8 @@ scatter-gather io via the readv() and writev() system calls. -This structure is required, but generally it is created by config(8) +This structure is required, but generally it is created by + from the kernel configuration file. It is required on a per-device basis, meaning that if you have a driver which controls two serial boards, you will have two isa_device structures. If you build a @@ -281,7 +287,8 @@ initialize your device. The ). The .

If the driver has data structures and ioctl's which are specific to @@ -455,7 +463,8 @@ The steps required to add your driver to the standard FreeBSD kernel are Add to the driver list Add an entry to the [bc]devsw Add the driver entry to the kernel config file - config(8), compile, and install the kernel + , +compile, and install the kernel make required nodes. reboot. @@ -476,7 +485,9 @@ The first field is the pathname of the driver module relative to /usr/src/sys. For the case of a binary driver the path would be something like ``i386/OBJ/joy.o''. -The second field tells config(8) that this is an optional driver. Some +The second field tells + +that this is an optional driver. Some devices are required for the kernel to even be built. The third field is the name of the device. @@ -512,7 +523,8 @@ d_ioctl_t joyioctl; This either defines your entry points, or null entry points which will return ENXIO when called (the #else clause). -The include file ``joy.h'' is automatically generated by config(8) when +The include file ``joy.h'' is automatically generated by + when the kernel build tree is created. This usually has only one line like: #define NJOY 1 @@ -569,7 +581,8 @@ the network class. It uses interrupt 10. It uses 32k of shared memory at physical address 0xd0000. It also defines it's interrupt handler to be ``ixintr()'' -config(8) the kernel. + +the kernel.

Now with our config file in hand, we can create a kernel compile directory. This is done by simply typing: @@ -632,7 +645,8 @@ Lines 17 - 26 -- This includes the file ``pca.h'' and conditionally compiles the rest of the LKM on whether or not we have a pcaudio device defined. This -mimics the behavior of config. In a standard device driver, config(8) +mimics the behavior of config. In a standard device driver, + generates the pca.h file from the number pca devices in the config file. 17 /* -- cgit v1.3