Merged in the following trackers from EDK:
EDK1145 Cursor mising in shell in some case EDK1099: Dell - [HII] HiiGetFontInfo() not retrieve the system font by FoFontInfoMask EDK1127: [UEFI 2.10] Keyboard layout support EDK1129: [UEFI HII] GUID is represented wrongly in Config String And some other fixes such as *[UEFI HII] HiiGetAltCfg is generating "Name=" sub string in the wrong format *UEFI HII: GetUnicodeStringTextOrSize() doesn't handle NULL StringDest properly *GetFontInfo() need be updated to avoid iteration *HIIStringProtocolTest failed on multiple platform *[Uefi 2.1] Comply with latest Hii ECR * GetFontInfo() need be updated to avoid iteration git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5361 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -62,11 +62,15 @@
|
||||
gSimpleTextInExNotifyGuid # ALWAYS_CONSUMED
|
||||
|
||||
[Protocols]
|
||||
gEfiUsbIoProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiSimpleTextInProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiSimpleTextInputExProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiUsbIoProtocolGuid # PROTOCOL TO_START
|
||||
gEfiDevicePathProtocolGuid # PROTOCOL TO_START
|
||||
gEfiSimpleTextInProtocolGuid # PROTOCOL BY_START
|
||||
gEfiSimpleTextInputExProtocolGuid # PROTOCOL BY_START
|
||||
gEfiHiiDatabaseProtocolGuid # PROTOCOL TO_START
|
||||
|
||||
[FeaturePcd.common]
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDisableDefaultKeyboardLayoutInUsbKbDriver
|
||||
|
||||
[FixedPcd]
|
||||
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueKeyboardEnable
|
||||
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueKeyboardPresenceDetect
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2004 - 2007, Intel Corporation
|
||||
Copyright (c) 2004 - 2008, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -382,6 +382,11 @@ USBKeyboardDriverBindingStart (
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
Status = InitKeyboardLayout (UsbKeyboardDevice);
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
Status = gBS->CreateEvent (
|
||||
EVT_NOTIFY_WAIT,
|
||||
TPL_NOTIFY,
|
||||
@@ -650,6 +655,9 @@ USBKeyboardDriverBindingStop (
|
||||
gBS->CloseEvent (UsbKeyboardDevice->SimpleInputEx.WaitForKeyEx);
|
||||
KbdFreeNotifyList (&UsbKeyboardDevice->NotifyList);
|
||||
|
||||
ReleaseKeyboardLayoutResources (UsbKeyboardDevice);
|
||||
gBS->CloseEvent (UsbKeyboardDevice->KeyboardLayoutEvent);
|
||||
|
||||
if (UsbKeyboardDevice->ControllerNameTable != NULL) {
|
||||
FreeUnicodeStringTable (UsbKeyboardDevice->ControllerNameTable);
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/** @file
|
||||
Copyright (c) 2004 - 2007, Intel Corporation
|
||||
Copyright (c) 2004 - 2008, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -27,9 +27,11 @@ Revision History
|
||||
|
||||
#include <Protocol/SimpleTextIn.h>
|
||||
#include <Protocol/SimpleTextInEx.h>
|
||||
#include <Guid/HotPlugDevice.h>
|
||||
#include <Protocol/HiiDatabase.h>
|
||||
#include <Protocol/UsbIo.h>
|
||||
#include <Protocol/DevicePath.h>
|
||||
#include <Guid/HiiKeyBoardLayout.h>
|
||||
#include <Guid/HotPlugDevice.h>
|
||||
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/ReportStatusCodeLib.h>
|
||||
@@ -79,6 +81,27 @@ typedef struct _KEYBOARD_CONSOLE_IN_EX_NOTIFY {
|
||||
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
|
||||
LIST_ENTRY NotifyEntry;
|
||||
} KEYBOARD_CONSOLE_IN_EX_NOTIFY;
|
||||
|
||||
#define USB_NS_KEY_SIGNATURE EFI_SIGNATURE_32 ('u', 'n', 's', 'k')
|
||||
|
||||
typedef struct {
|
||||
UINTN Signature;
|
||||
LIST_ENTRY Link;
|
||||
|
||||
//
|
||||
// The number of EFI_NS_KEY_MODIFIER children definitions
|
||||
//
|
||||
UINTN KeyCount;
|
||||
|
||||
//
|
||||
// NsKey[0] : Non-spacing key
|
||||
// NsKey[1] ~ NsKey[KeyCount] : Physical keys
|
||||
//
|
||||
EFI_KEY_DESCRIPTOR *NsKey;
|
||||
} USB_NS_KEY;
|
||||
|
||||
#define USB_NS_KEY_FORM_FROM_LINK(a) CR (a, USB_NS_KEY, Link, USB_NS_KEY_SIGNATURE)
|
||||
|
||||
typedef struct {
|
||||
UINTN Signature;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
@@ -115,12 +138,21 @@ typedef struct {
|
||||
UINT8 RightLogoOn;
|
||||
UINT8 MenuKeyOn;
|
||||
UINT8 SysReqOn;
|
||||
UINT8 AltGrOn;
|
||||
|
||||
EFI_KEY_STATE KeyState;
|
||||
//
|
||||
// Notification function list
|
||||
//
|
||||
LIST_ENTRY NotifyList;
|
||||
|
||||
//
|
||||
// Non-spacing key list
|
||||
//
|
||||
LIST_ENTRY NsKeyList;
|
||||
USB_NS_KEY *CurrentNsKey;
|
||||
EFI_KEY_DESCRIPTOR *KeyConvertionTable;
|
||||
EFI_EVENT KeyboardLayoutEvent;
|
||||
} USB_KB_DEV;
|
||||
|
||||
//
|
||||
@@ -159,7 +191,7 @@ typedef struct {
|
||||
UINT8 Key;
|
||||
} KB_MODIFIER;
|
||||
|
||||
#define USB_KEYCODE_MAX_MAKE 0x7E
|
||||
#define USB_KEYCODE_MAX_MAKE 0x62
|
||||
|
||||
#define USBKBD_VALID_KEYCODE(key) ((UINT8) (key) > 3)
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -36,6 +36,16 @@ InitUSBKeyboard (
|
||||
IN USB_KB_DEV *UsbKeyboardDevice
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
InitKeyboardLayout (
|
||||
IN USB_KB_DEV *UsbKeyboardDevice
|
||||
);
|
||||
|
||||
VOID
|
||||
ReleaseKeyboardLayoutResources (
|
||||
USB_KB_DEV *UsbKeyboardDevice
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
KeyboardHandler (
|
||||
|
Reference in New Issue
Block a user