summaryrefslogtreecommitdiffstats
path: root/ArmPkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2017-02-15 17:11:55 +0000
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2017-02-21 17:23:03 +0000
commit0a9d732c91d99dcd06432722f76b170592b71abc (patch)
tree33b2e4210acde4c4c83922f882d2918ad4f8bb35 /ArmPkg
parentce82984fe77cd6583f5e8bf2f6fd98262834f834 (diff)
downloadedk2-0a9d732c91d99dcd06432722f76b170592b71abc.tar.gz
edk2-0a9d732c91d99dcd06432722f76b170592b71abc.tar.bz2
edk2-0a9d732c91d99dcd06432722f76b170592b71abc.zip
ArmPkg/CpuDxe: ARM: ignore page table updates that only change permissions
Currently, we have not implemented support on 32-bit ARM for managing permission bits in the page tables. Since the new DXE page protection for PE/COFF images may invoke EFI_CPU_ARCH_PROTOCOL.SetMemoryAttributes() with only permission attributes set, let's simply ignore those for now. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Drivers/CpuDxe/Arm/Mmu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
index b6ba975b35..89e429925b 100644
--- a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
+++ b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
@@ -680,6 +680,13 @@ SetMemoryAttributes (
{
EFI_STATUS Status;
+ //
+ // Ignore invocations that only modify permission bits
+ //
+ if ((Attributes & EFI_MEMORY_CACHETYPE_MASK) == 0) {
+ return EFI_SUCCESS;
+ }
+
if(((BaseAddress & 0xFFFFF) == 0) && ((Length & 0xFFFFF) == 0)) {
// Is the base and length a multiple of 1 MB?
DEBUG ((EFI_D_PAGE, "SetMemoryAttributes(): MMU section 0x%x length 0x%x to %lx\n", (UINTN)BaseAddress, (UINTN)Length, Attributes));