public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Marvin Häuser" <mhaeuser@posteo.de>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
	Pedro Falcato <pedro.falcato@gmail.com>
Subject: Re: [edk2-devel] [PATCH edk2-platforms 1/4] Ext4Pkg: Use depex for unicode collation protocols
Date: Fri, 17 Feb 2023 15:38:09 +0000	[thread overview]
Message-ID: <95DFC869-4A0A-4536-99F6-B8CDA151D433@posteo.de> (raw)
In-Reply-To: <CAMj1kXH0bScCzcVYPPwxpj0W1DdMZSdL2fLqUNkgENNmHBvJCQ@mail.gmail.com>


> On 17. Feb 2023, at 16:17, Ard Biesheuvel <ardb@kernel.org> wrote:
> 
> So the FAT driver will happily load, but then fail in an obscure
> manner when being started on a controller handle, in a way that is
> indistinguishable (afict) from a partition that has not FAT file
> system in the first place.
> 
> So it doesn't look fine to me at all, tbh. If the collation protocols
> are required, we should check for them in supported(), and make a lot
> of noise in a DEBUG build if the failure condition is an unexpected
> one, i.e., some additional protocol we dependent on (even though we
> pretend to be a UEFI driver)  does not exist.

Right, I meant the approach to rely on the UEFI Driver Binding handling to defer locating UC, not the exact implementation. Sounds good.

@Pedro What do you think?

> 
> Alternatively, we might defer installation of the driver binding
> protocol implementation to a callback on the collation protocol
> installation, but that seems like more work for the same result.

Agreed.

> I will +1 any solution that removes the DXE dispatcher entirely as a
> side effect, but unfortunately, that is not going to happen :-)

We will probably attempt something like this downstream at some point (we do not care about UEFI PI), so even more reason I dislike dependencies on its workings. In a lot of cases (like the architectural protocols), the dependency situation is much more simple than what Depex supports. I.e., the protocols often are unconditionally installed in the entry point. Then we can just re-order the modules at FD build-time rather than relying on runtime code in the dispatcher. Complex dependencies, if they cannot be avoided, may be rewritten with events, not sure yet.

> We could depex on the UEFI driver prerequisites as well as the
> collation protocol ones, arguably retaining the UEFI_DRIVER status.

That's what I meant, yes, but I prefer the above solution myself.

Best regards,
Marvin


  reply	other threads:[~2023-02-17 15:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 11:12 [PATCH edk2-platforms 1/4] Ext4Pkg: Use depex for unicode collation protocols Ard Biesheuvel
2023-02-17 14:05 ` 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 [this message]
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=95DFC869-4A0A-4536-99F6-B8CDA151D433@posteo.de \
    --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