summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-25 05:35:12 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-25 05:35:12 +0000
commit7fc80d44841dbc1f1b68d75312ab7ec9e6d63613 (patch)
tree1237b73bb1563ca24435c17931eee8faf69b9807 /MdeModulePkg
parent1088908eb245fddf4de846139322fee89ccdb1f0 (diff)
downloadedk2-platforms-7fc80d44841dbc1f1b68d75312ab7ec9e6d63613.tar.xz
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
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c38
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h1
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf4
-rw-r--r--MdeModulePkg/Include/Protocol/SimpleTextInExNotify.h25
-rw-r--r--MdeModulePkg/MdeModulePkg.dec3
-rw-r--r--MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c32
-rw-r--r--MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h1
-rw-r--r--MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf1
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h1
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c34
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf1
11 files changed, 8 insertions, 133 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c
index 07fec7c315..c78305e780 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c
@@ -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;
@@ -1117,21 +1106,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.
//
NotifyList = &UsbKeyboardDevice->NotifyList;
@@ -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;
}
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h
index 73191e6a27..ec240457b5 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h
@@ -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>
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf b/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
index b2953fb9cf..f5701a834d 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
@@ -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.)
diff --git a/MdeModulePkg/Include/Protocol/SimpleTextInExNotify.h b/MdeModulePkg/Include/Protocol/SimpleTextInExNotify.h
deleted file mode 100644
index 7e4ae41355..0000000000
--- a/MdeModulePkg/Include/Protocol/SimpleTextInExNotify.h
+++ /dev/null
@@ -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
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index ee2c86d128..2e40bd7407 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -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 }}
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
index e189b7d5c9..78d9e9497f 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
@@ -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;
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
index b4b8f1d322..8c505740c3 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
@@ -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>
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
index f33b26af41..10c464f592 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
@@ -87,7 +87,6 @@
gEfiSimpleTextOutProtocolGuid ## BY_START
gEfiGraphicsOutputProtocolGuid ## BY_START
gEfiUgaDrawProtocolGuid ## BY_START
- gSimpleTextInExNotifyGuid ## PRODUCES
[FeaturePcd.common]
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h
index af3afecd15..e55343c068 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h
@@ -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>
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
index 4aa8c73f06..ae4ea818de 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
@@ -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;
}
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
index 204ca6040b..112b19e9f6 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
@@ -72,7 +72,6 @@
gEfiSimpleTextInProtocolGuid ## BY_START
gEfiSimpleTextInputExProtocolGuid ## BY_START
gEfiSimpleTextOutProtocolGuid ## BY_START
- gSimpleTextInExNotifyGuid ## SOMETIMES_CONSUMES
gEfiHotPlugDeviceGuid ## SOMETIMES_CONSUMES
[Pcd]