/* The constructor function checks whether or not RDRAND instruction is supported. It will ASSERT() if RDRAND instruction is not supported. It will always return EFI_SUCCESS. */
EFI_STATUS EFIAPI BaseRngLibConstructor(VOID)
/* The constructor function checks whether or not RDRAND instruction is supported. It will ASSERT() if RDRAND instruction is not supported. It will always return EFI_SUCCESS. */
EFI_STATUS EFIAPI BaseRngLibConstructor(VOID)
{
  UINT32  RegEcx;
  AsmCpuid (1, 0, 0, &RegEcx, 0);
  ASSERT ((RegEcx & RDRAND_MASK) == RDRAND_MASK);
  mRdRandSupported = ((RegEcx & RDRAND_MASK) == RDRAND_MASK);
  return EFI_SUCCESS;
}