summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-03-25 18:12:55 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-03-30 11:05:22 +0000
commitf8b1854b92559ad28dc6df6bb886652b87e2a422 (patch)
treebd23618458069eb519bce3d3f375b7c81ae33d3b /MdePkg/Library
parent35318c2eb9ad3747f70cdee0714893e282ca51b0 (diff)
downloadedk2-f8b1854b92559ad28dc6df6bb886652b87e2a422.tar.gz
edk2-f8b1854b92559ad28dc6df6bb886652b87e2a422.tar.bz2
edk2-f8b1854b92559ad28dc6df6bb886652b87e2a422.zip
MdePkg/BaseRngLib AARCH64: Make asm files BTI compatible
Add the BTI instructions and the associated note to make the AArch64 asm objects compatible with BTI enforcement. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com>
Diffstat (limited to 'MdePkg/Library')
-rw-r--r--MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.S3
-rw-r--r--MdePkg/Library/BaseRngLib/AArch64/ArmRng.S1
2 files changed, 2 insertions, 2 deletions
diff --git a/MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.S b/MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.S
index 82a00d3622..d30b63fe5c 100644
--- a/MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.S
+++ b/MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.S
@@ -25,7 +25,6 @@ GCC_ASM_EXPORT(ArmReadIdIsar0)
# );
#
ASM_PFX(ArmReadIdIsar0):
+ AARCH64_BTI(c)
mrs x0, id_aa64isar0_el1 // Read ID_AA64ISAR0 Register
ret
-
-
diff --git a/MdePkg/Library/BaseRngLib/AArch64/ArmRng.S b/MdePkg/Library/BaseRngLib/AArch64/ArmRng.S
index 5159f467e3..27a847b996 100644
--- a/MdePkg/Library/BaseRngLib/AArch64/ArmRng.S
+++ b/MdePkg/Library/BaseRngLib/AArch64/ArmRng.S
@@ -31,6 +31,7 @@ GCC_ASM_EXPORT(ArmRndr)
# );
#
ASM_PFX(ArmRndr):
+ AARCH64_BTI(c)
mrs x1, RNDR
str x1, [x0]
cset x0, ne // RNDR sets NZCV to 0b0100 on failure