Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jan 2000 01:56:43 +0100 (CET)
From:      Juergen Lock <nox@jelal.kn-bremen.de>
To:        asmodai@wxs.nl
Cc:        Joachim Jdckel <Joachim.Jaeckel@d.kamp.net>, "freebsd-hackers@freebsd.org" <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: How to write a device-driver?
Message-ID:  <200001170056.BAA12210@saturn.kn-bremen.de>
In-Reply-To: <20000116193106.C283@daemon.ninth-circle.org>
References:  <3877F409.49088485@d.kamp.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <20000116193106.C283@daemon.ninth-circle.org> you write:
>-On [20000109 04:01], Joachim Jdckel (Joachim.Jaeckel@d.kamp.net) wrote:

>>And maybe you could give me a tip, whats the best point to start, a
>>linux-device-driver, something like a specification of the different
>>chips on the card (it seems, that there is no documentation of the card
>>from the manufacturer), or could I listen on the data, which is posted
>>between the system and the driver under windows? whatever...
>
>Linux drivers are fun as reference (not), mainly due to their weird use
>of jiffies(), inb() and outb() and the like.
>
Right, but they do show how to talk to the hardware, at least if
you know they really work and not just `coincidentally'...

>Most of the time the driver writers nag as long as possible at the
>vendor's door until we get documentation.  Some of us are particulary
>hesitant about accepting NDA's.
>
>The best thing to do is take the card and write/type all the part
>numbers on the chips on a piece of paper/temporary file.  And then you
>can go search for the datasheets of those parts at their respective
>vendor.  Some datasheets are not needed, others are very much the
>essence.
>
>Sometimes Windows drivers' .inf files come in handy for some id's abut
>the vendor and the card.

 And if you don't have working linux sources and you're truly
desperate (or just curious), go to the wintendo box (or boot DOS,
unfortunately doscmd doesn't seem to be compatible enough but the
free OpenDOS at least works), load its driver into IDA and look at
what it does.  (i don't have a link right now but just do an archie
search for ida37fw.zip, or use http://ftpsearch.lycos.com)  You
can also use it to only make a listing but often you have to at
least tell it about parts that are code for which it didn't find
obvious references to.  still i haven't yet seen anything else that
comes even close.

 Note: I seem to remember there are people who want to make
disassembling illegal...  I don't know what went of it and IANAL
(of course its a _silly_ idea), but i also remember there were
exceptions if its for the cause of interoperability, and writing
a driver for another OS sure would at least seem to fall under
that.

 ATB,
-- 
Juergen Lock <nox.foo@jelal.kn-bremen.de>
(remove dot foo from address to reply)


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001170056.BAA12210>