linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Udev support for EDD
@ 2005-09-01 20:15 John_Hull
  2005-09-02  0:57 ` Kay Sievers
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: John_Hull @ 2005-09-01 20:15 UTC (permalink / raw)
  To: linux-hotplug

I'd like to get feedback from this mailing list on a small project I've
been working on, which is adding support to udev for the persistent
naming of BIOS disk devices via EDD. EDD is mechanism to match x86 BIOS
device names (e.g. int13 device 80h) to Linux device names (e.g.
/dev/sda, /dev/hda), and a kernel module to support this was written by
Matt Domsch (see http://linux.dell.com/projects.shtml#edd for more
information). The EDD module makes device information available in
/sys/firmware/edd/int13_dev8*/, with the directory containing various
information for each device. For example, the first BIOS disk drive
would be int13_dev80, the second int13_dev81, etc. 

My udev persistent namimg implementation for EDD results in the example
following tree:

$ tree /dev/disk/by-bios-id
/dev/disk/by-bios-id/
|-- int13_dev80 -> ../../sda
|-- int13_dev80part1 -> ../../sda1
|-- int13_dev80part2 -> ../../sda2
|-- int13_dev80part5 -> ../../sda5
|-- int13_dev80part6 -> ../../sda6
|-- int13_dev81 -> ../../sdb
|-- int13_dev81part1 -> ../../sdb1
`-- int13_dev81part2 -> ../../sdb2

To match the int13_dev8* device to the kernel block device, the
"mbr_signature" for the device exposed by EDD must be matched to the
disk signature read directly from the device by a user-space program
(signature is 4-bytes long starting at offset 0x1B8 on the disk). To
ensure that each disk can be matched to the corresponding BIOS disk,
each disk should have a unique disk signature. In my current
implementation with udev, I pass the kernel device (hd* or sd*) to a
bash script which reads its signature and then tries to match it to a
corresponding mbr_signature in the int13_dev* directories. If there is a
unique match, it returns this directory to udev, and returns nothing
otherwise. 

I have placed a rules file and the script that it calls here:
http://linux.dell.com/files/edd/udev/, as well as a Python module that
can be used to read and write the signatures. Please review my approach
and let me know how I can improve this for eventual inclusion with udev.


	John


John A. Hull
Linux Solutions Development
Dell Inc.
 


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-09-06 10:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-01 20:15 Udev support for EDD John_Hull
2005-09-02  0:57 ` Kay Sievers
2005-09-02 15:13 ` John_Hull
2005-09-02 18:30 ` John_Hull
2005-09-06  3:10 ` Matt Domsch
2005-09-06  3:23 ` Matt Domsch
2005-09-06 10:24 ` Kay Sievers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).