diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2023-03-25 17:36:28 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-03-30 11:05:22 +0000 |
commit | ea1312a5b443b0d3691d825c2dc8cf2227120ba3 (patch) | |
tree | c0e46415a4d7471b17ad4a901a371d3cb8351c89 /MdePkg/Library | |
parent | c5cd360277bcf8b11ff88f95c4ae92cda29eba64 (diff) | |
download | edk2-ea1312a5b443b0d3691d825c2dc8cf2227120ba3.zip edk2-ea1312a5b443b0d3691d825c2dc8cf2227120ba3.tar.gz edk2-ea1312a5b443b0d3691d825c2dc8cf2227120ba3.tar.bz2 |
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/Library')
-rw-r--r-- | MdePkg/Library/BaseIoLibIntrinsic/AArch64/ArmVirtMmio.S | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseIoLibIntrinsic/AArch64/ArmVirtMmio.S b/MdePkg/Library/BaseIoLibIntrinsic/AArch64/ArmVirtMmio.S index 00f1abe..77f5626 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
|