41 UINTN CollectedEntropyBits;
42 UINTN RequiredEntropyBits;
49 RequiredEntropyBits = (Length << 3);
51 CollectedEntropyBits = 0;
53 while (CollectedEntropyBits < RequiredEntropyBits) {
54 EntropyBits =
MIN ((RequiredEntropyBits - CollectedEntropyBits), MaxBits);
60 if (EFI_ERROR (Status)) {
66 CollectedEntropyBits += EntropyBits;
67 Index += (EntropyBits >> 3);
EFI_STATUS EFIAPI GenerateEntropy(IN UINTN Length, OUT UINT8 *Entropy)
RETURN_STATUS EFIAPI GetArmTrngEntropy(IN UINTN EntropyBits, IN UINTN BufferSize, OUT UINT8 *Buffer)
UINTN EFIAPI GetArmTrngMaxSupportedEntropyBits(VOID)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)