Device driver for a device

Device driver for a device

Post by Nitin Kuma » Wed, 24 Feb 1999 04:00:00

When a new device is installed how does the OS know what driver to use
for that device. Usually the kernel can lookup the name in the PROM of
the device and use that name. But if the PROM does not have a name, how
will the kernel know ? I am not sure I completely understand the
functionality of the .conf file.

1. Device driver calling another device driver.


I am having a problem writing a "meta-driver", ie one that is sandwiched
between the kernel and a real device driver. The platform I am using
consists of a Sun IPC, running SunOS 4.1.1.

My problem is that in attempting to use the OPEN(2V) system call from within
the "xxopen" routine of my metadriver (to open another device-driver (which
then opens the device)); OPEN(2V) "fails".

It appears that calling OPEN(2V) from within the kernel requires a different
calling sequence and argument list. Viz-a-viz: instead of a file descriptor
being returned by OPEN(2V), it seems a pointer is returned (which itself is
a pointer to something else).

Is this true? Is the OPEN(2V) syscall different for a process executing in
user address space, compared to the OPEN call executed by a process running
in kernel mode/address space?

If this is true for OPEN, what about CLOSE, READ, WRITE, etc? Unfortunately,
I don't have (easy) access to any Unix (source) code, to verify this.

Thanks in advance for help/advice.

2. FreeBSD 4.1 HangsUP

3. Device driver question (generic device driver)

4. XFree86 problem with MGA G450(mellinuem)

5. need device: devices.pci.b7100010:devices.pci.b7100092

6. strange result of 'du -sk'

7. character device, block device , raw device?

8. long delays completing NFS mounts

9. PCI device vs SCSI device driver

10. Device driver devices.pci.scsi missing

11. New device device driver development tool for Solaris.

12. one device driver and 2 devices for it, impossible with linux ?

13. My first device driver => "No such device" :(