/* Create the first memory status code GUID'ed HOB as initialization for memory status code worker. */
EFI_STATUS MemoryStatusCodeInitializeWorker(VOID)
/* Create the first memory status code GUID'ed HOB as initialization for memory status code worker. */
EFI_STATUS MemoryStatusCodeInitializeWorker(VOID)
{
  MEMORY_STATUSCODE_PACKET_HEADER  *PacketHeader;
  PacketHeader = BuildGuidHob (
                   &gMemoryStatusCodeRecordGuid,
                   PcdGet16 (PcdStatusCodeMemorySize) * 1024 + sizeof (MEMORY_STATUSCODE_PACKET_HEADER)
                   );
  ASSERT (PacketHeader != NULL);
  PacketHeader->MaxRecordsNumber = (PcdGet16 (PcdStatusCodeMemorySize) * 1024) / sizeof (MEMORY_STATUSCODE_RECORD);
  PacketHeader->PacketIndex      = 0;
  PacketHeader->RecordIndex      = 0;
  return EFI_SUCCESS;
}