summaryrefslogtreecommitdiff
path: root/EdkModulePkg
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2007-06-04 09:36:42 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2007-06-04 09:36:42 +0000
commit06fb8ffd0771d95b3f8797c30bf8e620eddd1e23 (patch)
treeaf6cf0abb258fa77de44d5d7b275cc232e26bc1c /EdkModulePkg
parentdabd48785bc21cd05327c49db1fcb8f7fb9c3867 (diff)
downloadedk2-platforms-06fb8ffd0771d95b3f8797c30bf8e620eddd1e23.tar.xz
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')
-rw-r--r--EdkModulePkg/Core/Dxe/Misc/InstallConfigurationTable.c11
-rw-r--r--EdkModulePkg/Include/Common/Variable.h13
-rw-r--r--EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.c94
-rw-r--r--EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.h11
4 files changed, 105 insertions, 24 deletions
diff --git a/EdkModulePkg/Core/Dxe/Misc/InstallConfigurationTable.c b/EdkModulePkg/Core/Dxe/Misc/InstallConfigurationTable.c
index ee42f224e8..677a2108bf 100644
--- a/EdkModulePkg/Core/Dxe/Misc/InstallConfigurationTable.c
+++ b/EdkModulePkg/Core/Dxe/Misc/InstallConfigurationTable.c
@@ -125,6 +125,12 @@ Returns:
// Modify the table enty and return.
//
gDxeCoreST->ConfigurationTable[Index].VendorTable = Table;
+
+ //
+ // Signal Configuration Table change
+ //
+ CoreNotifySignalList (Guid);
+
return EFI_SUCCESS;
}
@@ -210,5 +216,10 @@ Returns:
//
CalculateEfiHdrCrc (&gDxeCoreST->Hdr);
+ //
+ // Signal Configuration Table change
+ //
+ CoreNotifySignalList (Guid);
+
return EFI_SUCCESS;
}
diff --git a/EdkModulePkg/Include/Common/Variable.h b/EdkModulePkg/Include/Common/Variable.h
index a6e5c3bdc5..a732323005 100644
--- a/EdkModulePkg/Include/Common/Variable.h
+++ b/EdkModulePkg/Include/Common/Variable.h
@@ -17,15 +17,20 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define VARIABLE_STORE_SIGNATURE EFI_SIGNATURE_32 ('$', 'V', 'S', 'S')
-#define MAX_VARIABLE_SIZE 1024
+#define MAX_VARIABLE_SIZE 1024
-#define VARIABLE_DATA 0x55AA
+//
+// Enlarges the hardware error record maximum variable size to 32K bytes
+//
+#define MAX_HARDWARE_ERROR_VARIABLE_SIZE 0x8000
+
+#define VARIABLE_DATA 0x55AA
//
// Variable Store Header flags
//
-#define VARIABLE_STORE_FORMATTED 0x5a
-#define VARIABLE_STORE_HEALTHY 0xfe
+#define VARIABLE_STORE_FORMATTED 0x5a
+#define VARIABLE_STORE_HEALTHY 0xfe
//
// The alignment of variable's start offset.
diff --git a/EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.c b/EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.c
index 15e7693d1d..1972e0c6aa 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,
diff --git a/EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.h b/EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.h
index cedda9e0d1..c14a5ed16e 100644
--- a/EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.h
+++ b/EdkModulePkg/Universal/ConPlatform/Dxe/ConPlatform.h
@@ -75,7 +75,16 @@ ConPlatformTextOutDriverBindingStart (
EFI_STATUS
EFIAPI
-ConPlatformDriverBindingStop (
+ConPlatformTextInDriverBindingStop (
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE Handle,
+ IN UINTN NumberOfChildren,
+ IN EFI_HANDLE *ChildHandleBuffer
+ );
+
+EFI_STATUS
+EFIAPI
+ConPlatformTextOutDriverBindingStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Handle,
IN UINTN NumberOfChildren,