Skip to content

Commit

Permalink
PlatformBootManagerLib: Add USB keyboard path to ConIn earlier
Browse files Browse the repository at this point in the history
When a keyboard gets installed after connecting the USB controller
handles, ConPlatformDxe will check that its short-form device path
exists in the ConIn variable before enabling input from it.

This variable is missing at first boot, so adding the path after the
keyboard was already ignored means it won't be usable during BDS
countdown.

Signed-off-by: Mario Bălănică <[email protected]>
  • Loading branch information
mariobalanica committed Jan 11, 2024
1 parent bc0a1bc commit 72385b1
Showing 1 changed file with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,20 @@ PlatformBootManagerBeforeConsole (
//
EfiBootManagerDispatchDeferredImages ();

//
// Add the hardcoded short-form USB keyboard device path to ConIn.
// This must be done prior to connecting any USB bus controllers, because
// when a keyboard gets installed, ConPlatformDxe will immediately check
// that its device path exists in the ConIn variable before enabling input
// from it. Since this variable is not initially populated at first boot,
// we would otherwise end up with no keyboard input during BDS countdown.
//
EfiBootManagerUpdateConsoleVariable (
ConIn,
(EFI_DEVICE_PATH_PROTOCOL *)&mUsbKeyboard,
NULL
);

//
// Locate the PCI root bridges and make the PCI bus driver connect each,
// non-recursively. This will produce a number of child handles with PciIo on
Expand Down Expand Up @@ -901,15 +915,6 @@ PlatformBootManagerBeforeConsole (
//
FilterAndProcess (&gEfiBlockIoProtocolGuid, IsSdBootBlockIo, Connect);

//
// Add the hardcoded short-form USB keyboard device path to ConIn.
//
EfiBootManagerUpdateConsoleVariable (
ConIn,
(EFI_DEVICE_PATH_PROTOCOL *)&mUsbKeyboard,
NULL
);

//
// Add the hardcoded serial console device path to ConIn, ConOut, ErrOut.
//
Expand Down

0 comments on commit 72385b1

Please sign in to comment.