PlatformInitializeConsole() (called by PlatformBootManagerBeforeConsole())
adds elements of "gPlatformConsole" to ConIn / ConOut / ErrOut (as
requested per element) if at boot at least one of ConIn and ConOut doesn't
exist. This typically applies to new VMs, and VMs with freshly recreated
varstores.
Add a USB keyboard wildcard to ConIn via "gPlatformConsole", so that we
not only bind the PS/2 keyboard. (The PS/2 keyboard is added in
PrepareLpcBridgeDevicePath()). Explicitly connecting the USB keyboard is
necessary after commit
245c643cc8b7.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
} VENDOR_UART_DEVICE_PATH;\r
#pragma pack()\r
\r
} VENDOR_UART_DEVICE_PATH;\r
#pragma pack()\r
\r
+//\r
+// USB Keyboard Device Path structure\r
+//\r
+#pragma pack (1)\r
+typedef struct {\r
+ USB_CLASS_DEVICE_PATH Keyboard;\r
+ EFI_DEVICE_PATH_PROTOCOL End;\r
+} USB_KEYBOARD_DEVICE_PATH;\r
+#pragma pack ()\r
+\r
ACPI_HID_DEVICE_PATH gPnpPs2KeyboardDeviceNode = gPnpPs2Keyboard;\r
ACPI_HID_DEVICE_PATH gPnp16550ComPortDeviceNode = gPnp16550ComPort;\r
UART_DEVICE_PATH gUartDeviceNode = gUart;\r
ACPI_HID_DEVICE_PATH gPnpPs2KeyboardDeviceNode = gPnpPs2Keyboard;\r
ACPI_HID_DEVICE_PATH gPnp16550ComPortDeviceNode = gPnp16550ComPort;\r
UART_DEVICE_PATH gUartDeviceNode = gUart;\r
+STATIC USB_KEYBOARD_DEVICE_PATH gUsbKeyboardDevicePath = {\r
+ {\r
+ {\r
+ MESSAGING_DEVICE_PATH,\r
+ MSG_USB_CLASS_DP,\r
+ {\r
+ (UINT8)sizeof (USB_CLASS_DEVICE_PATH),\r
+ (UINT8)(sizeof (USB_CLASS_DEVICE_PATH) >> 8)\r
+ }\r
+ },\r
+ 0xFFFF, // VendorId: any\r
+ 0xFFFF, // ProductId: any\r
+ 3, // DeviceClass: HID\r
+ 1, // DeviceSubClass: boot\r
+ 1 // DeviceProtocol: keyboard\r
+ },\r
+ gEndEntire\r
+};\r
\r
//\r
// Predefined platform default console device path\r
\r
//\r
// Predefined platform default console device path\r
(EFI_DEVICE_PATH_PROTOCOL *) &gDebugAgentUartDevicePath,\r
(CONSOLE_OUT | CONSOLE_IN | STD_ERROR)\r
},\r
(EFI_DEVICE_PATH_PROTOCOL *) &gDebugAgentUartDevicePath,\r
(CONSOLE_OUT | CONSOLE_IN | STD_ERROR)\r
},\r
+ {\r
+ (EFI_DEVICE_PATH_PROTOCOL *)&gUsbKeyboardDevicePath,\r
+ CONSOLE_IN\r
+ },\r