audk/MdePkg
Pedro Falcato 6ca9334dc8 MdePkg/BaseRngLib: Add a smoketest for RDRAND and check CPUID
RDRAND has notoriously been broken many times over its lifespan.
Add a smoketest to RDRAND, in order to better sniff out potential
security concerns.

Also add a proper CPUID test in order to support older CPUs which may
not have it; it was previously being tested but then promptly ignored.

Testing algorithm inspired by linux's arch/x86/kernel/cpu/rdrand.c
:x86_init_rdrand() per commit 049f9ae9..

Many thanks to Jason Donenfeld for relicensing his linux RDRAND detection
code to MIT and the public domain.

>On Tue, Nov 22, 2022 at 2:21 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
  <..>
>    I (re)wrote that function in Linux. I hereby relicense it as MIT, and
>    also place it into public domain. Do with it what you will now.
>
>    Jason

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4163

Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Jason A. Donenfeld <Jason@zx2c4.com>
2024-09-09 11:45:06 +01:00
..
Include Fixed compilation of all packages tracked by CI after rebasing upon edk2-stable202405 tag. 2024-07-22 13:52:40 +03:00
Library MdePkg/BaseRngLib: Add a smoketest for RDRAND and check CPUID 2024-09-09 11:45:06 +01:00
Test MdePkg/UnitTest: Fixes CLANGPDB build 2024-07-22 13:47:17 +03:00
MdeLibs.dsc.inc UE: Support UE generation and consumption. 2024-07-22 13:49:00 +03:00
MdePkg.ci.yaml MdePkg: Add LoongArch Cpucfg function 2024-02-06 23:51:47 +08:00
MdePkg.dec SecurePE: Defined new PcdImageProtectionPolicy. 2024-07-22 13:49:00 +03:00
MdePkg.dsc UE: Support UE generation and consumption. 2024-07-22 13:49:00 +03:00
MdePkg.uni MdePkg: Utilize Cache Management Operations Implementation For RISC-V 2023-12-19 12:48:14 +00:00
MdePkgExtra.uni MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00