mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-30 00:54:06 +02:00
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/edk2@13580 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
dda39f3a58
commit
9e945f7852
@ -23,6 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include <Guid/HobList.h>
|
#include <Guid/HobList.h>
|
||||||
#include <Guid/TcgEventHob.h>
|
#include <Guid/TcgEventHob.h>
|
||||||
#include <Guid/EventGroup.h>
|
#include <Guid/EventGroup.h>
|
||||||
|
#include <Guid/EventExitBootServiceFailed.h>
|
||||||
#include <Protocol/DevicePath.h>
|
#include <Protocol/DevicePath.h>
|
||||||
#include <Protocol/TcgService.h>
|
#include <Protocol/TcgService.h>
|
||||||
#include <Protocol/AcpiTable.h>
|
#include <Protocol/AcpiTable.h>
|
||||||
@ -1103,6 +1104,34 @@ OnExitBootServices (
|
|||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Exit Boot Services Failed Event notification handler.
|
||||||
|
|
||||||
|
Measure Failure of ExitBootServices.
|
||||||
|
|
||||||
|
@param[in] Event Event whose notification function is being invoked
|
||||||
|
@param[in] Context Pointer to the notification function's context
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
OnExitBootServicesFailed (
|
||||||
|
IN EFI_EVENT Event,
|
||||||
|
IN VOID *Context
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Measure Failure of ExitBootServices,
|
||||||
|
//
|
||||||
|
Status = TcgMeasureAction (
|
||||||
|
EFI_EXIT_BOOT_SERVICES_FAILED
|
||||||
|
);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get TPM Deactivated state.
|
Get TPM Deactivated state.
|
||||||
|
|
||||||
@ -1205,6 +1234,18 @@ DriverEntry (
|
|||||||
&gEfiEventExitBootServicesGuid,
|
&gEfiEventExitBootServicesGuid,
|
||||||
&Event
|
&Event
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Measure Exit Boot Service failed
|
||||||
|
//
|
||||||
|
Status = gBS->CreateEventEx (
|
||||||
|
EVT_NOTIFY_SIGNAL,
|
||||||
|
TPL_NOTIFY,
|
||||||
|
OnExitBootServicesFailed,
|
||||||
|
NULL,
|
||||||
|
&gEventExitBootServicesFailedGuid,
|
||||||
|
&Event
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
gTcgEventEntryHobGuid
|
gTcgEventEntryHobGuid
|
||||||
gEfiEventReadyToBootGuid
|
gEfiEventReadyToBootGuid
|
||||||
gEfiEventExitBootServicesGuid
|
gEfiEventExitBootServicesGuid
|
||||||
|
gEventExitBootServicesFailedGuid # ALWAYS_CONSUMED
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiTcgProtocolGuid ## PRODUCES
|
gEfiTcgProtocolGuid ## PRODUCES
|
||||||
|
Loading…
x
Reference in New Issue
Block a user