BIOS boot drive Number in PMode
Posted: Thu Apr 19, 2007 6:42 am
Hi All,
I'm currently writing the device manager of my OS which is proving to be a little challenging, but I'll get there! I use GRUB to load the manager as a separate module, so until this point I have *no* disk access in my OS.
I have just detected the floppy disks and was thinking, how can I be sure that the boot drive # passed to me by the BIOS can be correctly interpreted in PMode.
For example, HDDs have bit 7 set, fine. But if someone is using SATA and PATA drives simultaneously, how do I know which drive is 0x80? The same question applies for USB devices...
Cheers,
Adam
I'm currently writing the device manager of my OS which is proving to be a little challenging, but I'll get there! I use GRUB to load the manager as a separate module, so until this point I have *no* disk access in my OS.
I have just detected the floppy disks and was thinking, how can I be sure that the boot drive # passed to me by the BIOS can be correctly interpreted in PMode.
For example, HDDs have bit 7 set, fine. But if someone is using SATA and PATA drives simultaneously, how do I know which drive is 0x80? The same question applies for USB devices...
Cheers,
Adam