/* The user Entry Point for the Random Number Generator (RNG) driver. */
EFI_STATUS EFIAPI RngDriverEntry(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
/* The user Entry Point for the Random Number Generator (RNG) driver. */
EFI_STATUS EFIAPI RngDriverEntry(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
{
  EFI_STATUS  Status;
  EFI_HANDLE  Handle;
  Status = GetAvailableAlgorithms ();
  if (EFI_ERROR (Status)) {
    return Status;
  }
  if (mAvailableAlgoArrayCount == 0) {
    return EFI_REQUEST_UNLOAD_IMAGE;
  }
  Handle = NULL;
  Status = gBS->InstallMultipleProtocolInterfaces (
                  &Handle,
                  &gEfiRngProtocolGuid,
                  &mRngRdRand,
                  NULL
                  );
  if (EFI_ERROR (Status)) {
    FreeAvailableAlgorithms ();
  }
  return Status;
}