MdePkg: Centralize RNDR Register Definition

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 <osde@microsoft.com>
This commit is contained in:
Oliver Smith-Denny 2025-01-14 15:55:12 -08:00 committed by mergify[bot]
parent 5c02a64823
commit d9715c133f
5 changed files with 8 additions and 9 deletions

View File

@ -130,6 +130,10 @@
// build for ARMv8.0, we need to define the register here.
#define ID_AA64MMFR2_EL1 S3_0_C0_C7_2
// The RNDR register is not recognized by older assemblers,
// so we need to define it here
#define RNDR S3_3_C2_C4_0
#define VECTOR_BASE(tbl) \
.section .text.##tbl##,"ax"; \
.align 11; \

View File

@ -8,7 +8,7 @@
#
#------------------------------------------------------------------------------
#include "BaseRngLibInternals.h"
#include "ArmRng.h"
.text
.p2align 2

View File

@ -8,7 +8,7 @@
;
;------------------------------------------------------------------------------
#include "BaseRngLibInternals.h"
#include "ArmRng.h"
EXPORT ArmRndr
AREA BaseLib_LowLevel, CODE, READONLY

View File

@ -11,6 +11,8 @@
#ifndef ARM_RNG_H_
#define ARM_RNG_H_
#include <AArch64/AArch64.h>
/**
Generates a random number using RNDR.
Returns TRUE on success; FALSE on failure.

View File

@ -69,11 +69,4 @@ ArchIsRngSupported (
VOID
);
#if defined (MDE_CPU_AARCH64)
// RNDR, Random Number
#define RNDR S3_3_C2_C4_0
#endif
#endif // BASE_RNGLIB_INTERNALS_H_