From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ma1-aaemail-dr-lapp01.apple.com (ma1-aaemail-dr-lapp01.apple.com [17.171.2.60]) by mx.groups.io with SMTP id smtpd.web10.2584.1643339983016174489 for ; Thu, 27 Jan 2022 19:19:43 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=eR83dVvG; spf=pass (domain: apple.com, ip: 17.171.2.60, mailfrom: afish@apple.com) Received: from pps.filterd (ma1-aaemail-dr-lapp01.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp01.apple.com (8.16.0.42/8.16.0.42) with SMTP id 20S3FPlq052296; Thu, 27 Jan 2022 19:19:42 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : message-id : content-type : mime-version : subject : date : in-reply-to : cc : to : references; s=20180706; bh=JIKbFzbzwrQKpH/l4+0TNkPExh4ITQEAhLBRJqD3y6U=; b=eR83dVvGNn1SMgFkT5MElnqjhzst+xeon3uIhq1HCS0kmyEzQr0a1eRiHdvzCh5866SU O/W8YsZT0pyqu7WvPeORGGQCBfBOUWr+lbmYvk7PJ2RBBB8yxu9xUWx1w9FNHIa6fo+g 5q5Evg5T0SnBXWxP7oVzVVaRPDQ/2pzpIJiJJxfoIYUZc4bovNWN6KNMgUZmR+kWHOpN axry75YPvGkdzuYibpgDLAm96hp4IayGxGSiHVegmJEv4pduWk1ZvH5kLH6lgIVzRe6O 0NO3/EwGJ6PAOMvPeGJH+njGZEaBZVauJ3oLCAxcLq08YSlWDJzxGmJMPGN4gw+mL4kk oA== Received: from rn-mailsvcp-mta-lapp01.rno.apple.com (rn-mailsvcp-mta-lapp01.rno.apple.com [10.225.203.149]) by ma1-aaemail-dr-lapp01.apple.com with ESMTP id 3drhf8j5uv-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 27 Jan 2022 19:19:42 -0800 Received: from rn-mailsvcp-mmp-lapp01.rno.apple.com (rn-mailsvcp-mmp-lapp01.rno.apple.com [17.179.253.14]) by rn-mailsvcp-mta-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) with ESMTPS id <0R6E00C2BH8T6KF0@rn-mailsvcp-mta-lapp01.rno.apple.com>; Thu, 27 Jan 2022 19:19:41 -0800 (PST) Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp01.rno.apple.com by rn-mailsvcp-mmp-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) id <0R6E00Z00H58JY00@rn-mailsvcp-mmp-lapp01.rno.apple.com>; Thu, 27 Jan 2022 19:19:41 -0800 (PST) X-Va-A: X-Va-T-CD: 70a0c04b9f31fe03842f1b469c697b38 X-Va-E-CD: df74ce61f30045ebdde6d2ba3644f7b4 X-Va-R-CD: b9b34d02c716551467039b88443fdbba X-Va-CD: 0 X-Va-ID: 1b7f100c-7c2e-499b-b37a-a709427cd1fc X-V-A: X-V-T-CD: 70a0c04b9f31fe03842f1b469c697b38 X-V-E-CD: df74ce61f30045ebdde6d2ba3644f7b4 X-V-R-CD: b9b34d02c716551467039b88443fdbba X-V-CD: 0 X-V-ID: c433b941-641d-4c09-8ac1-fe759595ca93 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425,18.0.816 definitions=2022-01-27_06:2022-01-27,2022-01-27 signatures=0 Received: from smtpclient.apple (unknown [17.235.48.130]) by rn-mailsvcp-mmp-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) with ESMTPSA id <0R6E00U8UH8SSA00@rn-mailsvcp-mmp-lapp01.rno.apple.com>; Thu, 27 Jan 2022 19:19:41 -0800 (PST) From: "Andrew Fish" Message-id: MIME-version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Subject: Re: [edk2-devel] Question about Block IO protocol devices Date: Thu, 27 Jan 2022 19:19:40 -0800 In-reply-to: Cc: devel@edk2.groups.io To: valerij zaporogeci References: <0A58CE0A-5481-4B25-95E4-5AA64D51DF44@apple.com> X-Mailer: Apple Mail (2.3693.20.0.1.32) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425,18.0.816 definitions=2022-01-27_06:2022-01-27,2022-01-27 signatures=0 Content-type: multipart/alternative; boundary="Apple-Mail=_12408A95-A5B1-4884-B906-D2FA235131F2" --Apple-Mail=_12408A95-A5B1-4884-B906-D2FA235131F2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 27, 2022, at 6:19 PM, valerij zaporogeci = wrote: >=20 > Thank you, Andrew, for the clarification. >=20 >> I don=E2=80=99t remember the use case for HD(0,MBR, sign) type of = device path node? >=20 > 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. >=20 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.=20 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.=20 > 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 --Apple-Mail=_12408A95-A5B1-4884-B906-D2FA235131F2 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Jan 27, 2022, at 6:19 PM, valerij zaporogeci <vlrzprgts@gmail.com>= wrote:

Thank you, Andrew, for the clarification.

I don=E2=80=99t 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.


Thanks,

Andrew = Fish



= --Apple-Mail=_12408A95-A5B1-4884-B906-D2FA235131F2--