]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c
ArmPkg/ArmMmuLib: remove VirtualMask arg from ArmSetMemoryAttributes
[mirror_edk2.git] / ArmPkg / Library / ArmMmuLib / Arm / ArmMmuLibCore.c
index 8a472a1eb64b6597fd31441f65f071b6ef1a9f33..351b6c03a42c7593017a81727c38a304f0cb80a7 100644 (file)
@@ -471,7 +471,6 @@ UpdatePageEntries (
   IN  EFI_PHYSICAL_ADDRESS      BaseAddress,\r
   IN  UINT64                    Length,\r
   IN  UINT64                    Attributes,\r
-  IN  EFI_PHYSICAL_ADDRESS      VirtualMask,\r
   OUT BOOLEAN                   *FlushTlbs OPTIONAL\r
   )\r
 {\r
@@ -587,11 +586,6 @@ UpdatePageEntries (
     // Mask in new attributes and/or permissions\r
     PageTableEntry |= EntryValue;\r
 \r
-    if (VirtualMask != 0) {\r
-      // Make this virtual address point at a physical page\r
-      PageTableEntry &= ~VirtualMask;\r
-    }\r
-\r
     if (CurrentPageTableEntry  != PageTableEntry) {\r
       Mva = (VOID *)(UINTN)((((UINTN)FirstLevelIdx) << TT_DESCRIPTOR_SECTION_BASE_SHIFT) + (PageTableIndex << TT_DESCRIPTOR_PAGE_BASE_SHIFT));\r
 \r
@@ -619,8 +613,7 @@ EFI_STATUS
 UpdateSectionEntries (\r
   IN EFI_PHYSICAL_ADDRESS      BaseAddress,\r
   IN UINT64                    Length,\r
-  IN UINT64                    Attributes,\r
-  IN EFI_PHYSICAL_ADDRESS      VirtualMask\r
+  IN UINT64                    Attributes\r
   )\r
 {\r
   EFI_STATUS    Status = EFI_SUCCESS;\r
@@ -704,7 +697,6 @@ UpdateSectionEntries (
                  (FirstLevelIdx + i) << TT_DESCRIPTOR_SECTION_BASE_SHIFT,\r
                  TT_DESCRIPTOR_SECTION_SIZE,\r
                  Attributes,\r
-                 VirtualMask,\r
                  NULL);\r
     } else {\r
       // still a section entry\r
@@ -714,9 +706,6 @@ UpdateSectionEntries (
 \r
       // mask in new attributes and/or permissions\r
       Descriptor |= EntryValue;\r
-      if (VirtualMask != 0) {\r
-        Descriptor &= ~VirtualMask;\r
-      }\r
 \r
       if (CurrentDescriptor  != Descriptor) {\r
         Mva = (VOID *)(UINTN)(((UINTN)FirstLevelTable) << TT_DESCRIPTOR_SECTION_BASE_SHIFT);\r
@@ -743,8 +732,7 @@ EFI_STATUS
 ArmSetMemoryAttributes (\r
   IN EFI_PHYSICAL_ADDRESS      BaseAddress,\r
   IN UINT64                    Length,\r
-  IN UINT64                    Attributes,\r
-  IN EFI_PHYSICAL_ADDRESS      VirtualMask\r
+  IN UINT64                    Attributes\r
   )\r
 {\r
   EFI_STATUS    Status;\r
@@ -766,8 +754,7 @@ ArmSetMemoryAttributes (
         "SetMemoryAttributes(): MMU section 0x%lx length 0x%lx to %lx\n",\r
         BaseAddress, ChunkLength, Attributes));\r
 \r
-      Status = UpdateSectionEntries (BaseAddress, ChunkLength, Attributes,\r
-                 VirtualMask);\r
+      Status = UpdateSectionEntries (BaseAddress, ChunkLength, Attributes);\r
 \r
       FlushTlbs = TRUE;\r
     } else {\r
@@ -787,7 +774,7 @@ ArmSetMemoryAttributes (
         BaseAddress, ChunkLength, Attributes));\r
 \r
       Status = UpdatePageEntries (BaseAddress, ChunkLength, Attributes,\r
-                 VirtualMask, &FlushTlbs);\r
+                 &FlushTlbs);\r
     }\r
 \r
     if (EFI_ERROR (Status)) {\r