/* This interface conveys state information out of the Security (SEC) phase into PEI. */
EFI_STATUS EFIAPI SecPlatformInformationPostMemory(IN CONST EFI_PEI_SERVICES **PeiServices, IN OUT UINT64 *StructureSize, OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord)
/* This interface conveys state information out of the Security (SEC) phase into PEI. */
EFI_STATUS EFIAPI SecPlatformInformationPostMemory(IN CONST EFI_PEI_SERVICES **PeiServices, IN OUT UINT64 *StructureSize, OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord)
{
  SEC_PLATFORM_INFORMATION_CONTEXT_HOB  *SecPlatformInformationContexHob;
  if (StructureSize == NULL) {
    return EFI_INVALID_PARAMETER;
  }
  SecPlatformInformationContexHob = GetFirstGuidHob (&gEfiCallerIdGuid);
  if (SecPlatformInformationContexHob == NULL) {
    return EFI_NOT_FOUND;
  }
  if (*StructureSize < SecPlatformInformationContexHob->Context.StructureSize) {
    *StructureSize = SecPlatformInformationContexHob->Context.StructureSize;
    return EFI_BUFFER_TOO_SMALL;
  }
  if (PlatformInformationRecord == NULL) {
    return EFI_INVALID_PARAMETER;
  }
  *StructureSize = SecPlatformInformationContexHob->Context.StructureSize;
  CopyMem (
    (VOID *)PlatformInformationRecord,
    (VOID *)SecPlatformInformationContexHob->Context.PlatformInformationRecord,
    (UINTN)SecPlatformInformationContexHob->Context.StructureSize
    );
  return EFI_SUCCESS;
}