2 Platform specific TPM2 component for configuring the Platform Hierarchy.
4 Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #include <Library/DebugLib.h>
12 #include <Library/UefiBootServicesTableLib.h>
13 #include <Library/UefiLib.h>
14 #include <Library/TpmPlatformHierarchyLib.h>
15 #include <Protocol/DxeSmmReadyToLock.h>
18 This callback function will run at the SmmReadyToLock event.
20 Configuration of the TPM's Platform Hierarchy Authorization Value (platformAuth)
21 and Platform Hierarchy Authorization Policy (platformPolicy) can be defined through this function.
23 @param Event Pointer to this event
24 @param Context Event hanlder private data
28 SmmReadyToLockEventCallBack (
37 // Try to locate it because EfiCreateProtocolNotifyEvent will trigger it once when registration.
38 // Just return if it is not found.
40 Status
= gBS
->LocateProtocol (
41 &gEfiDxeSmmReadyToLockProtocolGuid
,
45 if (EFI_ERROR (Status
)) {
49 ConfigureTpmPlatformHierarchy ();
51 gBS
->CloseEvent (Event
);
55 The driver's entry point. Will register a function for callback during SmmReadyToLock event to
56 configure the TPM's platform authorization.
58 @param[in] ImageHandle The firmware allocated handle for the EFI image.
59 @param[in] SystemTable A pointer to the EFI System Table.
61 @retval EFI_SUCCESS The entry point is executed successfully.
62 @retval other Some error occurs when executing this entry point.
66 Tcg2PlatformDxeEntryPoint (
67 IN EFI_HANDLE ImageHandle
,
68 IN EFI_SYSTEM_TABLE
*SystemTable
74 Event
= EfiCreateProtocolNotifyEvent (
75 &gEfiDxeSmmReadyToLockProtocolGuid
,
77 SmmReadyToLockEventCallBack
,
82 ASSERT (Event
!= NULL
);