home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / linux / 8222 < prev    next >
Encoding:
Internet Message Format  |  1992-08-14  |  2.6 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!rpi!crdgw1!rdsunx.crd.ge.com!ariel!davidsen
  2. From: davidsen@ariel.crd.GE.COM (william E Davidsen)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: loadable device drivers
  5. Message-ID: <1992Aug14.142033.26899@crd.ge.com>
  6. Date: 14 Aug 92 14:20:33 GMT
  7. References: <2659@nlsun1.oracle.nl> <1992Aug13.151040.284@bernina.ethz.ch>
  8. Sender: usenet@crd.ge.com (Required for NNTP)
  9. Reply-To: davidsen@crd.ge.com (bill davidsen)
  10. Organization: GE Corporate R&D Center, Schenectady NY
  11. Lines: 46
  12. Nntp-Posting-Host: ariel.crd.ge.com
  13.  
  14. In article <1992Aug13.151040.284@bernina.ethz.ch>,
  15.   almesber@nessie.cs.id.ethz.ch (Werner Almesberger) writes:
  16. | In article <2659@nlsun1.oracle.nl> jhelberg@nl.oracle.com (Joost Helberg) writes:
  17. | > Far too long, and you have to reboot too! i.e. all users have to 
  18. | > get coffee or tea!
  19. | You're developping new drivers while users are working on your machine ?
  20. | Poor users ... ;-)
  21. | > The kernel must be mapped when implementing loadable device drivers (to
  22. | > get page-faults) so the kernel doesn't need contiguous memory --> less
  23. | > problems allocating memory.
  24. | Page-faults are deadly for most parts of the kernel. Unless the interrupt
  25. | handling is changed in radical ways (see below), you don't want interrupt
  26. | handlers and code that's called by them to reside in paged memory. (Besides
  27. | the obvious case of device drivers that may be possibly invoked when
  28. | handling a page fault.)
  29. | Using the paging hardware to map kernel pages is a good idea, though.
  30.  
  31.   This is a good point, and at the risk of saying "me too" I'll expand
  32. on it a bit, the idea that a loadable driver would, for some reason,
  33. have to be contiguous with the kernel, is obviously not correct. The
  34. parts used to handle an interrupt would have to be resident, and unless
  35. someone wants to get very tricky I would suspect the whole thing must
  36. be.
  37.  
  38.   On the other hand that's been proposed as a solution for possible page
  39. faults on the shared library if jump tables are used (not a great idea
  40. on small systems, I think), and I believe there is code to nail a page
  41. in memory right now.
  42.  
  43.   The general steps for loading a driver are:
  44.     1. get the driver in memory
  45.     2. link the ints
  46.     3. link the vectors for strategy and ioctl
  47.     4. mark the pages as locked in memory.
  48.  
  49. Actually you better do 4 before 2&3, but you see the problem.
  50.  
  51.   As Werner points out, the problem is not simple, but neither is it
  52. nearly as complex as it might appear.
  53. -- 
  54. bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345
  55.     I admit that when I was in school I wrote COBOL. But I didn't compile.
  56.