<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdePkg/Library/BaseRngLib, branch dependabot/github_actions/actions/github-script-8</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fgithub-script-8</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fgithub-script-8'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2025-09-02T08:28:30+00:00</updated>
<entry>
<title>MdePkg/Library/BaseRngLib/Riscv: use CPU RNG instructions only</title>
<updated>2025-09-02T08:28:30+00:00</updated>
<author>
<name>Adriano Cordova</name>
<email>adriano.cordova@canonical.com</email>
</author>
<published>2025-04-22T19:09:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2efffed93811a7c5d0e6d7d19f8ff112128ffd6a'/>
<id>urn:sha1:2efffed93811a7c5d0e6d7d19f8ff112128ffd6a</id>
<content type='text'>
Generate random number using risc-v CPU RNG instructions only,
as for the other architectures. This is safer than using Mersenne
Twister from a seed, which is the current implementation, as the
latter is known to be cryptographically unsafe (e.g. see
https://www.schutzwerk.com/en/blog/attacking-a-rng/)

Signed-off-by: Adriano Cordova &lt;adriano.cordova@canonical.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Correct spelling errors and typos</title>
<updated>2025-07-04T01:41:47+00:00</updated>
<author>
<name>Abdul Lateef Attar</name>
<email>AbdulLateef.Attar@amd.com</email>
</author>
<published>2025-07-01T09:10:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0eae93e07c725e2970ed9589af4df94ed6bfe467'/>
<id>urn:sha1:0eae93e07c725e2970ed9589af4df94ed6bfe467</id>
<content type='text'>
Signed-off-by: Abdul Lateef Attar &lt;AbdulLateef.Attar@amd.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Centralize RNDR Register Definition</title>
<updated>2025-02-07T02:23:11+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2025-01-14T23:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=d9715c133f45b6eee239f4aa58e9112b7497de4b'/>
<id>urn:sha1:d9715c133f45b6eee239f4aa58e9112b7497de4b</id>
<content type='text'>
RNDR is a standard register defined in the ARM ARM for
AARCH64. Move the definition from BaseRngLib to AArch64.h.

Furthermore, move the inclusion of this register definition
to the ARM specific header file.

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseRngLib: Remove global variable for RDRAND state update</title>
<updated>2024-11-22T17:11:25+00:00</updated>
<author>
<name>Phil Noh</name>
<email>Phil.Noh@amd.com</email>
</author>
<published>2024-11-21T16:05:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=edb312d5d0f00685e75639b8607d54c93d47aca8'/>
<id>urn:sha1:edb312d5d0f00685e75639b8607d54c93d47aca8</id>
<content type='text'>
As a BASE type library, some PEI drivers could link and use it.
Tcg2Pei.inf is an example. On edk2-stable202408 version, PEI drivers
that link the library include the global variable of mRdRandSupported.
The previous commit (c3a8ca7) that refers to the global variable actually
is found to influence the link status. Updating the global variable
in PEI drivers could affect the following issues.

PEI ROM Boot : Global variable is not updated
PEI RAM Boot : PEI FV integration/security check is failed

To address these issues, remove the global variable usage.

Signed-off-by: Phil Noh &lt;Phil.Noh@amd.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseRngLib: Prefer ArmReadIdAA64Isar0Reg() over ArmReadIdIsar0()</title>
<updated>2024-08-01T13:41:01+00:00</updated>
<author>
<name>Pierre Gondois</name>
<email>pierre.gondois@arm.com</email>
</author>
<published>2023-10-04T12:27:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1715d672310a318ce441d27a3515d371329f8b5b'/>
<id>urn:sha1:1715d672310a318ce441d27a3515d371329f8b5b</id>
<content type='text'>
A ArmReadIdAA64Isar0Reg() function was recently added
to BaseLib. Use it instead of its ArmReadIdIsar0() equivalent,
which was private to the BaseRngLib library.

This also allows to avoid the confusion between the following
registers:
- ID_ISAR0_EL1: allows to probe for Divide instructions, Debug
  instructions, ...
- ID_AA64ISAR0_EL1: AARCH64 specific register allowing to probe
  for AESE, RNDR, ... instructions

Signed-off-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/Library: Add RISCV64 support to BaseRngLib</title>
<updated>2024-07-15T04:05:56+00:00</updated>
<author>
<name>Dhaval</name>
<email>dhaval@rivosinc.com</email>
</author>
<published>2024-06-20T12:12:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=b54bc983c6102a59c9e0472dd0406ac9ccbaa0bf'/>
<id>urn:sha1:b54bc983c6102a59c9e0472dd0406ac9ccbaa0bf</id>
<content type='text'>
The ratified RISC-V crypto scalar extensions provide entropy bits via the
seed CSR, as exposed by the Zkr extension. The Zkr extension is ratified
and provides 16 bits of entropy seed when reading the SEED CSR.
Guarded by a RISCV64 Feature PCD, 64-bit random numbers can be
accumulated from the `seed` CSR. This driver is based on the driver in
the Linux kernel.

Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Zhiguang Liu &lt;zhiguang.liu@intel.com&gt;
Signed-off-by: Dhaval Sharma &lt;dhaval@rivosinc.com&gt;
Co-authored-by: Tim Wawrzynczak &lt;tim@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseRngLib: Add a smoketest for RDRAND and check CPUID</title>
<updated>2024-06-13T15:52:48+00:00</updated>
<author>
<name>Pedro Falcato</name>
<email>pedro.falcato@gmail.com</email>
</author>
<published>2022-11-22T22:31:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c3a8ca7b54a9fd17acdf16c6282a92cc989fa92a'/>
<id>urn:sha1:c3a8ca7b54a9fd17acdf16c6282a92cc989fa92a</id>
<content type='text'>
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.

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

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

Signed-off-by: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Zhiguang Liu &lt;zhiguang.liu@intel.com&gt;
Cc: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseRngLib AARCH64: Remove overzealous ASSERT()</title>
<updated>2024-05-24T15:48:52+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2024-05-13T16:26:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=4ddf2448ed3ae87d274c593fa5a9ca91e1f3644b'/>
<id>urn:sha1:4ddf2448ed3ae87d274c593fa5a9ca91e1f3644b</id>
<content type='text'>
BaseRngLib on AARCH64 will discover whether or not RNDR instructions are
supported, by inspecting the ISAR0 identification register, and setting
a global boolean accordingly. This boolean is used in subsequent
execution to decide whether or not to issue the instruction.

The same discovery code also ASSERT()s that RNDR instructions are
implemented, which is unnecessary, and breaks execution on systems that
incorporate the library but don't implement the instruction (or fail to
expose it to the exception level that the firmware executes at).

