summaryrefslogtreecommitdiffstats
path: root/MdePkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-03-25 17:36:28 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-03-30 11:05:22 +0000
commitea1312a5b443b0d3691d825c2dc8cf2227120ba3 (patch)
treec0e46415a4d7471b17ad4a901a371d3cb8351c89 /MdePkg
parentc5cd360277bcf8b11ff88f95c4ae92cda29eba64 (diff)
downloadedk2-ea1312a5b443b0d3691d825c2dc8cf2227120ba3.tar.gz
edk2-ea1312a5b443b0d3691d825c2dc8cf2227120ba3.tar.bz2
edk2-ea1312a5b443b0d3691d825c2dc8cf2227120ba3.zip
MdePkg/BaseIoLibIntrinsic 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')
-rw-r--r--MdePkg/Library/BaseIoLibIntrinsic/AArch64/ArmVirtMmio.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseIoLibIntrinsic/AArch64/ArmVirtMmio.S b/MdePkg/Library/BaseIoLibIntrinsic/AArch64/ArmVirtMmio.S
index 00f1abec15..77f562697e 100644
--- a/MdePkg/Library/BaseIoLibIntrinsic/AArch64/ArmVirtMmio.S
+++ b/MdePkg/Library/BaseIoLibIntrinsic/AArch64/ArmVirtMmio.S
@@ -29,6 +29,7 @@ GCC_ASM_EXPORT(MmioWrite64Internal)
// @return The value read.
//
ASM_PFX(MmioRead8Internal):
+ AARCH64_BTI(c)
ldrb w0, [x0]
dmb ld
ret
@@ -44,6 +45,7 @@ ASM_PFX(MmioRead8Internal):
// @param Value The value to write to the MMIO register.
//
ASM_PFX(MmioWrite8Internal):
+ AARCH64_BTI(c)
dmb st
strb w1, [x0]
ret
@@ -60,6 +62,7 @@ ASM_PFX(MmioWrite8Internal):
// @return The value read.
//
ASM_PFX(MmioRead16Internal):
+ AARCH64_BTI(c)
ldrh w0, [x0]
dmb ld
ret
@@ -75,6 +78,7 @@ ASM_PFX(MmioRead16Internal):
// @param Value The value to write to the MMIO register.
//
ASM_PFX(MmioWrite16Internal):
+ AARCH64_BTI(c)
dmb st
strh w1, [x0]
ret
@@ -91,6 +95,7 @@ ASM_PFX(MmioWrite16Internal):
// @return The value read.
//
ASM_PFX(MmioRead32Internal):
+ AARCH64_BTI(c)
ldr w0, [x0]
dmb ld
ret
@@ -106,6 +111,7 @@ ASM_PFX(MmioRead32Internal):
// @param Value The value to write to the MMIO register.
//
ASM_PFX(MmioWrite32Internal):
+ AARCH64_BTI(c)
dmb st
str w1, [x0]
ret
@@ -122,6 +128,7 @@ ASM_PFX(MmioWrite32Internal):
// @return The value read.
//
ASM_PFX(MmioRead64Internal):
+ AARCH64_BTI(c)
ldr x0, [x0]
dmb ld
ret
@@ -137,6 +144,7 @@ ASM_PFX(MmioRead64Internal):
// @param Value The value to write to the MMIO register.
//
ASM_PFX(MmioWrite64Internal):
+ AARCH64_BTI(c)
dmb st
str x1, [x0]
ret