]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
ArmPkg/CpuDxe: Fix MMU initialization problem
[mirror_edk2.git] / ArmPkg / Drivers / CpuDxe / Arm / Mmu.c
index 63da8ba8cb88567b6ed8943ffcb22903ede1e56f..14fc22d7a59fb1637aeca74305a9a28aa518a803 100644 (file)
@@ -297,6 +297,11 @@ SyncCacheConfig (
       }\r
       NextRegionLength += TT_DESCRIPTOR_SECTION_SIZE;\r
     } else if (TT_DESCRIPTOR_SECTION_TYPE_IS_PAGE_TABLE(FirstLevelTable[i])) {\r
+      // In this case any bits set in the 'NextSectionAttributes' are garbage and were set from\r
+      // bits that are actually part of the pagetable address.  We clear it out to zero so that\r
+      // the SyncCacheConfigPage will use the page attributes instead of trying to convert the\r
+      // section attributes into page attributes\r
+      NextSectionAttributes = 0;\r
       Status = SyncCacheConfigPage (\r
           i,FirstLevelTable[i],\r
           NumberOfDescriptors, MemorySpaceMap,\r