From: "Ard Biesheuvel" <ardb@kernel.org>
To: devel@edk2.groups.io
Cc: "Ard Biesheuvel" <ardb@kernel.org>,
"Pedro Falcato" <pedro.falcato@gmail.com>,
"Marvin Häuser" <mhaeuser@posteo.de>
Subject: [PATCH edk2-platforms 1/4] Ext4Pkg: Use depex for unicode collation protocols
Date: Fri, 17 Feb 2023 12:12:00 +0100 [thread overview]
Message-ID: <20230217111200.1293369-1-ardb@kernel.org> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2587 bytes --]
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 <pedro.falcato@gmail.com>
Cc: Marvin Häuser <mhaeuser@posteo.de>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
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/Ext4Dxe/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 = Ext4Dxe
MODULE_UNI_FILE = Ext4Dxe.uni
FILE_GUID = 75F2B676-D73B-45CB-B7C1-303C7F4E6FD6
- MODULE_TYPE = UEFI_DRIVER
+ MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = 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
[Pcd]
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLang ## SOMETIMES_CONSUMES
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang ## SOMETIMES_CONSUMES
+
+[Depex]
+ gEfiUnicodeCollationProtocolGuid OR gEfiUnicodeCollation2ProtocolGuid
--
2.39.1
next reply other threads:[~2023-02-17 11:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 11:12 Ard Biesheuvel [this message]
2023-02-17 14:05 ` [PATCH edk2-platforms 1/4] Ext4Pkg: Use depex for unicode collation protocols Marvin Häuser
2023-02-17 14:29 ` [edk2-devel] " Ard Biesheuvel
2023-02-17 14:54 ` Marvin Häuser
2023-02-17 15:17 ` Ard Biesheuvel
2023-02-17 15:38 ` Marvin Häuser
2023-02-17 17:31 ` Pedro Falcato
2023-02-17 18:01 ` Ard Biesheuvel
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=20230217111200.1293369-1-ardb@kernel.org \
--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