gEfiRngAlgorithmSp80090Ctr256Guid was used as the default algorithm
in RngGetRNG(). The commit below set the default algorithm to
PcdCpuRngSupportedAlgorithm, which is a zero GUID by default.
As the Pcd value is not defined for any platform in the edk2-platfoms
repository, assume it was an error and go back to the first version,
using gEfiRngAlgorithmSp80090Ctr256Guid.
Fixes: 4e5ecdbac8bd ("SecurityPkg: Add support for RngDxe on AARCH64")
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Acked-by: Jiewen Yao <jiewen.yao@intel.com>
OUT EFI_RNG_ALGORITHM *RNGAlgorithmList\r
)\r
{\r
- UINTN RequiredSize;\r
- EFI_RNG_ALGORITHM *CpuRngSupportedAlgorithm;\r
+ UINTN RequiredSize;\r
\r
RequiredSize = 2 * sizeof (EFI_RNG_ALGORITHM);\r
\r
return EFI_BUFFER_TOO_SMALL;\r
}\r
\r
- CpuRngSupportedAlgorithm = PcdGetPtr (PcdCpuRngSupportedAlgorithm);\r
-\r
- CopyMem (&RNGAlgorithmList[0], CpuRngSupportedAlgorithm, sizeof (EFI_RNG_ALGORITHM));\r
+ CopyMem (&RNGAlgorithmList[0], &gEfiRngAlgorithmSp80090Ctr256Guid, sizeof (EFI_RNG_ALGORITHM));\r
\r
// x86 platforms also support EFI_RNG_ALGORITHM_RAW via RDSEED\r
CopyMem (&RNGAlgorithmList[1], &gEfiRngAlgorithmRaw, sizeof (EFI_RNG_ALGORITHM));\r