/* This service enables PEIMs to ascertain the present value of the boot mode. */
EFI_STATUS EFIAPI PeiGetBootMode(IN CONST EFI_PEI_SERVICES **PeiServices, IN OUT EFI_BOOT_MODE *BootMode)
/* This service enables PEIMs to ascertain the present value of the boot mode. */
EFI_STATUS EFIAPI PeiGetBootMode(IN CONST EFI_PEI_SERVICES **PeiServices, IN OUT EFI_BOOT_MODE *BootMode)
{
  PEI_CORE_INSTANCE           *PrivateData;
  EFI_HOB_HANDOFF_INFO_TABLE  *HandOffHob;
  if (BootMode == NULL) {
    return EFI_INVALID_PARAMETER;
  }
  PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);
  HandOffHob = (PrivateData->HobList.HandoffInformationTable);
  *BootMode = HandOffHob->BootMode;
  return EFI_SUCCESS;
}