Re: [PATCH] efi_loader: give SimpleTextInputEx its own WaitForKeyEx event
Simon Glass <[email protected]>
| Newsgroups | gmane.comp.boot-loaders.u-boot |
|---|---|
| Message-ID | <CAFLszTi3nVrjYq+8NH1wb0iv0oU9f41ZKum1ZoSAMMC=H9p0+Q@mail.gmail.com> |
Hi Daniel, On 2026-07-18T21:11:38, Daniel Golle <[email protected]> wrote: > efi_loader: give SimpleTextInputEx its own WaitForKeyEx event > > The console input used a single wait event for both the > EFI_SIMPLE_TEXT_INPUT_PROTOCOL and the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL > by aliasing wait_for_key_ex to wait_for_key. The UEFI specification > describes these as separate events, and a client that opens ConInEx and > drives WaitForKeyEx independently of the base protocol (the Windows Boot > Manager does this) can then desynchronise against the shared object and > never observe a keystroke, even though GRUB and systemd-boot, which lean > on the base wait event, work. > > Create a distinct WaitForKeyEx event, and signal and clear both events > together when a key becomes available or is consumed, so every client > sees a consistent wait event regardless of which protocol it uses. > > Signed-off-by: Daniel Golle <[email protected]> > > lib/efi_loader/efi_console.c | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c > @@ -681,6 +681,7 @@ struct efi_cin_notify_function { > static bool key_available; > static struct efi_key_data next_key; > static LIST_HEAD(cin_notify_functions); > +static struct efi_simple_text_input_ex_protocol efi_con_in_ex; This is a tentative definition that merges with the initialised one further down, so a short comment here noting that the real definition is below could be useful. In any case: Reviewed-by: Simon Glass <[email protected]> Regards, Simon