Date: Tue, 24 Oct 2000 10:17:42 -0700 From: Julian Elischer <julian@elischer.org> To: current@freebsd.org Subject: Re: cvs commit: src/share/examples/drivers make_device_driver.sh Message-ID: <39F5C436.FA31632@elischer.org> References: <200010241645.JAA72540@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Julian Elischer wrote: Over the last 3 yearrs or so I've been ignoring the device interface. but now I think it's stabilised to a point where it's worth learning about its new form. So I decided that the best way to try understand the newbus stuff (and other associated stuff) was to try use it, and I've been meaning to update these samples for a long time. This hasn't been very easy due to the lack of a high-level overview to the new stuff (Oh how I miss the days when a quick read through about 3 files told you how all the device interface worked.. of course it didn't work all that WELL but it was at least easy to comprehend) Anyhow Having scanned various files (e.g. joy.c, vn.c, if_ed.c isahint.c pnpparse.c etc.) and looked at some man (9) pages, I still don't know lots (like how do I get the damned interupts registered) but at least it LOOKs like it might create a reasnably modern ISA driver. I'd certainly like to get suggestions on how to do bits better so that I can make this a sample skeleton generator that is actually USEFUL again. Bit's I'm not sure about yet include: how do I handle non-PNP isa devices.. did I get it right? where do I add the 'hints' information? can I add it to somewhere in this file, or must I edit the main hints file (wouldn't really work for modules)? How should I register the interrupt handler? Am I deriving the softc from the dev-t in the correct manner? do split the functionality between probe and attach correctly? does the same softc persist between the two? I'm still reading but comments from the new device-meisters might save a lot of pain and confusion. If the high-level overview I've been lookign for exists somewhere but I just haven't found it, then please let me know before I mke an even bigger fool of myself..! julian > > julian 2000/10/24 09:45:58 PDT > > Modified files: > share/examples/drivers make_device_driver.sh > Log: > First effort at bringing these up-to-date. > This creates a skeleton ISA device driver. > I don't pretend that it's fully correct or even opitimal > but it at least creates (and compiles) a 'clean' ISA driver. > > Hopefully PCI/PCCARD/etc. support will be added when I understand it. > Unlike the old version this just creates a module. The old one tried to > create a new kernel with the driver to be tested. > > Revision Changes Path > 1.7 +280 -291 src/share/examples/drivers/make_device_driver.sh -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000 ---> X_.---._/ presently in: Budapest v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39F5C436.FA31632>