summaryrefslogtreecommitdiff
path: root/edk2/MdeModulePkg
diff options
context:
space:
mode:
authorczhang46 <czhang46@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-02 06:34:20 +0000
committerczhang46 <czhang46@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-02 06:34:20 +0000
commita90b855da268e6ed64b5a8b186689a1c4b544105 (patch)
tree993615c84c1d3924a24b890615b4821283eabc79 /edk2/MdeModulePkg
parentb625cfd7efcbf105b971f13dc64c77fabf363f0d (diff)
Measure ExitBootServices failure case
Signed-off-by: Chao Zhang<chao.b.zhang@intel.com> Reviewed-by: Dong Guo<guo.dong@intel.com> Reviewed-by: Gao Liming<liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk@13581 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'edk2/MdeModulePkg')
-rw-r--r--edk2/MdeModulePkg/Core/Dxe/DxeMain.h1
-rw-r--r--edk2/MdeModulePkg/Core/Dxe/DxeMain.inf1
-rw-r--r--edk2/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c4
-rw-r--r--edk2/MdeModulePkg/Include/Guid/EventExitBootServiceFailed.h24
-rw-r--r--edk2/MdeModulePkg/MdeModulePkg.dec7
5 files changed, 35 insertions, 2 deletions
diff --git a/edk2/MdeModulePkg/Core/Dxe/DxeMain.h b/edk2/MdeModulePkg/Core/Dxe/DxeMain.h
index dedb84047..53b5f5978 100644
--- a/edk2/MdeModulePkg/Core/Dxe/DxeMain.h
+++ b/edk2/MdeModulePkg/Core/Dxe/DxeMain.h
@@ -63,6 +63,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Guid/MemoryAllocationHob.h>
#include <Guid/EventLegacyBios.h>
#include <Guid/EventGroup.h>
+#include <Guid/EventExitBootServiceFailed.h>
#include <Guid/LoadModuleAtFixedAddress.h>
#include <Guid/IdleLoopEvent.h>
diff --git a/edk2/MdeModulePkg/Core/Dxe/DxeMain.inf b/edk2/MdeModulePkg/Core/Dxe/DxeMain.inf
index dda17aea0..0fe0259f0 100644
--- a/edk2/MdeModulePkg/Core/Dxe/DxeMain.inf
+++ b/edk2/MdeModulePkg/Core/Dxe/DxeMain.inf
@@ -110,6 +110,7 @@
gEfiEventDxeDispatchGuid ## CONSUMES ## GUID
gLoadFixedAddressConfigurationTableGuid ## SOMETIMES_CONSUMES
gIdleLoopEventGuid ## CONSUMES ## GUID
+ gEventExitBootServicesFailedGuid ## CONSUMES ## GUID
[Protocols]
gEfiStatusCodeRuntimeProtocolGuid ## SOMETIMES_CONSUMES
diff --git a/edk2/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/edk2/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
index 84a3583a6..a6d10e680 100644
--- a/edk2/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
+++ b/edk2/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
@@ -690,6 +690,10 @@ CoreExitBootServices (
//
Status = CoreTerminateMemoryMap (MapKey);
if (EFI_ERROR (Status)) {
+ //
+ // Notify other drivers that ExitBootServices fail
+ //
+ CoreNotifySignalList (&gEventExitBootServicesFailedGuid);
return Status;
}
diff --git a/edk2/MdeModulePkg/Include/Guid/EventExitBootServiceFailed.h b/edk2/MdeModulePkg/Include/Guid/EventExitBootServiceFailed.h
new file mode 100644
index 000000000..aa34d459b
--- /dev/null
+++ b/edk2/MdeModulePkg/Include/Guid/EventExitBootServiceFailed.h
@@ -0,0 +1,24 @@
+/** @file
+ GUID is the name of events used with ExitBootServices in order to be notified
+ when this ExitBootServices Call is failed.
+
+ Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
+ 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 __EVENT_EXIT_BOOT_FAILED_GUID_H__
+#define __EVENT_EXIT_BOOT_FAILED_GUID_H__
+
+#define EVENT_GROUP_EXIT_BOOT_SERVICES_FAILED \
+ { 0x4f6c5507, 0x232f, 0x4787, { 0xb9, 0x5e, 0x72, 0xf8, 0x62, 0x49, 0xc, 0xb1 } }
+
+extern EFI_GUID gEventExitBootServicesFailedGuid;
+
+#endif
diff --git a/edk2/MdeModulePkg/MdeModulePkg.dec b/edk2/MdeModulePkg/MdeModulePkg.dec
index ed0d94c68..bb58f794f 100644
--- a/edk2/MdeModulePkg/MdeModulePkg.dec
+++ b/edk2/MdeModulePkg/MdeModulePkg.dec
@@ -200,7 +200,7 @@
gRecoveryOnDataCdGuid = { 0x5CAC0099, 0x0DC9, 0x48E5, { 0x80, 0x68, 0xBB, 0x95, 0xF5, 0x40, 0x0A, 0x9F }}
## Include/Guid/SmmLockBox.h
- gEfiSmmLockBoxCommunicationGuid = { 0x2a3cfebd, 0x27e8, 0x4d0a, { 0x8b, 0x79, 0xd6, 0x88, 0xc2, 0xa3, 0xe1, 0xc0 }}
+ gEfiSmmLockBoxCommunicationGuid = { 0x2a3cfebd, 0x27e8, 0x4d0a, { 0x8b, 0x79, 0xd6, 0x88, 0xc2, 0xa3, 0xe1, 0xc0 }}
## Include/Guid/AcpiS3Context.h
gEfiAcpiVariableGuid = { 0xAF9FFD67, 0xEC10, 0x488A, { 0x9D, 0xFC, 0x6C, 0xBF, 0x5E, 0xE2, 0x2C, 0x2E }}
@@ -245,7 +245,10 @@
## Guid for Firmware Performance Data Table (FPDT) implementation.
# Include/Guid/FirmwarePerformance.h
- gEfiFirmwarePerformanceGuid = { 0xc095791a, 0x3001, 0x47b2, { 0x80, 0xc9, 0xea, 0xc7, 0x31, 0x9f, 0x2f, 0xa4 }}
+ gEfiFirmwarePerformanceGuid = { 0xc095791a, 0x3001, 0x47b2, { 0x80, 0xc9, 0xea, 0xc7, 0x31, 0x9f, 0x2f, 0xa4 }}
+
+ ## Include/Guid/ExitBootServiceFailed.h
+ gEventExitBootServicesFailedGuid = { 0x4f6c5507, 0x232f, 0x4787, { 0xb9, 0x5e, 0x72, 0xf8, 0x62, 0x49, 0xc, 0xb1 } }
[Ppis]
## Include/Ppi/AtaController.h