home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / amiga / 1973 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  1.9 KB

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