42 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
43 &gRepublishSecPpiPpiGuid,
44 &mEdkiiRepublishSecPpiPpi
48 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
49 &gEfiSecPlatformInformationPpiGuid,
50 &mSecPlatformInformationPostMemoryPpi
54 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
55 &gEfiTemporaryRamDonePpiGuid,
56 &mSecTemporaryRamDonePostMemoryPpi
60 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
61 &gEfiTemporaryRamSupportPpiGuid,
62 &mSecTemporaryRamSupportPostMemoryPpi
66 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
67 &gPeiSecPerformancePpiGuid,
153 if ((This ==
NULL) || (Performance ==
NULL)) {
154 return EFI_INVALID_PARAMETER;
158 if (SecPlatformInformationContexHob ==
NULL) {
159 return EFI_NOT_FOUND;
162 Performance->ResetEnd = SecPlatformInformationContexHob->FirmwareSecPerformance.
ResetEnd;
185 IN OUT UINT64 *StructureSize,
191 if (StructureSize ==
NULL) {
192 return EFI_INVALID_PARAMETER;
196 if (SecPlatformInformationContexHob ==
NULL) {
197 return EFI_NOT_FOUND;
200 if (*StructureSize < SecPlatformInformationContexHob->Context.StructureSize) {
201 *StructureSize = SecPlatformInformationContexHob->Context.StructureSize;
202 return EFI_BUFFER_TOO_SMALL;
205 if (PlatformInformationRecord ==
NULL) {
206 return EFI_INVALID_PARAMETER;
209 *StructureSize = SecPlatformInformationContexHob->Context.StructureSize;
211 (VOID *)PlatformInformationRecord,
212 (VOID *)SecPlatformInformationContexHob->Context.PlatformInformationRecord,
213 (
UINTN)SecPlatformInformationContexHob->Context.StructureSize
240 UINT64 SecStructureSize;
242 SecPlatformInformationPtr =
NULL;
243 SecStructureSize = 0;
246 &gEfiTemporaryRamDonePpiGuid,
251 if (!EFI_ERROR (Status)) {
254 &mSecTemporaryRamDonePostMemoryDescriptor
260 &gEfiTemporaryRamSupportPpiGuid,
265 if (!EFI_ERROR (Status)) {
268 &mSecTemporaryRamSupportPostMemoryDescriptor
274 EFI_HOB_TYPE_GUID_EXTENSION,
276 (VOID **)&SecPlatformInformationContextHob
279 if (EFI_ERROR (Status)) {
280 DEBUG ((DEBUG_ERROR,
"SecPlatformInformation Context HOB could not be created.\n"));
284 SecPlatformInformationContextHob->Header.
Name = gEfiCallerIdGuid;
285 SecPlatformInformationContextHob->Revision = 1;
288 &gPeiSecPerformancePpiGuid,
293 if (!EFI_ERROR (Status)) {
297 &SecPlatformInformationContextHob->FirmwareSecPerformance
300 if (!EFI_ERROR (Status)) {
303 &mSecPerformancePpiDescriptor
310 &gEfiSecPlatformInformationPpiGuid,
315 if (!EFI_ERROR (Status)) {
319 SecPlatformInformationPtr
321 ASSERT (Status == EFI_BUFFER_TOO_SMALL);
322 if (Status != EFI_BUFFER_TOO_SMALL) {
323 return EFI_NOT_FOUND;
327 SecPlatformInformationContextHob->Context.PlatformInformationRecord =
AllocatePool ((
UINTN)SecStructureSize);
328 ASSERT (SecPlatformInformationContextHob->Context.PlatformInformationRecord !=
NULL);
329 if (SecPlatformInformationContextHob->Context.PlatformInformationRecord ==
NULL) {
330 return EFI_OUT_OF_RESOURCES;
333 SecPlatformInformationContextHob->Context.StructureSize = SecStructureSize;
337 &(SecPlatformInformationContextHob->Context.StructureSize),
338 SecPlatformInformationContextHob->Context.PlatformInformationRecord
341 if (!EFI_ERROR (Status)) {
344 &mSecPlatformInformationPostMemoryDescriptor
377 Status = EFI_ABORTED;
379 if (
PcdGetBool (PcdMigrateTemporaryRamFirmwareVolumes)) {
CONST EFI_PEI_SERVICES **EFIAPI GetPeiServicesTablePointer(VOID)
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
EFI_STATUS EFIAPI PeiServicesCreateHob(IN UINT16 Type, IN UINT16 Length, OUT VOID **Hob)
EFI_STATUS EFIAPI PeiServicesLocatePpi(IN CONST EFI_GUID *Guid, IN UINTN Instance, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, IN OUT VOID **Ppi)
EFI_STATUS EFIAPI PeiServicesInstallPpi(IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList)
EFI_STATUS EFIAPI PeiServicesReInstallPpi(IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi, IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi)
#define GLOBAL_REMOVE_IF_UNREFERENCED
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
#define PcdGetBool(TokenName)
VOID * EFI_PEI_FILE_HANDLE
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
EFI_STATUS EFIAPI SecMigrationPeiInitialize(IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices)
EFI_STATUS EFIAPI SecPlatformInformationPostMemory(IN CONST EFI_PEI_SERVICES **PeiServices, IN OUT UINT64 *StructureSize, OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord)
EFI_STATUS EFIAPI SecTemporaryRamDonePostMemory(VOID)
EFI_STATUS EFIAPI GetPerformancePostMemory(IN CONST EFI_PEI_SERVICES **PeiServices, IN PEI_SEC_PERFORMANCE_PPI *This, OUT FIRMWARE_SEC_PERFORMANCE *Performance)
EFI_STATUS EFIAPI SecTemporaryRamSupportPostMemory(IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase, IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase, IN UINTN CopySize)
EFI_STATUS EFIAPI RepublishSecPpis(VOID)
UINT64 EFI_PHYSICAL_ADDRESS
UINT64 ResetEnd
Timer value logged at the beginning of firmware image execution, in unit of nanosecond.