1 Sep 2004 02:33
attaching a device
Christopher Keeley <info <at> zero1-net.com>
2004-09-01 00:33:33 GMT
2004-09-01 00:33:33 GMT
Hello all. I have a question I hope somebody can shed some light on for me. Im currently reading through OpenBSD system source code in the process creating a hardware device driver for an x86 platform. I am familiar with creating 'pseudo-device' driver(s) but would like to write something hardware specific. Am I correct in the knowledge that: a) in order for the kernel to execute the appropriate driver functions for a given block device driver, say, 'ide hard disk', it is necessary to create an instance of the 'cfattach' structure? b) I then proceed to add the relevant functions for the driver e.g attach, probe et al to the pointer(s) to function(s) in the 'cfattach' structure?. c) I need to create and initialise a 'cfdriver' structure? I realise there are other thing to do, but I would like to know if these are the necessary steps in order for the kernel to run the relevant 'attach' and 'probe' functions etc for a block device driver? Its quite obvious that Im a n00b driver writer so forgive me if the explanation of what I am trying to achieve is somewhat lacking in relevant detail or(Continue reading)
RSS Feed