So drop the ASSERT().

Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Zhiguang Liu &lt;zhiguang.liu@intel.com&gt;

Committed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Doug Flick [MSFT] &lt;doug.edk2@gmail.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdePkg/Rng: Add GetRngGuid() to RngLib</title>
<updated>2023-09-08T09:48:55+00:00</updated>
<author>
<name>Pierre Gondois</name>
<email>pierre.gondois@arm.com</email>
</author>
<published>2023-08-11T14:33:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=5443c2dc310d2c8eb15fb8eefd5057342e78cd0d'/>
<id>urn:sha1:5443c2dc310d2c8eb15fb8eefd5057342e78cd0d</id>
<content type='text'>
The EFI_RNG_PROTOCOL can use the RngLib. The RngLib has multiple
implementations, some of them are unsafe (e.g. BaseRngLibTimerLib).
To allow the RngDxe to detect when such implementation is used,
add a GetRngGuid() function to the RngLib.

Signed-off-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Reviewed-by: Sami Mujawar &lt;sami.mujawar@arm.com&gt;
Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Tested-by: Kun Qin &lt;kun.qin@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/Library/BaseRngLib: Fix include guard</title>
<updated>2023-09-08T03:29:19+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2023-09-05T12:13:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=634192665ea22eb610ad54f10bad8143ef77076d'/>
<id>urn:sha1:634192665ea22eb610ad54f10bad8143ef77076d</id>
<content type='text'>
The include guard is incomplete and does not define the macro.

Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Zhiguang Liu &lt;zhiguang.liu@intel.com&gt;
Cc: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Rebecca Cran &lt;rebecca@os.amperecomputing.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
</feed>
