mirror of https://github.com/acidanthera/audk.git
Retired gSimpleTextInExNotifyGuid, used local structure address to be notify handle.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7666 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
1088908eb2
commit
7fc80d4484
|
@ -640,19 +640,10 @@ KeyboardRegisterKeyNotify (
|
|||
|
||||
NewNotify->Signature = KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
|
||||
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
||||
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
|
||||
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
|
||||
InsertTailList (&ConsoleInDev->NotifyList, &NewNotify->NotifyEntry);
|
||||
|
||||
//
|
||||
// Use gSimpleTextInExNotifyGuid to get a valid EFI_HANDLE
|
||||
//
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&NewNotify->NotifyHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
*NotifyHandle = NewNotify->NotifyHandle;
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
|
@ -694,18 +685,6 @@ KeyboardUnregisterKeyNotify (
|
|||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
NotificationHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
ConsoleInDev = TEXT_INPUT_EX_KEYBOARD_CONSOLE_IN_DEV_FROM_THIS (This);
|
||||
|
||||
//
|
||||
|
@ -725,13 +704,7 @@ KeyboardUnregisterKeyNotify (
|
|||
// Remove the notification function from NotifyList and free resources
|
||||
//
|
||||
RemoveEntryList (&CurrentNotify->NotifyEntry);
|
||||
Status = gBS->UninstallMultipleProtocolInterfaces (
|
||||
CurrentNotify->NotifyHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
gBS->FreePool (CurrentNotify);
|
||||
Status = EFI_SUCCESS;
|
||||
goto Exit;
|
||||
|
|
|
@ -23,7 +23,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
#include <Protocol/IsaIo.h>
|
||||
#include <Protocol/DevicePath.h>
|
||||
#include <Protocol/Ps2Policy.h>
|
||||
#include <Protocol/SimpleTextInExNotify.h>
|
||||
|
||||
#include <Library/UefiDriverEntryPoint.h>
|
||||
#include <Library/UefiLib.h>
|
||||
|
|
|
@ -60,7 +60,5 @@
|
|||
gEfiSimpleTextInProtocolGuid # PROTOCOL BY_START
|
||||
gEfiSimpleTextInputExProtocolGuid # PROTOCOL BY_START
|
||||
gEfiDevicePathProtocolGuid # PROTOCOL TO_START
|
||||
gSimpleTextInExNotifyGuid # PROTOCOL SOMETIMES_CONSUMED
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1022,7 +1022,6 @@ USBKeyboardRegisterKeyNotify (
|
|||
)
|
||||
{
|
||||
USB_KB_DEV *UsbKeyboardDevice;
|
||||
EFI_STATUS Status;
|
||||
KEYBOARD_CONSOLE_IN_EX_NOTIFY *NewNotify;
|
||||
LIST_ENTRY *Link;
|
||||
LIST_ENTRY *NotifyList;
|
||||
|
@ -1066,20 +1065,11 @@ USBKeyboardRegisterKeyNotify (
|
|||
|
||||
NewNotify->Signature = USB_KB_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
|
||||
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
||||
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
|
||||
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
|
||||
InsertTailList (&UsbKeyboardDevice->NotifyList, &NewNotify->NotifyEntry);
|
||||
|
||||
//
|
||||
// Use gSimpleTextInExNotifyGuid to get a valid EFI_HANDLE
|
||||
//
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&NewNotify->NotifyHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
|
||||
*NotifyHandle = NewNotify->NotifyHandle;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
@ -1105,7 +1095,6 @@ USBKeyboardUnregisterKeyNotify (
|
|||
)
|
||||
{
|
||||
USB_KB_DEV *UsbKeyboardDevice;
|
||||
EFI_STATUS Status;
|
||||
KEYBOARD_CONSOLE_IN_EX_NOTIFY *CurrentNotify;
|
||||
LIST_ENTRY *Link;
|
||||
LIST_ENTRY *NotifyList;
|
||||
|
@ -1116,21 +1105,6 @@ USBKeyboardUnregisterKeyNotify (
|
|||
|
||||
UsbKeyboardDevice = TEXT_INPUT_EX_USB_KB_DEV_FROM_THIS (This);
|
||||
|
||||
//
|
||||
// Check if NotificationHandle is returned from RegisterKeyNotify().
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
NotificationHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
//
|
||||
// Traverse notify list of USB keyboard and remove the entry of NotificationHandle.
|
||||
//
|
||||
|
@ -1149,13 +1123,7 @@ USBKeyboardUnregisterKeyNotify (
|
|||
// Remove the notification function from NotifyList and free resources
|
||||
//
|
||||
RemoveEntryList (&CurrentNotify->NotifyEntry);
|
||||
Status = gBS->UninstallMultipleProtocolInterfaces (
|
||||
CurrentNotify->NotifyHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
FreePool (CurrentNotify);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
#include <Protocol/HiiDatabase.h>
|
||||
#include <Protocol/UsbIo.h>
|
||||
#include <Protocol/DevicePath.h>
|
||||
#include <Protocol/SimpleTextInExNotify.h>
|
||||
|
||||
#include <Guid/HiiKeyBoardLayout.h>
|
||||
|
||||
|
|
|
@ -84,10 +84,6 @@
|
|||
# Otherwise, USB keyboard module tries to use its carried default layout.
|
||||
#
|
||||
gEfiHiiDatabaseProtocolGuid ## SOMETIMES_CONSUMES (Default value is used if it's absent.)
|
||||
##
|
||||
# SimpleTextInExNotify is installed on the handle created by EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.RegisterKeyNotify().
|
||||
#
|
||||
gSimpleTextInExNotifyGuid ## PRODUCES
|
||||
|
||||
[FeaturePcd.common]
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDisableDefaultKeyboardLayoutInUsbKbDriver ## SOMETIME_CONSUMES (Checked when no layout is provided by HII.)
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
/** @file
|
||||
This file defines Simple TextInEx Notify Guid that specify the notify handle.
|
||||
|
||||
Copyright (c) 2008, Intel Corporation. <BR>
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _SIMPLE_TEXTIN_EX_NOTIFY__H_
|
||||
#define _SIMPLE_TEXTIN_EX_NOTIFY__H_
|
||||
|
||||
#define SIMPLE_TEXTIN_EX_NOTIFY_GUID \
|
||||
{ \
|
||||
0x856f2def, 0x4e93, 0x4d6b, {0x94, 0xce, 0x1c, 0xfe, 0x47, 0x1, 0x3e, 0xa5} \
|
||||
}
|
||||
|
||||
extern EFI_GUID gSimpleTextInExNotifyGuid;
|
||||
|
||||
#endif
|
|
@ -217,9 +217,6 @@
|
|||
## Include/Protocol/TcgPlatform.h
|
||||
gEfiTcgPlatformProtocolGuid = { 0x8c4c9a41, 0xbf56, 0x4627, { 0x9e, 0xa, 0xc8, 0x38, 0x6d, 0x66, 0x11, 0x5c }}
|
||||
|
||||
## Protocol Guid specify the Simple TextIn Notify handle.
|
||||
## Include/Protocol/SimpleTextInExNotify.h
|
||||
gSimpleTextInExNotifyGuid = { 0x856f2def, 0x4e93, 0x4d6b, { 0x94, 0xce, 0x1c, 0xfe, 0x47, 0x01, 0x3e, 0xa5 }}
|
||||
## Protocol Guid specify the device is the hot plug device.
|
||||
gEfiHotPlugDeviceGuid = { 0x220AC432, 0x1D43, 0x49E5, { 0xA7, 0x4F, 0x4C, 0x9D, 0xA6, 0x7A, 0xD2, 0x3B }}
|
||||
|
||||
|
|
|
@ -3861,6 +3861,7 @@ ConSplitterTextInRegisterKeyNotify (
|
|||
}
|
||||
NewNotify->Signature = TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE;
|
||||
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
||||
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
|
||||
CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
|
||||
|
||||
//
|
||||
|
@ -3881,17 +3882,6 @@ ConSplitterTextInRegisterKeyNotify (
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Use gSimpleTextInExNotifyGuid to get a valid EFI_HANDLE
|
||||
//
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&NewNotify->NotifyHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
InsertTailList (&mConIn.NotifyList, &NewNotify->NotifyEntry);
|
||||
|
||||
*NotifyHandle = NewNotify->NotifyHandle;
|
||||
|
@ -3931,18 +3921,6 @@ ConSplitterTextInUnregisterKeyNotify (
|
|||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
NotificationHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Private = TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
|
||||
|
||||
//
|
||||
|
@ -3966,13 +3944,7 @@ ConSplitterTextInUnregisterKeyNotify (
|
|||
}
|
||||
}
|
||||
RemoveEntryList (&CurrentNotify->NotifyEntry);
|
||||
Status = gBS->UninstallMultipleProtocolInterfaces (
|
||||
CurrentNotify->NotifyHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
gBS->FreePool (CurrentNotify->NotifyHandleList);
|
||||
gBS->FreePool (CurrentNotify);
|
||||
return EFI_SUCCESS;
|
||||
|
|
|
@ -28,7 +28,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
#include <Protocol/SimpleTextInEx.h>
|
||||
#include <Protocol/GraphicsOutput.h>
|
||||
#include <Protocol/UgaDraw.h>
|
||||
#include <Protocol/SimpleTextInExNotify.h>
|
||||
|
||||
#include <Guid/PrimaryStandardErrorDevice.h>
|
||||
#include <Guid/PrimaryConsoleOutDevice.h>
|
||||
|
|
|
@ -87,7 +87,6 @@
|
|||
gEfiSimpleTextOutProtocolGuid ## BY_START
|
||||
gEfiGraphicsOutputProtocolGuid ## BY_START
|
||||
gEfiUgaDrawProtocolGuid ## BY_START
|
||||
gSimpleTextInExNotifyGuid ## PRODUCES
|
||||
|
||||
|
||||
[FeaturePcd.common]
|
||||
|
|
|
@ -21,7 +21,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
#include <Guid/GlobalVariable.h>
|
||||
#include <Guid/PcAnsi.h>
|
||||
|
||||
#include <Protocol/SimpleTextInExNotify.h>
|
||||
#include <Protocol/HotPlugDevice.h>
|
||||
#include <Protocol/SimpleTextOut.h>
|
||||
#include <Protocol/SerialIo.h>
|
||||
|
|
|
@ -365,7 +365,6 @@ TerminalConInRegisterKeyNotify (
|
|||
OUT EFI_HANDLE *NotifyHandle
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
TERMINAL_DEV *TerminalDevice;
|
||||
TERMINAL_CONSOLE_IN_EX_NOTIFY *NewNotify;
|
||||
LIST_ENTRY *Link;
|
||||
|
@ -407,18 +406,10 @@ TerminalConInRegisterKeyNotify (
|
|||
|
||||
NewNotify->Signature = TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
|
||||
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
||||
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
|
||||
CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
|
||||
InsertTailList (&TerminalDevice->NotifyList, &NewNotify->NotifyEntry);
|
||||
//
|
||||
// Use gSimpleTextInExNotifyGuid to get a valid EFI_HANDLE
|
||||
//
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&NewNotify->NotifyHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
*NotifyHandle = NewNotify->NotifyHandle;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
@ -445,7 +436,6 @@ TerminalConInUnregisterKeyNotify (
|
|||
IN EFI_HANDLE NotificationHandle
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
TERMINAL_DEV *TerminalDevice;
|
||||
LIST_ENTRY *Link;
|
||||
TERMINAL_CONSOLE_IN_EX_NOTIFY *CurrentNotify;
|
||||
|
@ -455,18 +445,6 @@ TerminalConInUnregisterKeyNotify (
|
|||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
NotificationHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
TerminalDevice = TERMINAL_CON_IN_EX_DEV_FROM_THIS (This);
|
||||
|
||||
NotifyList = &TerminalDevice->NotifyList;
|
||||
|
@ -482,13 +460,7 @@ TerminalConInUnregisterKeyNotify (
|
|||
// Remove the notification function from NotifyList and free resources
|
||||
//
|
||||
RemoveEntryList (&CurrentNotify->NotifyEntry);
|
||||
Status = gBS->UninstallMultipleProtocolInterfaces (
|
||||
CurrentNotify->NotifyHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
gBS->FreePool (CurrentNotify);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,6 @@
|
|||
gEfiSimpleTextInProtocolGuid ## BY_START
|
||||
gEfiSimpleTextInputExProtocolGuid ## BY_START
|
||||
gEfiSimpleTextOutProtocolGuid ## BY_START
|
||||
gSimpleTextInExNotifyGuid ## SOMETIMES_CONSUMES
|
||||
gEfiHotPlugDeviceGuid ## SOMETIMES_CONSUMES
|
||||
|
||||
[Pcd]
|
||||
|
|
|
@ -34,7 +34,6 @@ Abstract:
|
|||
#include <Protocol/SimpleTextInEx.h>
|
||||
#include <Protocol/DriverBinding.h>
|
||||
#include <Protocol/GraphicsOutput.h>
|
||||
#include <Protocol/SimpleTextInExNotify.h>
|
||||
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/BaseLib.h>
|
||||
|
|
|
@ -69,4 +69,3 @@
|
|||
gEfiSimpleTextInProtocolGuid # PROTOCOL BY_START
|
||||
gEfiSimpleTextInputExProtocolGuid # PROTOCOL BY_START
|
||||
gEfiWinNtIoProtocolGuid # PROTOCOL TO_START
|
||||
gSimpleTextInExNotifyGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
|
|
|
@ -719,7 +719,6 @@ WinNtGopSimpleTextInExRegisterKeyNotify (
|
|||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
GOP_PRIVATE_DATA *Private;
|
||||
WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY *CurrentNotify;
|
||||
LIST_ENTRY *Link;
|
||||
|
@ -759,20 +758,10 @@ WinNtGopSimpleTextInExRegisterKeyNotify (
|
|||
|
||||
NewNotify->Signature = WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE;
|
||||
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
||||
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
|
||||
CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
|
||||
InsertTailList (&Private->NotifyList, &NewNotify->NotifyEntry);
|
||||
|
||||
//
|
||||
// Use gSimpleTextInExNotifyGuid to get a valid EFI_HANDLE
|
||||
//
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&NewNotify->NotifyHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
*NotifyHandle = NewNotify->NotifyHandle;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
@ -801,7 +790,6 @@ WinNtGopSimpleTextInExUnregisterKeyNotify (
|
|||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
GOP_PRIVATE_DATA *Private;
|
||||
LIST_ENTRY *Link;
|
||||
WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY *CurrentNotify;
|
||||
|
@ -810,18 +798,6 @@ WinNtGopSimpleTextInExUnregisterKeyNotify (
|
|||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
NotificationHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
(VOID **) NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This);
|
||||
|
||||
for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) {
|
||||
|
@ -836,13 +812,7 @@ WinNtGopSimpleTextInExUnregisterKeyNotify (
|
|||
// Remove the notification function from NotifyList and free resources
|
||||
//
|
||||
RemoveEntryList (&CurrentNotify->NotifyEntry);
|
||||
Status = gBS->UninstallMultipleProtocolInterfaces (
|
||||
CurrentNotify->NotifyHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
gBS->FreePool (CurrentNotify);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue