\r
#include "SecMain.h"\r
\r
-EFI_SEC_PLATFORM_INFORMATION_PPI mSecPlatformInformation = {\r
+EFI_SEC_PLATFORM_INFORMATION_PPI mSecPlatformInformation = {\r
SecPlatformInformationBist\r
};\r
\r
-EFI_PEI_PPI_DESCRIPTOR mPeiSecPlatformInformation = {\r
+EFI_PEI_PPI_DESCRIPTOR mPeiSecPlatformInformation = {\r
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
&gEfiSecPlatformInformationPpiGuid,\r
&mSecPlatformInformation\r
};\r
\r
-EFI_SEC_PLATFORM_INFORMATION2_PPI mSecPlatformInformation2 = {\r
+EFI_SEC_PLATFORM_INFORMATION2_PPI mSecPlatformInformation2 = {\r
SecPlatformInformation2Bist\r
};\r
\r
-EFI_PEI_PPI_DESCRIPTOR mPeiSecPlatformInformation2 = {\r
+EFI_PEI_PPI_DESCRIPTOR mPeiSecPlatformInformation2 = {\r
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
&gEfiSecPlatformInformation2PpiGuid,\r
&mSecPlatformInformation2\r
**/\r
EFI_STATUS\r
GetBistFromHob (\r
- IN OUT UINT64 *StructureSize,\r
- IN OUT VOID *StructureBuffer\r
+ IN OUT UINT64 *StructureSize,\r
+ IN OUT VOID *StructureBuffer\r
)\r
{\r
- EFI_HOB_GUID_TYPE *GuidHob;\r
- VOID *DataInHob;\r
- UINTN DataSize;\r
+ EFI_HOB_GUID_TYPE *GuidHob;\r
+ VOID *DataInHob;\r
+ UINTN DataSize;\r
\r
GuidHob = GetFirstGuidHob (&gEfiCallerIdGuid);\r
if (GuidHob == NULL) {\r
//\r
// return the information from BistHob\r
//\r
- if ((*StructureSize) < (UINT64) DataSize) {\r
- *StructureSize = (UINT64) DataSize;\r
+ if ((*StructureSize) < (UINT64)DataSize) {\r
+ *StructureSize = (UINT64)DataSize;\r
return EFI_BUFFER_TOO_SMALL;\r
}\r
\r
- *StructureSize = (UINT64) DataSize;\r
+ *StructureSize = (UINT64)DataSize;\r
CopyMem (StructureBuffer, DataInHob, DataSize);\r
return EFI_SUCCESS;\r
}\r
EFI_STATUS\r
EFIAPI\r
SecPlatformInformationBist (\r
- IN CONST EFI_PEI_SERVICES **PeiServices,\r
- IN OUT UINT64 *StructureSize,\r
- OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN OUT UINT64 *StructureSize,\r
+ OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord\r
)\r
{\r
return GetBistFromHob (StructureSize, PlatformInformationRecord);\r
EFI_STATUS\r
EFIAPI\r
SecPlatformInformation2Bist (\r
- IN CONST EFI_PEI_SERVICES **PeiServices,\r
- IN OUT UINT64 *StructureSize,\r
- OUT EFI_SEC_PLATFORM_INFORMATION_RECORD2 *PlatformInformationRecord2\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN OUT UINT64 *StructureSize,\r
+ OUT EFI_SEC_PLATFORM_INFORMATION_RECORD2 *PlatformInformationRecord2\r
)\r
{\r
return GetBistFromHob (StructureSize, PlatformInformationRecord2);\r
**/\r
EFI_STATUS\r
GetBistInfoFromPpi (\r
- IN CONST EFI_PEI_SERVICES **PeiServices,\r
- IN CONST EFI_GUID *Guid,\r
- OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,\r
- OUT VOID **BistInformationData,\r
- OUT UINT64 *BistInformationSize OPTIONAL\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_GUID *Guid,\r
+ OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,\r
+ OUT VOID **BistInformationData,\r
+ OUT UINT64 *BistInformationSize OPTIONAL\r
)\r
{\r
EFI_STATUS Status;\r
//\r
InformationSize = 0;\r
SecPlatformInformation2 = NULL;\r
- Status = SecPlatformInformation2Ppi->PlatformInformation2 (\r
- PeiServices,\r
- &InformationSize,\r
- SecPlatformInformation2\r
- );\r
+ Status = SecPlatformInformation2Ppi->PlatformInformation2 (\r
+ PeiServices,\r
+ &InformationSize,\r
+ SecPlatformInformation2\r
+ );\r
if (Status == EFI_BUFFER_TOO_SMALL) {\r
Status = PeiServicesAllocatePool (\r
- (UINTN) InformationSize,\r
- (VOID **) &SecPlatformInformation2\r
+ (UINTN)InformationSize,\r
+ (VOID **)&SecPlatformInformation2\r
);\r
if (Status == EFI_SUCCESS) {\r
//\r
if (BistInformationSize != NULL) {\r
*BistInformationSize = InformationSize;\r
}\r
+\r
return EFI_SUCCESS;\r
}\r
}\r
VOID\r
)\r
{\r
- EFI_STATUS Status;\r
- CONST EFI_PEI_SERVICES **PeiServices;\r
- UINT64 BistInformationSize;\r
- VOID *BistInformationData;\r
- EFI_PEI_PPI_DESCRIPTOR *SecInformationDescriptor;\r
+ EFI_STATUS Status;\r
+ CONST EFI_PEI_SERVICES **PeiServices;\r
+ UINT64 BistInformationSize;\r
+ VOID *BistInformationData;\r
+ EFI_PEI_PPI_DESCRIPTOR *SecInformationDescriptor;\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
- Status = GetBistInfoFromPpi (\r
- PeiServices,\r
- &gEfiSecPlatformInformation2PpiGuid,\r
- &SecInformationDescriptor,\r
- &BistInformationData,\r
- &BistInformationSize\r
- );\r
+ Status = GetBistInfoFromPpi (\r
+ PeiServices,\r
+ &gEfiSecPlatformInformation2PpiGuid,\r
+ &SecInformationDescriptor,\r
+ &BistInformationData,\r
+ &BistInformationSize\r
+ );\r
if (Status == EFI_SUCCESS) {\r
BuildGuidDataHob (\r
&gEfiCallerIdGuid,\r
BistInformationData,\r
- (UINTN) BistInformationSize\r
+ (UINTN)BistInformationSize\r
);\r
//\r
// The old SecPlatformInformation2 data is on temporary memory.\r
SecInformationDescriptor,\r
&mPeiSecPlatformInformation2\r
);\r
- } if (Status == EFI_NOT_FOUND) {\r
+ }\r
+\r
+ if (Status == EFI_NOT_FOUND) {\r
Status = GetBistInfoFromPpi (\r
PeiServices,\r
&gEfiSecPlatformInformationPpiGuid,\r
BuildGuidDataHob (\r
&gEfiCallerIdGuid,\r
BistInformationData,\r
- (UINTN) BistInformationSize\r
+ (UINTN)BistInformationSize\r
);\r
//\r
// The old SecPlatformInformation data is on temporary memory.\r
}\r
}\r
\r
- ASSERT_EFI_ERROR(Status);\r
+ ASSERT_EFI_ERROR (Status);\r
}\r