From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by mx.groups.io with SMTP id smtpd.web10.6993.1676642736967920094 for ; Fri, 17 Feb 2023 06:05:37 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@posteo.de header.s=2017 header.b=fzGZlqN7; spf=pass (domain: posteo.de, ip: 185.67.36.65, mailfrom: mhaeuser@posteo.de) Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 1E666240196 for ; Fri, 17 Feb 2023 15:05:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1676642735; bh=bJtJ0dZmxBIHjhfyGolgm1g8+Ylp06N+efi8iSIgpqE=; h=From:Subject:Date:Cc:To:From; b=fzGZlqN7fXfM0i7TNZvXeS6YwuogyCZM5CDsVOhbETE7jxElylbT3FdTO3U5ior2b ZmT+SREo1ptB8tVGIDn18XulOWz/eBq7tMRuIin6hKcmOtQC/fPA3DfFy4MIOY0nv0 /ejDJcQgLUrI2Yd4asGAtNewB3BVFIg2RLhxvz6tWsdanCHtcQOar2i/kxv4+ZsY+F KLAGbAqAqKe8lPmn9Oqcru0FPWLSk0Fcj1TqxXwNZQ0WQr4IyLR6VTFYgYgJtHBP+h 7NRRq/p8eEBLgl+ooduxH7GXb4N54rYoRfh5l8TyvSxFetyOLrbz4/6KlLVZ5R1aGM Unr7TaxOCxZgw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PJD9T7079z9rxH; Fri, 17 Feb 2023 15:05:33 +0100 (CET) From: =?UTF-8?B?TWFydmluIEjDpHVzZXI=?= Message-Id: <8AFBCC5C-C28B-4F57-9359-99CF24D42322@posteo.de> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: [PATCH edk2-platforms 1/4] Ext4Pkg: Use depex for unicode collation protocols Date: Fri, 17 Feb 2023 14:05:23 +0000 In-Reply-To: <20230217111200.1293369-1-ardb@kernel.org> Cc: edk2-devel-groups-io , Pedro Falcato To: Ard Biesheuvel References: <20230217111200.1293369-1-ardb@kernel.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_B68E60AB-34ED-4CC9-8250-790E7C75248F" --Apple-Mail=_B68E60AB-34ED-4CC9-8250-790E7C75248F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi Ard, Thank you! Is "1/4" a mistake or did I miss the other 3? :) Comments inline. > On 17. Feb 2023, at 12:12, Ard Biesheuvel wrote: >=20 > The Unicode collation protocols, however, are different: loading the > driver will fail if neither of those are present. So they are not > TO_START protocols, and they need to be mentioned in the DEPEX so that > the DXE core will not dispatch the driver before the producers of the > prerequisite protocols have been dispatched. Also, mark them as > SOMETIMES_CONSUMES, as only one of the two is required. Right. FatPkg solves this by probing for the protocol in Start() [1], = which should guarantee that all entry points have been executed first, = right? I'd prefer a universal and consistent solution to the issue and = this looks fine, honestly. [1] = https://github.com/tianocore/edk2/blob/02fcfdce1e5ce86f1951191883e7e30de5a= a08be/FatPkg/EnhancedFatDxe/Fat.c#L381 = https://github.com/tianocore/edk2/blob/02fcfdce1e5ce86f1951191883e7e30de5a= a08be/FatPkg/EnhancedFatDxe/Fat.inf#L19 > - MODULE_TYPE =3D UEFI_DRIVER > + MODULE_TYPE =3D DXE_DRIVER Is it not unidiomatic to use the UEFI Driver Binding model (UEFI) in a = DXE driver (UEFI PI)? > +[Depex] > + gEfiUnicodeCollationProtocolGuid OR = gEfiUnicodeCollation2ProtocolGuid Hmm, this will have the side effect that Ext4Dxe may load before (some = of) the architectural protocols, right (modulo implicit dependencies via = the UC protocols)? This would need some careful analysis, or we need to = add all of the architectural protocols to preserve the old behaviour. Best regards, Marvin= --Apple-Mail=_B68E60AB-34ED-4CC9-8250-790E7C75248F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Hi = Ard,

Thank you! Is "1/4" a mistake or did I miss the = other 3? :)
Comments inline.

On 17. Feb 2023, at 12:12, Ard Biesheuvel = <ardb@kernel.org> wrote:

The Unicode collation = protocols, however, are different: loading the
driver will fail if = neither of those are present. So they are not
TO_START protocols, and = they need to be mentioned in the DEPEX so that
the DXE core will not = dispatch the driver before the producers of the
prerequisite = protocols have been dispatched. Also, mark them = as
SOMETIMES_CONSUMES, as only one of the two is = required.

Right. FatPkg = solves this by probing for the protocol in Start() [1], which should = guarantee that all entry points have been executed first, right? I'd = prefer a universal and consistent solution to the issue and this looks = fine, honestly.

[1]

- =  MODULE_TYPE =             &n= bsp;      =3D UEFI_DRIVER
+ =  MODULE_TYPE =             &n= bsp;      =3D = DXE_DRIVER

Is it not = unidiomatic to use the UEFI Driver Binding model (UEFI) in a DXE driver = (UEFI PI)?

+[Depex]
+ =  gEfiUnicodeCollationProtocolGuid OR = gEfiUnicodeCollation2ProtocolGuid

Hmm, this will have the side effect that Ext4Dxe may load before = (some of) the architectural protocols, right (modulo implicit = dependencies via the UC protocols)? This would need some careful = analysis, or we need to add all of the architectural protocols to = preserve the old behaviour.

Best = regards,
Marvin
= --Apple-Mail=_B68E60AB-34ED-4CC9-8250-790E7C75248F--