public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Andrew Fish" <afish@apple.com>
To: valerij zaporogeci <vlrzprgts@gmail.com>
Cc: devel@edk2.groups.io
Subject: Re: [edk2-devel] Question about Block IO protocol devices
Date: Thu, 27 Jan 2022 19:19:40 -0800	[thread overview]
Message-ID: <F23BA6FC-5F52-4878-9926-490CBE97B376@apple.com> (raw)
In-Reply-To: <CANPuzFw=WDr3DqHQXC4iK9+HEq=d9aqvmPn9f3Ui1Zpn=M-PTg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1505 bytes --]



> On Jan 27, 2022, at 6:19 PM, valerij zaporogeci <vlrzprgts@gmail.com> wrote:
> 
> Thank you, Andrew, for the clarification.
> 
>> I don’t remember the use case for HD(0,MBR, sign) type of device path node?
> 
> don't know, how much of usability it would have per se, but
> representing a raw disk this way, would give an easier way to find
> them out. because all such would end with the same 4.1 Type.SubType
> and partition number. without this, a raw disk could be 3.1, or 3.25
> or 3.26 or 3.29 or even 1.4 (VenHw(GUID)) or 1.1 (Pci(2, 0)) as is
> with OVMF for qemu arm64.
> 

In general is it bad to assume what the disk node is going to look like. You have know idea what the transport is going to look like and how that transport enumerates disks. 

As I mentioned the BlockIO protocol instance will tell you if it is for a physical disk or partition via the BlockIo->Media->LogicalPartition member. 

> And yet one thing. The Signature field in the 4.1 typed node for the
> case of GPT for a partition device. Did I understand correctly, that
> its should contain the same GUID as is in the corresponding GUID
> Partition Array entry field UniquePartitionGuid for that partition?
> Because one implementation (not edk2) puts as the Signature field
> DiskGuid in every partition Device Path node.

Yes it is the UniquePartitionGUID
https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c#L389

Thanks,

Andrew Fish




[-- Attachment #2: Type: text/html, Size: 2841 bytes --]

  reply	other threads:[~2022-01-28  3:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28  0:34 Question about Block IO protocol devices valerij zaporogeci
2022-01-28  1:28 ` [edk2-devel] " Andrew Fish
2022-01-28  2:19   ` valerij zaporogeci
2022-01-28  3:19     ` Andrew Fish [this message]
2022-01-28  3:45       ` valerij zaporogeci

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F23BA6FC-5F52-4878-9926-490CBE97B376@apple.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox