summaryrefslogtreecommitdiff
path: root/ArmPkg/Library/ArmMmuLib/Arm
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-06-25 11:21:55 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-06-27 16:40:07 +0000
commit8a1f5405964fe6c09e768ae576a023be2e2e7b08 (patch)
treed139fd6c3bfca30450122861322fcc8b2e103e91 /ArmPkg/Library/ArmMmuLib/Arm
parent7054f1a54e94c79bea98636f027f929639d7cbbe (diff)
downloadedk2-8a1f5405964fe6c09e768ae576a023be2e2e7b08.zip
edk2-8a1f5405964fe6c09e768ae576a023be2e2e7b08.tar.gz
edk2-8a1f5405964fe6c09e768ae576a023be2e2e7b08.tar.bz2
ArmPkg: Drop individual memory permission helpers
Now that we have a sane API to set and clear memory permissions that works the same on ARM and AArch64, we no longer have a need for the individual set/clear no-access/read-only/no-exec helpers so let's drop them. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
Diffstat (limited to 'ArmPkg/Library/ArmMmuLib/Arm')
-rw-r--r--ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c104
1 files changed, 0 insertions, 104 deletions
diff --git a/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c b/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c
index 6140596..548ee13 100644
--- a/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c
+++ b/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c
@@ -544,107 +544,3 @@ ArmSetMemoryAttributes (
TtEntryMask
);
}
-
-EFI_STATUS
-ArmSetMemoryRegionNoExec (
- IN EFI_PHYSICAL_ADDRESS BaseAddress,
- IN UINT64 Length
- )
-{
- return SetMemoryAttributes (
- BaseAddress,
- Length,
- EFI_MEMORY_XP,
- TT_DESCRIPTOR_SECTION_XN_MASK
- );
-}
-
-EFI_STATUS
-ArmClearMemoryRegionNoExec (
- IN EFI_PHYSICAL_ADDRESS BaseAddress,
- IN UINT64 Length
- )
-{
- return SetMemoryAttributes (
- BaseAddress,
- Length,
- 0,
- TT_DESCRIPTOR_SECTION_XN_MASK
- );
-}
-
-EFI_STATUS
-ArmSetMemoryRegionReadOnly (
- IN EFI_PHYSICAL_ADDRESS BaseAddress,
- IN UINT64 Length
- )
-{
- return SetMemoryAttributes (
- BaseAddress,
- Length,
- EFI_MEMORY_RO,
- TT_DESCRIPTOR_SECTION_AP_MASK
- );
-}
-
-EFI_STATUS
-ArmClearMemoryRegionReadOnly (
- IN EFI_PHYSICAL_ADDRESS BaseAddress,
- IN UINT64 Length
- )
-{
- return SetMemoryAttributes (
- BaseAddress,
- Length,
- 0,
- TT_DESCRIPTOR_SECTION_AP_MASK
- );
-}
-
-/**
- Convert a region of memory to read-protected, by clearing the access flag.
-
- @param BaseAddress The start of the region.
- @param Length The size of the region.
-
- @retval EFI_SUCCESS The attributes were set successfully.
- @retval EFI_OUT_OF_RESOURCES The operation failed due to insufficient memory.
-
-**/
-EFI_STATUS
-ArmSetMemoryRegionNoAccess (
- IN EFI_PHYSICAL_ADDRESS BaseAddress,
- IN UINT64 Length
- )
-{
- return SetMemoryAttributes (
- BaseAddress,
- Length,
- EFI_MEMORY_RP,
- TT_DESCRIPTOR_SECTION_AF
- );
-}
-
-/**
- Convert a region of memory to read-enabled, by setting the access flag.
-
- @param BaseAddress The start of the region.
- @param Length The size of the region.
-
- @retval EFI_SUCCESS The attributes were set successfully.
- @retval EFI_OUT_OF_RESOURCES The operation failed due to insufficient memory.
-
-**/
-EFI_STATUS
-ArmClearMemoryRegionNoAccess (
- IN EFI_PHYSICAL_ADDRESS BaseAddress,
- IN UINT64 Length
- )
-{
- return SetMemoryAttributes (
- BaseAddress,
- Length,
- 0,
- TT_DESCRIPTOR_SECTION_AF
- );
-}