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.web09.1578.1643333317697413012 for ; Thu, 27 Jan 2022 17:28:37 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=qUeADQPX; 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 20S1Nec9002830; Thu, 27 Jan 2022 17:28:36 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : content-type : content-transfer-encoding : mime-version : subject : date : references : to : in-reply-to : message-id; s=20180706; bh=HJrgCtl9WSuXpXGqcxtsaqGKKHXaENldEvLlRC/BnFM=; b=qUeADQPXNSHgxdxTxa04wwZqoVEhSq5LOta49c/p+AH6cELSQJfpUilQJP2ro2d+QNWo revvYsA2omAdnMCZ42ARwK3vkD62dw8u2n2UZTLlSzZgsoPYzwnRrwAZSA4XqLd/4md0 8YiR2PNl+48HqJxzfUKLm+cviXrD2/q1Vv+V9XTPO+hySCjMa9wcwNlZnG36S/OJ0ame ou6LVTf/Shjb70xVIKi775147ZTTPCVfi0BZAXA0B/EOGi6QFTgHO9TGketRqjMo4UBf SSvVRaHxeQ5igjhVtf9qEMOvE1izMeHh2pJVKtIGttz1PydfGSZqjklbATeLpZbM4rsF /A== 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 3drhf8h3y4-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 27 Jan 2022 17:28:36 -0800 Received: from rn-mailsvcp-mmp-lapp02.rno.apple.com (rn-mailsvcp-mmp-lapp02.rno.apple.com [17.179.253.15]) 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 <0R6E00UXWC3MLUM0@rn-mailsvcp-mta-lapp01.rno.apple.com>; Thu, 27 Jan 2022 17:28:35 -0800 (PST) Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp02.rno.apple.com by rn-mailsvcp-mmp-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) id <0R6E00W00BVN6G00@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Thu, 27 Jan 2022 17:28:34 -0800 (PST) X-Va-A: X-Va-T-CD: a9e1600dc4d4b67916e71add8a8e5f83 X-Va-E-CD: df74ce61f30045ebdde6d2ba3644f7b4 X-Va-R-CD: b9b34d02c716551467039b88443fdbba X-Va-CD: 0 X-Va-ID: 37efe609-0695-49fb-9554-08a5dc650ddf X-V-A: X-V-T-CD: a9e1600dc4d4b67916e71add8a8e5f83 X-V-E-CD: df74ce61f30045ebdde6d2ba3644f7b4 X-V-R-CD: b9b34d02c716551467039b88443fdbba X-V-CD: 0 X-V-ID: 7b8ce2f0-99a2-4fa8-aeb3-e702f659415a 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-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) with ESMTPSA id <0R6E006JUC3L7A00@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Thu, 27 Jan 2022 17:28:33 -0800 (PST) From: "Andrew Fish" 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 17:28:32 -0800 References: To: devel@edk2.groups.io, vlrzprgts@gmail.com In-reply-to: Message-id: <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: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable > On Jan 27, 2022, at 4:34 PM, valerij zaporogeci wro= te: >=20 > 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 =3D=3D 0, this is what the spec suggests as > a way of representing the whole (raw) disk (as opposite to a > partition, on which n =3D/=3D 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: >=20 > PciRoot(0)\Pci(0, 0)\Ata(0)\HD(1, MBR, sign, start, size) >=20 > But there wouldn't be a device enumerated like: >=20 > PciRoot(0)\Pci(0, 0)\Ata(0)\HD(0,MBR, sign) >=20 > Instead, there would be one like this: >=20 > PciRoot(0)\Pci(0, 0)\Ata(0) >=20 > 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 =3D=3D 0 I see the text in table 10-49 but I don=E2=80=99t know of any code that mak= es a node for the entire disk partition.=20 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 t= o TRUE. The partition driver produce a logical partition for each valid MBR partiti= on: https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/Disk/P= artitionDxe/Mbr.c The disk driver is going to produce a device path that points to the raw di= sk: 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 >=20 This is the raw disk as produced by the disk driver. BlockIo->Media->Logica= lPartition is FALSE. I don=E2=80=99t remember the use case for HD(0,MBR, sign) type of device pa= th node? It is not for legacy BOOT as that would be a BBS entry.=20 Thanks, Andrew Fish > Thank you. >=20 >=20 >=20 >=20 >=20