[haiku-development] Re: Hard drive BIOS number for device?

  • From: Michael Pfeiffer <michael.w.pfeiffer@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 17 Apr 2008 07:14:34 +0200

Am 16.04.2008 um 23:00 schrieb Axel Dörfler:
Michael Pfeiffer <michael.w.pfeiffer@xxxxxxxxx> wrote:
Am 16.04.2008 um 19:27 schrieb Axel Dörfler:
Michael Pfeiffer <michael.w.pfeiffer@xxxxxxxxx> wrote:
In order to boot from another than the first hard drive the
needs a mapping from hard drive device path to the BIOS hard drive
number, that starts with 0x80 for the first drive.
Is there an API already that provides that information?
Yes there is, it's just not implemented in Haiku yet
(B_GET_BIOS_DRIVE_ID ioctl()) :-)
Great. Whom do I have to pay to get it implemented :-)

Do you insist on not looking yourself? ;-)

Well, I did not expect to do kernel development when I applied for the bootman UI task. I don't prefer, but I can try it, of course I will be much slower than someone who is familiar with the kernel.

It's even a bit of work, but I can outline it a bit:
1) the boot loader needs to make a connection between drive ID and disk
in a way that the OS can recognize it again. IIRC BeOS uses a sum/hash
of the contents of a few blocks until it has enough to differentiate
all (BIOS) drives. The name, or serial number is probably not reliably
available from the BIOS, but I haven't really tried that yet.
2) it would need to store that information in the kernel_args
3) when the OS detects the drives, it would see in that structure how
it can recognize the drive again, and can then store the BIOS ID of
that drive internally, so that B_GET_BIOS_DRIVE_ID can work as

Interesting, when I woke up this morning, I had something similar in mind :-)

- Michael

Other related posts: