audk/SecurityPkg
Pierre Gondois 4b3e9d80be SecurityPkg/RngDxe: Check before advertising Cpu Rng algo
RngGetBytes() relies on the RngLib. The RngLib might use the RNDR
instruction if the FEAT_RNG feature is present. RngGetInfo and
RngGetRNG both must check that RngGetBytes() is working before
advertising/using it.

To do so, allocate an array storing the available algorithms.
The Rng algorithm at the lowest index will be the default Rng
algorithm. The array is shared between RngGetInfo and RngGetRNG.

This array is allocated when the driver is loaded, and freed
when unloaded.

This patch also prevents from having PcdCpuRngSupportedAlgorithm
let to a zero GUID, but let the possibility to have no valid Rng
algorithm in such case.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Acked-by: Jiewen Yao <jiewen.yao@intel.com>
2022-11-06 16:32:28 +00:00
..
EnrollFromDefaultKeysApp SecurityPkg: Secure Boot Drivers: Added common header files 2022-07-07 01:07:00 +00:00
FvReportPei SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Hash2DxeCrypto SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HddPassword SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Include SecurityPkg: SecureBootVariableLib: Added newly supported interfaces 2022-07-07 01:07:00 +00:00
Library SecurityPkg: Remove enforcement of final GoIdle transition for CRB commands 2022-09-30 12:00:24 +00:00
Pkcs7Verify/Pkcs7VerifyDxe SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
RandomNumberGenerator/RngDxe SecurityPkg/RngDxe: Check before advertising Cpu Rng algo 2022-11-06 16:32:28 +00:00
Tcg SecurityPkg: Reallocate TPM Active PCRs based on platform support 2021-12-17 15:03:43 +00:00
Test SecurityPkg: SecureBootVariableLib: Added unit tests 2022-07-07 01:07:00 +00:00
VariableAuthenticated SecurityPkg: SecureBootConfigDxe: Updated invocation pattern 2022-07-07 01:07:00 +00:00
SecurityPkg.ci.yaml SecurityPkg: SecureBootVariableLib: Added unit tests 2022-07-07 01:07:00 +00:00
SecurityPkg.dec SecurityPkg: PlatformPKProtectionLib: Added PK protection interface 2022-07-07 01:07:00 +00:00
SecurityPkg.dsc SecurityPkg: Add LOONGARCH64 architecture for EDK2 CI. 2022-10-14 02:16:33 +00:00
SecurityPkg.uni SecurityPkg: Fix spelling errors 2019-10-23 10:23:23 -07:00
SecurityPkgExtra.uni SecurityPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:23 -07:00