EFI_SEC_PLATFORM_INFORMATION_PPI mSecPlatformInformationPpi = { SecPlatformInformation };\r
\r
EFI_PEI_PPI_DESCRIPTOR mPeiSecPlatformInformationPpi[] = {\r
+ {\r
+ //\r
+ // SecPerformance PPI notify descriptor.\r
+ //\r
+ EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,\r
+ &gPeiSecPerformancePpiGuid,\r
+ (VOID *) (UINTN) SecPerformancePpiCallBack\r
+ },\r
{\r
EFI_PEI_PPI_DESCRIPTOR_PPI,\r
&gEfiTemporaryRamDonePpiGuid,\r
IN VOID *Context\r
);\r
\r
+/**\r
+ Entry point of the notification callback function itself within the PEIM.\r
+ It is to get SEC performance data and build HOB to convey the SEC performance\r
+ data to DXE phase.\r
+\r
+ @param PeiServices Indirect reference to the PEI Services Table.\r
+ @param NotifyDescriptor Address of the notification descriptor data structure.\r
+ @param Ppi Address of the PPI that was installed.\r
+\r
+ @return Status of the notification.\r
+ The status code returned from this function is ignored.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SecPerformancePpiCallBack (\r
+ IN EFI_PEI_SERVICES **PeiServices,\r
+ IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r
+ IN VOID *Ppi\r
+ )\r
+{\r
+ EFI_STATUS Status;\r
+ PEI_SEC_PERFORMANCE_PPI *SecPerf;\r
+ FIRMWARE_SEC_PERFORMANCE Performance;\r
+\r
+ SecPerf = (PEI_SEC_PERFORMANCE_PPI *) Ppi;\r
+ Status = SecPerf->GetPerformance ((CONST EFI_PEI_SERVICES **) PeiServices, SecPerf, &Performance);\r
+ if (!EFI_ERROR (Status)) {\r
+ BuildGuidDataHob (\r
+ &gEfiFirmwarePerformanceGuid,\r
+ &Performance,\r
+ sizeof (FIRMWARE_SEC_PERFORMANCE)\r
+ );\r
+ DEBUG ((DEBUG_INFO, "FPDT: SEC Performance Hob ResetEnd = %ld\n", Performance.ResetEnd));\r
+ }\r
+\r
+ return Status;\r
+}\r
+\r
/**\r
\r
Entry point to the C language phase of SEC. After the SEC assembly\r