From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by mx.groups.io with SMTP id smtpd.web10.4246.1676632332772365381 for ; Fri, 17 Feb 2023 03:12:13 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@kernel.org header.s=k20201202 header.b=VUfIlqC7; spf=pass (domain: kernel.org, ip: 145.40.73.55, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 14D9ACE2F75; Fri, 17 Feb 2023 11:12:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A690C433D2; Fri, 17 Feb 2023 11:12:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676632327; bh=I5TUpUMB9ePRj2mOt1l7Ww6aDanlm0jOc1TBKwPWcfg=; h=From:To:Cc:Subject:Date:From; b=VUfIlqC7cYc1qfPXrdzqU7ZW4EmYggmWzQ7ip+KZe385lwKOXw+h83And2jfh52uc lDI5lPUJ2rl9YD9jm8lpi69mK0SJfgVenYRP7WN0EBPI4arp6FNXYGJsrK/ULRdbLP 7VNNEJ7Yf7R2tzlzjxp+iXzjCn6GpFwT1mZb/DGLAPxQONBcrFM6PuqJYboTU9TLNq t6b8ZKghEd+Zb7SBrWXGBnfJJQqhBv5/ehVK4kn4wLofg/Oc5rl+7nNXjHwjKaHzJp nJ3jsG+974cTzUJX/XK4YH9TY6I4hYUdtTXzHHLT02mToZD0nECzhvJiIfVjszSA/s f5grxNgx6z5qA== From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Pedro Falcato , =?UTF-8?q?Marvin=20H=C3=A4user?= Subject: [PATCH edk2-platforms 1/4] Ext4Pkg: Use depex for unicode collation protocols Date: Fri, 17 Feb 2023 12:12:00 +0100 Message-Id: <20230217111200.1293369-1-ardb@kernel.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable The EXT4 driver implements the UEFI driver model, which means it can consume one protocol (marked with a TO_START comment in the .INF) and produce another (marked as BY_START). The TO_START protocols are not prerequisites for loading and starting the module, they are simply protocols the driver may consume when taking part in the driver model dance. 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. Note that this means the driver is not a UEFI_DRIVER but a DXE_DRIVER, as UEFI drivers have a default DEPEX on the architectural protocols only. Cc: Pedro Falcato Cc: Marvin H=C3=A4user Signed-off-by: Ard Biesheuvel --- This fixes an observed failure when attempting to use this driver Raspberry Pi4 as a builtin. Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.inf | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.inf b/Features/Ext4Pkg/Ext4= Dxe/Ext4Dxe.inf index a153fc41ccd6..1514020fa6a6 100644 --- a/Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.inf +++ b/Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.inf @@ -86,7 +86,7 @@ [Defines] BASE_NAME =3D Ext4Dxe MODULE_UNI_FILE =3D Ext4Dxe.uni FILE_GUID =3D 75F2B676-D73B-45CB-B7C1-303C7F4E6FD= 6 - MODULE_TYPE =3D UEFI_DRIVER + MODULE_TYPE =3D DXE_DRIVER VERSION_STRING =3D 1.0 =20 ENTRY_POINT =3D Ext4EntryPoint @@ -141,9 +141,12 @@ [Protocols] gEfiDiskIo2ProtocolGuid ## TO_START gEfiBlockIoProtocolGuid ## TO_START gEfiSimpleFileSystemProtocolGuid ## BY_START - gEfiUnicodeCollationProtocolGuid ## TO_START - gEfiUnicodeCollation2ProtocolGuid ## TO_START + gEfiUnicodeCollationProtocolGuid ## SOMETIMES_CONSUMES + gEfiUnicodeCollation2ProtocolGuid ## SOMETIMES_CONSUMES =20 [Pcd] gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLang ## SOMET= IMES_CONSUMES gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang ## SOMET= IMES_CONSUMES + +[Depex] + gEfiUnicodeCollationProtocolGuid OR gEfiUnicodeCollation2ProtocolGuid --=20 2.39.1