> On Jan 27, 2022, at 4:34 PM, valerij zaporogeci <vlrzpr...@gmail.com> wrote:
> 
> Hi, edk2. I would be glad to clarify one thing. When I request all
> handles, on which Block IO protocol (BIOP) is installed (through
> LocateHandleBuffer(ByProtocol), and then open Device Path protocol
> (DPP) on every of them to see what devices support BIOP, I don't see
> ones, that should represent the whole physical (raw) disk. In other
> words, there are no devices, whose DP would end with 4.1 Type.SubType
> node _and_ partition number n == 0, this is what the spec suggests as
> a way of representing the whole (raw) disk (as opposite to a
> partition, on which n =/= 0). Instead, I am getting BIOP instances on
> devices, whose DP ends at the level before, a parent device that is,
> for example, say 3.1 (Messaging.ATAPI). These are supposedly for
> representing the whole (raw) disk? because there are no other thing
> being that. E.g. if I have a harddisk with MBR and one partition on
> it, the DP for the partition device, supporting BIOP, would be
> something like:
> 
> PciRoot(0)\Pci(0, 0)\Ata(0)\HD(1, MBR, sign, start, size)
> 
> But there wouldn't be a device enumerated like:
> 
> PciRoot(0)\Pci(0, 0)\Ata(0)\HD(0,MBR, sign)
> 
> Instead, there would be one like this:
> 
> PciRoot(0)\Pci(0, 0)\Ata(0)
> 
> the question is:
> what DP the specification defines to represent a whole (raw) disk?
> 1) the one, ending with 4.1 Type.SubType and partition number n == 0

I see the text in table 10-49 but I don’t know of any code that makes a node 
for the entire disk partition. 

If you look at the BlockIO protocol the partitions that are created due to the 
partitions on the disk will have BlockIo->Media->LogicalPartition set to TRUE.

The partition driver produce a logical partition for each valid MBR partition:
https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c

The disk driver is going to produce a device path that points to the raw disk:
PciRoot(0)\Pci(0, 0)\Ata(0)

> 2) the DP of the parent of any partition, residing on it, for example
> the one, ending with 3.1 Type.SubType
> 

This is the raw disk as produced by the disk driver. 
BlockIo->Media->LogicalPartition is FALSE.

I don’t remember the use case for HD(0,MBR, sign) type of device path node? It 
is not for legacy BOOT as that would be a BBS entry. 

Thanks,

Andrew Fish

> Thank you.
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86130): https://edk2.groups.io/g/devel/message/86130
Mute This Topic: https://groups.io/mt/88735432/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to