Page 2 of 2

Re: Get Boot Device in UEFI

Posted: Tue Dec 03, 2024 2:23 pm
by Octocontrabass
robertapengelly wrote: Tue Dec 03, 2024 1:19 amsecondary IDE channel
Looks like primary IDE channel to me.
robertapengelly wrote: Tue Dec 03, 2024 1:19 amStill a little confused as to what the rest of it means though.
The bit at the end means it's the first partition in the partition table, the partition table is a legacy MBR, the MBR signature is 0x6EF86D7A, the partition starts at LBA 011(typo?), and the partition is 0x1043F blocks long. I'm not sure why there's no file path after that.

Re: Get Boot Device in UEFI

Posted: Wed Dec 04, 2024 2:17 am
by robertapengelly
Yeah, it was a typo it was supposed to be 0x11, so the partition starts at 17 and is 66623 sectors which is right for my partition.
Octocontrabass wrote: Tue Dec 03, 2024 2:23 pm Looks like primary IDE channel to me.
What's the 0x7, 0x1 for then? I'm guessing your referring to the Ata part as the primary IDE channel?

Re: Get Boot Device in UEFI

Posted: Fri Dec 06, 2024 1:02 pm
by Octocontrabass
robertapengelly wrote: Wed Dec 04, 2024 2:17 amWhat's the 0x7, 0x1 for then?
That tells you you'll find the IDE controller at device 0x7 function 0x1 when you enumerate the PCI bus. The ATA part tell you where you'll find the drive when you enumerate the IDE controller.

Re: Get Boot Device in UEFI

Posted: Sat Dec 07, 2024 9:35 pm
by robertapengelly
Awesome thanks for all your help. One last thing, I thought PCI disks are 0x1F0 and 0x170, have I got them wrong or am I mistaking what you mean with the device/function stuff?

Re: Get Boot Device in UEFI

Posted: Sat Dec 07, 2024 10:10 pm
by Octocontrabass
robertapengelly wrote: Sat Dec 07, 2024 9:35 pmOne last thing, I thought PCI disks are 0x1F0 and 0x170, have I got them wrong or am I mistaking what you mean with the device/function stuff?
I think you might be getting something mixed up. The device/function is the address within the PCI configuration space where you'll find the PCI IDE controller's configuration registers. You'll read the class code from the configuration space to see whether the IDE controller is operating in PCI native mode or ISA compatibility mode. In PCI native mode, you need to read the Base Address Registers in the configuration space to find the I/O ports for communicating with the disks. In ISA compatibility mode, you'll use ports 0x1F0 and 0x170.