home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] Engineer's question -- where and how do peripherals store their identity?

  • Subject: Re: [OCLUG-Tech] Engineer's question -- where and how do peripherals store their identity?
  • From: Bart Trojanowski <bart-oclug [ at ] jukie [ dot ] net>
  • Date: Mon, 10 Dec 2007 13:24:58 -0500
* William Case <billlinux [ at ] rogers [ dot ] com> [071210 13:08]:
> This is a physical, hardware question: Where is the device identity
> registered on the device and how is it probed?

Depends on the bus and type of device.  Some have it in EEPROM, some
have it hardwired, some have it in firmware.

> Does each device have a EEPROM or is the identity hardwired in place by
> the manufacturer?  Does a 'probe' send a signal down the control lines
> on a bus and report back an identity for each device it finds? How?  On
> the Data Lines?  Is there a specific function, in BIOS, in the kernel,
> in udev, that accomplishes this?

On some buses you have to send a message requesting that info; I think
that's how USB works.  On other buses you just read a bus memory
address; this is how PCI works.

I don't think the x86 BIOS knows anything about vendor/device IDs.  The
BIOS tends to be simple.  It uses generic drivers, as opposed to Linux
which uses specialized drivers when ever possible.

In the PCI config space, and I would imagine on other buses too, there
are fields that identify device class.  A device could be a "IDE device"
in which case the BIOS would talk to it using the legacy IDE interface,
even though there may be a faster way to talk to the device.

> What does the kernel do with that data?  I have a kernel manual for 2.6
> and greater.  The manual is silent or I have mis-read something.

Upon discovering a new device on a bus, the kernel will ask all
registered drivers (all, within reason) if they can handle it.  If there
is no match, it will ask a user space helper to load a module that will.

-Bart

-- 
				WebSig: http://www.jukie.net/~bart/sig/