summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2024-05-13 18:26:51 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-05-24 15:48:52 +0000
commit4ddf2448ed3ae87d274c593fa5a9ca91e1f3644b (patch)
tree21222b13680369cb5698e3f0727baeb964a12bc9
parent9440986d4e5a7096a1d8f162cd8ae88932c3068d (diff)
downloadedk2-4ddf2448ed3ae87d274c593fa5a9ca91e1f3644b.zip
edk2-4ddf2448ed3ae87d274c593fa5a9ca91e1f3644b.tar.gz
edk2-4ddf2448ed3ae87d274c593fa5a9ca91e1f3644b.tar.bz2
MdePkg/BaseRngLib AARCH64: Remove overzealous ASSERT()
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 <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Committed-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Doug Flick [MSFT] <doug.edk2@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
-rw-r--r--MdePkg/Library/BaseRngLib/AArch64/Rndr.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/MdePkg/Library/BaseRngLib/AArch64/Rndr.c b/MdePkg/Library/BaseRngLib/AArch64/Rndr.c
index d39db62..3a556a2 100644
--- a/MdePkg/Library/BaseRngLib/AArch64/Rndr.c
+++ b/MdePkg/Library/BaseRngLib/AArch64/Rndr.c
@@ -50,7 +50,6 @@ BaseRngLibConstructor (
// MSR. A non-zero value indicates that the processor supports the RNDR instruction.
//
Isar0 = ArmReadIdIsar0 ();
- ASSERT ((Isar0 & RNDR_MASK) != 0);
mRndrSupported = ((Isar0 & RNDR_MASK) != 0);