Functions | |
EFI_STATUS EFIAPI | PhysicalPresencePpiNotifyCallback (IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi) |
EFI_STATUS EFIAPI | FirmwareVolmeInfoPpiNotifyCallback (IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi) |
EFI_STATUS EFIAPI | EndofPeiSignalNotifyCallBack (IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi) |
EFI_STATUS | HashLogExtendEvent (IN EFI_PEI_SERVICES **PeiServices, IN UINT8 *HashData, IN UINTN HashDataLen, IN TIS_TPM_HANDLE TpmHandle, IN TCG_PCR_EVENT_HDR *NewEventHdr, IN UINT8 *NewEventData) |
EFI_STATUS EFIAPI | MeasureCRTMVersion (IN EFI_PEI_SERVICES **PeiServices, IN TIS_TPM_HANDLE TpmHandle) |
EFI_STATUS EFIAPI | MeasureFvImage (IN EFI_PHYSICAL_ADDRESS FvBase, IN UINT64 FvLength) |
EFI_STATUS EFIAPI | MeasureMainBios (IN EFI_PEI_SERVICES **PeiServices, IN TIS_TPM_HANDLE TpmHandle) |
BOOLEAN EFIAPI | IsTpmUsable (IN EFI_PEI_SERVICES **PeiServices, IN TIS_TPM_HANDLE TpmHandle) |
EFI_STATUS EFIAPI | PeimEntryMP (IN EFI_PEI_SERVICES **PeiServices) |
EFI_STATUS EFIAPI | PeimEntryMA (IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices) |
Variables | |
BOOLEAN | mImageInMemory = FALSE |
EFI_PEI_PPI_DESCRIPTOR | mTpmInitializedPpiList |
EFI_PEI_PPI_DESCRIPTOR | mTpmInitializationDonePpiList |
EFI_PLATFORM_FIRMWARE_BLOB * | mMeasuredBaseFvInfo |
UINT32 | mMeasuredBaseFvIndex = 0 |
EFI_PLATFORM_FIRMWARE_BLOB * | mMeasuredChildFvInfo |
UINT32 | mMeasuredChildFvIndex = 0 |
EFI_PEI_FIRMWARE_VOLUME_INFO_MEASUREMENT_EXCLUDED_PPI * | mMeasurementExcludedFvPpi |
EFI_PEI_NOTIFY_DESCRIPTOR | mNotifyList [] |
Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.
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.
EFI_STATUS EFIAPI EndofPeiSignalNotifyCallBack | ( | IN EFI_PEI_SERVICES ** | PeiServices, | |
IN EFI_PEI_NOTIFY_DESCRIPTOR * | NotifyDescriptor, | |||
IN VOID * | Ppi | |||
) |
Record all measured Firmware Volum Information into a Guid Hob
[in] | PeiServices | An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. |
[in] | NotifyDescriptor | Address of the notification descriptor data structure. |
[in] | Ppi | Address of the PPI that was installed. |
EFI_SUCCESS | The FV Info is measured and recorded to TPM. |
UINT32 *************************** FIRMWARE_BLOB number EFI_PLATFORM_FIRMWARE_BLOB******** BLOB Array
[in] | PeiServices | An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. |
[in] | NotifyDescriptor | Address of the notification descriptor data structure. |
[in] | Ppi | Address of the PPI that was installed. |
EFI_SUCCESS | The FV Info is measured and recorded to TPM. |
EFI_STATUS EFIAPI FirmwareVolmeInfoPpiNotifyCallback | ( | IN EFI_PEI_SERVICES ** | PeiServices, | |
IN EFI_PEI_NOTIFY_DESCRIPTOR * | NotifyDescriptor, | |||
IN VOID * | Ppi | |||
) |
Measure and record the Firmware Volum Information once FvInfoPPI install.
[in] | PeiServices | An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. |
[in] | NotifyDescriptor | Address of the notification descriptor data structure. |
[in] | Ppi | Address of the PPI that was installed. |
EFI_SUCCESS | The FV Info is measured and recorded to TPM. |
EFI_STATUS HashLogExtendEvent | ( | IN EFI_PEI_SERVICES ** | PeiServices, | |
IN UINT8 * | HashData, | |||
IN UINTN | HashDataLen, | |||
IN TIS_TPM_HANDLE | TpmHandle, | |||
IN TCG_PCR_EVENT_HDR * | NewEventHdr, | |||
IN UINT8 * | NewEventData | |||
) |
Do a hash operation on a data buffer, extend a specific TPM PCR with the hash result, and build a GUIDed HOB recording the event which will be passed to the DXE phase and added into the Event Log.
[in] | PeiServices | Describes the list of possible PEI Services. |
[in] | HashData | Physical address of the start of the data buffer to be hashed, extended, and logged. |
[in] | HashDataLen | The length, in bytes, of the buffer referenced by HashData. |
[in] | TpmHandle | TPM handle. |
[in] | NewEventHdr | Pointer to a TCG_PCR_EVENT_HDR data structure. |
[in] | NewEventData | Pointer to the new event data. |
EFI_SUCCESS | Operation completed successfully. | |
EFI_OUT_OF_RESOURCES | No enough memory to log the new event. | |
EFI_DEVICE_ERROR | The command was unsuccessful. |
References EFI_STATUS(), gTcgEventEntryHobGuid, gTpmErrorHobGuid, TpmCommExtend(), and TpmCommHashAll().
BOOLEAN EFIAPI IsTpmUsable | ( | IN EFI_PEI_SERVICES ** | PeiServices, | |
IN TIS_TPM_HANDLE | TpmHandle | |||
) |
Check if TPM chip is activeated or not.
[in] | PeiServices | Describes the list of possible PEI Services. |
[in] | TpmHandle | TPM handle. |
TRUE | TPM is activated. | |
FALSE | TPM is deactivated. |
References BOOLEAN(), EFI_STATUS(), and TpmCommGetCapability().
Referenced by PeimEntryMP().
EFI_STATUS EFIAPI MeasureCRTMVersion | ( | IN EFI_PEI_SERVICES ** | PeiServices, | |
IN TIS_TPM_HANDLE | TpmHandle | |||
) |
Measure CRTM version.
[in] | PeiServices | Describes the list of possible PEI Services. |
[in] | TpmHandle | TPM handle. |
EFI_SUCCESS | Operation completed successfully. | |
EFI_OUT_OF_RESOURCES | No enough memory to log the new event. | |
EFI_DEVICE_ERROR | The command was unsuccessful. |
References HashLogExtendEvent().
EFI_STATUS EFIAPI MeasureFvImage | ( | IN EFI_PHYSICAL_ADDRESS | FvBase, | |
IN UINT64 | FvLength | |||
) |
Measure FV image. Add it into the measured FV list after the FV is measured successfully.
[in] | FvBase | Base address of FV image. |
[in] | FvLength | Length of FV image. |
EFI_SUCCESS | Fv image is measured successfully or it has been already measured. | |
EFI_OUT_OF_RESOURCES | No enough memory to log the new event. | |
EFI_DEVICE_ERROR | The command was unsuccessful. |
References EFI_PEI_FIRMWARE_VOLUME_INFO_MEASUREMENT_EXCLUDED_PPI::Count, EFI_STATUS(), EFI_PEI_FIRMWARE_VOLUME_INFO_MEASUREMENT_EXCLUDED_PPI::Fv, EFI_PEI_FIRMWARE_VOLUME_INFO_MEASUREMENT_EXCLUDED_FV::FvBase, HashLogExtendEvent(), mMeasuredBaseFvIndex, mMeasuredBaseFvInfo, TPM_BASE_ADDRESS, and UINTN().
EFI_STATUS EFIAPI MeasureMainBios | ( | IN EFI_PEI_SERVICES ** | PeiServices, | |
IN TIS_TPM_HANDLE | TpmHandle | |||
) |
Measure main BIOS.
[in] | PeiServices | Describes the list of possible PEI Services. |
[in] | TpmHandle | TPM handle. |
EFI_SUCCESS | Operation completed successfully. | |
EFI_OUT_OF_RESOURCES | No enough memory to log the new event. | |
EFI_DEVICE_ERROR | The command was unsuccessful. |
References EFI_STATUS(), MeasureFvImage(), TRUE, and UINTN().
EFI_STATUS EFIAPI PeimEntryMA | ( | IN EFI_PEI_FILE_HANDLE | FileHandle, | |
IN CONST EFI_PEI_SERVICES ** | PeiServices | |||
) |
Entry point of this module.
[in] | FileHandle | Handle of the file being invoked. |
[in] | PeiServices | Describes the list of possible PEI Services. |
References EFI_STATUS(), gEfiTpmDeviceInstanceTpm12Guid, gTpmErrorHobGuid, mImageInMemory, mTpmInitializationDonePpiList, mTpmInitializedPpiList, PeimEntryMP(), TisPcRequestUseTpm(), TPM_BASE_ADDRESS, TpmCommContinueSelfTest(), TpmCommStartup(), TRUE, and UINTN().
EFI_STATUS EFIAPI PeimEntryMP | ( | IN EFI_PEI_SERVICES ** | PeiServices | ) |
Do measurement after memory is ready.
[in] | PeiServices | Describes the list of possible PEI Services. |
EFI_SUCCESS | Operation completed successfully. | |
EFI_OUT_OF_RESOURCES | No enough memory to log the new event. | |
EFI_DEVICE_ERROR | The command was unsuccessful. |
References EFI_STATUS(), gEfiPeiFirmwareVolumeInfoMeasurementExcludedPpiGuid, IsTpmUsable(), MeasureCRTMVersion(), MeasureMainBios(), mMeasuredBaseFvInfo, mMeasuredChildFvInfo, mNotifyList, TisPcRequestUseTpm(), TPM_BASE_ADDRESS, and UINTN().
EFI_STATUS EFIAPI PhysicalPresencePpiNotifyCallback | ( | IN EFI_PEI_SERVICES ** | PeiServices, | |
IN EFI_PEI_NOTIFY_DESCRIPTOR * | NotifyDescriptor, | |||
IN VOID * | Ppi | |||
) |
Lock physical presence if needed.
[in] | PeiServices | An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation |
[in] | NotifyDescriptor | Address of the notification descriptor data structure. |
[in] | Ppi | Address of the PPI that was installed. |
EFI_SUCCESS | Operation completed successfully. |
[in] | PeiServices | An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation |
[in] | NotifyDescriptor | Address of the notification descriptor data structure. |
[in] | Ppi | Address of the PPI that was installed. |
EFI_SUCCESS | Operation completed successfully. | |
EFI_ABORTED | physicalPresenceCMDEnable is locked. | |
EFI_DEVICE_ERROR | The command was unsuccessful. |
References BOOLEAN(), EFI_STATUS(), _PEI_LOCK_PHYSICAL_PRESENCE_PPI::LockPhysicalPresence, TPM_BASE_ADDRESS, TpmCommGetCapability(), TpmCommPhysicalPresence(), TRUE, and UINTN().
BOOLEAN mImageInMemory = FALSE |
UINT32 mMeasuredBaseFvIndex = 0 |
EFI_PLATFORM_FIRMWARE_BLOB* mMeasuredBaseFvInfo |
UINT32 mMeasuredChildFvIndex = 0 |
EFI_PLATFORM_FIRMWARE_BLOB* mMeasuredChildFvInfo |
EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList[] |
Initial value:
{ { EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK, &gPeiLockPhysicalPresencePpiGuid, PhysicalPresencePpiNotifyCallback }, { EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK, &gEfiPeiFirmwareVolumeInfoPpiGuid, FirmwareVolmeInfoPpiNotifyCallback }, { EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK, &gEfiPeiFirmwareVolumeInfo2PpiGuid, FirmwareVolmeInfoPpiNotifyCallback }, { (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), &gEfiEndOfPeiSignalPpiGuid, EndofPeiSignalNotifyCallBack } }
EFI_PEI_PPI_DESCRIPTOR mTpmInitializationDonePpiList |
Initial value:
{ EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, &gPeiTpmInitializationDonePpiGuid, NULL }
EFI_PEI_PPI_DESCRIPTOR mTpmInitializedPpiList |
Initial value:
{ EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, &gPeiTpmInitializedPpiGuid, NULL }