Good sources for writing (network) drivers?
Posted: Sat Aug 18, 2007 6:27 pm
Hello everybody. I was looking around quite some time for some decent Ethernet driver specifications.
As usual for any hardware, I kept on running into PDFs describing either the pins, electrical properties of chips, or other information that was practically useless for any real interfacing. They would usually give the hardware information, and possibly some nice diagrams that show how some specific operations are done.. however you would have to look really well, and have a lot of luck, to figure out what I/O port number is associated with any of the chip command or data registers. For some reason, this major information is usually either not present, or is hidden somewhere in the middle or near the end of the document as a small note. For example, when writing a driver for the floppy, (http://www.osdever.net/documents/82077A ... ?the_id=41) yes you figure out that reading a sector requires a lot of steps, however to actually try and program it, you would need to look at the small note somewhere at the bottom to see the "Table 9-2. I/O Address Map for the PC/AT" ...we are OS developers, no? So an address map of the device we are interfacing should be one of the most important aspect of actually writing the driver, no?..
But anyway, after much searching, I found one good source of information. I have searched osdev, osdever, osrc, and several other well known places, especially google. Many of them had this same old good source - http://www.nondot.org/sabre/os/files/Ne ... etails.pdf
This document gives no useless voltage hardware information. Instead it gives exactly what you need - quick theory about what is needed to initialize, transmit, and receive packets; nice big diagrams describing the operations for transmitting and receiving packets; and finally, most importantly, it provides the source code for initializing the chip, it provides the source code for an interrupt handler for receiving packets, and it provides the source code for sending a packet. All of this source code is small, full, and complete - Nothing is lacking. The port numbers and everything is present. In fact, it is written in such a simple way, that translating it into any other languages, like C, would be a piece of cake.
Unfortunately, I do not have such a network card, and so I cannot test out this nice documentation. I looked around the file, trying to find some key words or phrases that would produce similar results with other network cards, or general hardware. Perhaps I have not looked well enough, for I found nothing. Does anybody know any sources that have documentations in this format? I cannot tell.. usually the following phrases appear for hardware documentations: "Documentation", "Data Sheet", "Reference Manual", "Technical Reference", "Technology Manual", "Interface Specification", and "Specification"
Does anybody know the best phrase for documentations, specific for writing a device driver, preferably similar to the DP8390 documentation I posted? Perhaps some source that provides solely this type of documentation for writing device drivers?
Thank you,
ComputerPsi
As usual for any hardware, I kept on running into PDFs describing either the pins, electrical properties of chips, or other information that was practically useless for any real interfacing. They would usually give the hardware information, and possibly some nice diagrams that show how some specific operations are done.. however you would have to look really well, and have a lot of luck, to figure out what I/O port number is associated with any of the chip command or data registers. For some reason, this major information is usually either not present, or is hidden somewhere in the middle or near the end of the document as a small note. For example, when writing a driver for the floppy, (http://www.osdever.net/documents/82077A ... ?the_id=41) yes you figure out that reading a sector requires a lot of steps, however to actually try and program it, you would need to look at the small note somewhere at the bottom to see the "Table 9-2. I/O Address Map for the PC/AT" ...we are OS developers, no? So an address map of the device we are interfacing should be one of the most important aspect of actually writing the driver, no?..
But anyway, after much searching, I found one good source of information. I have searched osdev, osdever, osrc, and several other well known places, especially google. Many of them had this same old good source - http://www.nondot.org/sabre/os/files/Ne ... etails.pdf
This document gives no useless voltage hardware information. Instead it gives exactly what you need - quick theory about what is needed to initialize, transmit, and receive packets; nice big diagrams describing the operations for transmitting and receiving packets; and finally, most importantly, it provides the source code for initializing the chip, it provides the source code for an interrupt handler for receiving packets, and it provides the source code for sending a packet. All of this source code is small, full, and complete - Nothing is lacking. The port numbers and everything is present. In fact, it is written in such a simple way, that translating it into any other languages, like C, would be a piece of cake.
Unfortunately, I do not have such a network card, and so I cannot test out this nice documentation. I looked around the file, trying to find some key words or phrases that would produce similar results with other network cards, or general hardware. Perhaps I have not looked well enough, for I found nothing. Does anybody know any sources that have documentations in this format? I cannot tell.. usually the following phrases appear for hardware documentations: "Documentation", "Data Sheet", "Reference Manual", "Technical Reference", "Technology Manual", "Interface Specification", and "Specification"
Does anybody know the best phrase for documentations, specific for writing a device driver, preferably similar to the DP8390 documentation I posted? Perhaps some source that provides solely this type of documentation for writing device drivers?
Thank you,
ComputerPsi