diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-06-04 09:36:42 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-06-04 09:36:42 +0000 |
commit | 06fb8ffd0771d95b3f8797c30bf8e620eddd1e23 (patch) | |
tree | af6cf0abb258fa77de44d5d7b275cc232e26bc1c /EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.c | |
parent | dabd48785bc21cd05327c49db1fcb8f7fb9c3867 (diff) | |
download | edk2-06fb8ffd0771d95b3f8797c30bf8e620eddd1e23.zip edk2-06fb8ffd0771d95b3f8797c30bf8e620eddd1e23.tar.gz edk2-06fb8ffd0771d95b3f8797c30bf8e620eddd1e23.tar.bz2 |
MdePkg:
1. Add AcpiTable & ComponentName2 Protocol definitions.
2. Add HardwareErrorVariable GUID definition.
EdkModulePkg:
1. Update DxeCore to let InsatllConfigurationTable() signal the event group whenever a table entry is inserted, modified or deleted.
2. Update ConPlatform to let Simple Text In and Out not share a stop function .
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2625 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.c')
-rw-r--r-- | EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.c | 94 |
1 files changed, 75 insertions, 19 deletions
diff --git a/EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.c b/EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.c index 15e7693..1972e0c 100644 --- a/EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.c +++ b/EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.c @@ -22,7 +22,7 @@ Abstract: EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding = {
ConPlatformTextInDriverBindingSupported,
ConPlatformTextInDriverBindingStart,
- ConPlatformDriverBindingStop,
+ ConPlatformTextInDriverBindingStop,
0xa,
NULL,
NULL
@@ -31,7 +31,7 @@ EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding = { EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding = {
ConPlatformTextOutDriverBindingSupported,
ConPlatformTextOutDriverBindingStart,
- ConPlatformDriverBindingStop,
+ ConPlatformTextOutDriverBindingStop,
0xa,
NULL,
NULL
@@ -287,7 +287,6 @@ Returns: EFI_STATUS Status;
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
EFI_SIMPLE_TEXT_OUT_PROTOCOL *TextOut;
-
BOOLEAN NeedClose;
NeedClose = TRUE;
@@ -360,6 +359,7 @@ Returns: DevicePath,
CHECK
);
+
if (!EFI_ERROR (Status)) {
NeedClose = FALSE;
Status = gBS->InstallMultipleProtocolInterfaces (
@@ -403,7 +403,7 @@ Returns: EFI_STATUS
EFIAPI
-ConPlatformDriverBindingStop (
+ConPlatformTextInDriverBindingStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN UINTN NumberOfChildren,
@@ -443,13 +443,81 @@ Returns: );
if (!EFI_ERROR (Status)) {
//
- // Remove DevicePath from ConInDev, ConOutDev, and StdErrDev
+ // Remove DevicePath from ConInDev
//
ConPlatformUpdateDeviceVariable (
VarConsoleInpDev,
DevicePath,
DELETE
);
+ }
+ }
+ //
+ // Uninstall the Console Device GUIDs from Controller Handle
+ //
+ ConPlatformUnInstallProtocol (
+ This,
+ ControllerHandle,
+ &gEfiConsoleInDeviceGuid
+ );
+
+ //
+ // Close the Simple Input Protocol
+ //
+ gBS->CloseProtocol (
+ ControllerHandle,
+ &gEfiSimpleTextInProtocolGuid,
+ This->DriverBindingHandle,
+ ControllerHandle
+ );
+
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
+EFIAPI
+ConPlatformTextOutDriverBindingStop (
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN UINTN NumberOfChildren,
+ IN EFI_HANDLE *ChildHandleBuffer
+ )
+/*++
+
+Routine Description:
+
+Arguments:
+ (Standard DriverBinding Protocol Stop() function)
+
+Returns:
+
+ None
+
+--*/
+{
+ EFI_STATUS Status;
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;
+
+ //
+ // hot plug device is not included into the console associated variables,
+ // so no need to check variable for those hot plug devices.
+ //
+ if (!IsHotPlugDevice (This->DriverBindingHandle, ControllerHandle)) {
+ //
+ // Get the Device Path Protocol so the environment variables can be updated
+ //
+ Status = gBS->OpenProtocol (
+ ControllerHandle,
+ &gEfiDevicePathProtocolGuid,
+ (VOID **) &DevicePath,
+ This->DriverBindingHandle,
+ ControllerHandle,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+ if (!EFI_ERROR (Status)) {
+ //
+ // Remove DevicePath from ConOutDev, and StdErrDev
+ //
ConPlatformUpdateDeviceVariable (
VarConsoleOutDev,
DevicePath,
@@ -468,12 +536,6 @@ Returns: ConPlatformUnInstallProtocol (
This,
ControllerHandle,
- &gEfiConsoleInDeviceGuid
- );
-
- ConPlatformUnInstallProtocol (
- This,
- ControllerHandle,
&gEfiConsoleOutDeviceGuid
);
@@ -484,17 +546,10 @@ Returns: );
//
- // Close the Simple Input and Simple Text Output Protocols
+ // Close the Simple Text Output Protocol
//
gBS->CloseProtocol (
ControllerHandle,
- &gEfiSimpleTextInProtocolGuid,
- This->DriverBindingHandle,
- ControllerHandle
- );
-
- gBS->CloseProtocol (
- ControllerHandle,
&gEfiSimpleTextOutProtocolGuid,
This->DriverBindingHandle,
ControllerHandle
@@ -503,6 +558,7 @@ Returns: return EFI_SUCCESS;
}
+
VOID
ConPlatformUnInstallProtocol (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|