/* Convert a driver from the Untrused back to the Scheduled state. */
EFI_STATUS EFIAPI CoreTrust(IN EFI_HANDLE FirmwareVolumeHandle, IN EFI_GUID *DriverName)
/* Convert a driver from the Untrused back to the Scheduled state. */
EFI_STATUS EFIAPI CoreTrust(IN EFI_HANDLE FirmwareVolumeHandle, IN EFI_GUID *DriverName)
{
  LIST_ENTRY             *Link;
  EFI_CORE_DRIVER_ENTRY  *DriverEntry;
  for (Link = mDiscoveredList.ForwardLink; Link != &mDiscoveredList; Link = Link->ForwardLink) {
    DriverEntry = CR (Link, EFI_CORE_DRIVER_ENTRY, Link, EFI_CORE_DRIVER_ENTRY_SIGNATURE);
    if ((DriverEntry->FvHandle == FirmwareVolumeHandle) &&
        DriverEntry->Untrusted &&
        CompareGuid (DriverName, &DriverEntry->FileName))
    {
      CoreAcquireDispatcherLock ();
      DriverEntry->Untrusted = FALSE;
      DriverEntry->Scheduled = TRUE;
      InsertTailList (&mScheduledQueue, &DriverEntry->ScheduledLink);
      CoreReleaseDispatcherLock ();
      return EFI_SUCCESS;
    }
  }
  return EFI_NOT_FOUND;
}