home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!agate!cogsci.Berkeley.EDU!ag
- From: ag@cogsci.Berkeley.EDU (Keith Gabryelski)
- Newsgroups: comp.unix.amiga
- Subject: Re: Writing a driver for an autoconfig (graphic) card
- Date: 13 Aug 1992 20:37:59 GMT
- Organization: Institute of Cognitive Studies, U.C. Berkeley
- Lines: 38
- Message-ID: <16eh77INN99b@agate.berkeley.edu>
- References: <1992Aug13.115710.4162@tom.rz.uni-passau.de>
- NNTP-Posting-Host: cogsci.berkeley.edu
-
- In article <1992Aug13.115710.4162@tom.rz.uni-passau.de> hessmann@unipas.fmi.uni-passau.de (Georg Hessmann) writes:
- >first of all, I want write a X-server for a new graphic card.
- >It's an autoconfig (Zorro2) card with two autoconfig regions
- >(64kB+1MB).
-
- No sweat. There should be plenty of example server code in the
- X source distribution included with 2.03.
-
- >My first problem is now to create a /dev device for the card
- >to mmap() the memory into the virtual memory.
-
- An example driver is in /usr/src/sys/amiga/driver/a2410.c (or
- maybe tiga.c I have forgotten now).
-
- You will probably need a basic knowledge of kernel work/device
- drivers that I cannot giv you over the net. By a book on building
- SVR4 device drivers (or just device drivers in general).
-
- Probably a blue book by Unix Press: UNIX SYSTEM V RELEASE 4
- Device Driver Interface/;Driver-Kernel Interface
- (DDI/DKI) reference manual.
-
- >How can I do this?
- >How can I create a dev file (or two?) which correspond to the
- >autoconfig card? What changes (where) must I do into the kernel?
-
- device files are made by `mknod'. They correspond to a major
- number that points to a particular driver in the kernel. device
- nodes also have a minor number that is passed to the device driver
- so it can divide tasks among several file names.
-
- >Should I implement ioctl() calls for the device? How?
-
- You probably won't need to. You will need to mmap() the memory
- of the card into user space. This can be done without an ioctl()
- interface.
-
- Pax, Keith
-