Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>\r
Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
+ Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.<BR>\r
\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
/**\r
Returns information about the random number generation implementation.\r
\r
+ @param[in] This A pointer to the EFI_RNG_PROTOCOL instance.\r
@param[in,out] RNGAlgorithmListSize On input, the size in bytes of RNGAlgorithmList.\r
On output with a return code of EFI_SUCCESS, the size\r
in bytes of the data returned in RNGAlgorithmList. On output\r
is the default algorithm for the driver.\r
\r
@retval EFI_SUCCESS The RNG algorithm list was returned successfully.\r
+ @retval EFI_UNSUPPORTED The services is not supported by this driver.\r
+ @retval EFI_DEVICE_ERROR The list of algorithms could not be retrieved due to a\r
+ hardware or firmware error.\r
+ @retval EFI_INVALID_PARAMETER One or more of the parameters are incorrect.\r
@retval EFI_BUFFER_TOO_SMALL The buffer RNGAlgorithmList is too small to hold the result.\r
\r
**/\r
-UINTN\r
+EFI_STATUS\r
EFIAPI\r
-ArchGetSupportedRngAlgorithms (\r
- IN OUT UINTN *RNGAlgorithmListSize,\r
- OUT EFI_RNG_ALGORITHM *RNGAlgorithmList\r
+RngGetInfo (\r
+ IN EFI_RNG_PROTOCOL *This,\r
+ IN OUT UINTN *RNGAlgorithmListSize,\r
+ OUT EFI_RNG_ALGORITHM *RNGAlgorithmList\r
)\r
{\r
UINTN RequiredSize;\r
\r
RequiredSize = sizeof (EFI_RNG_ALGORITHM);\r
\r
+ if ((This == NULL) || (RNGAlgorithmListSize == NULL)) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+\r
if (*RNGAlgorithmListSize < RequiredSize) {\r
*RNGAlgorithmListSize = RequiredSize;\r
return EFI_BUFFER_TOO_SMALL;\r