mirror of https://github.com/acidanthera/audk.git
ArmPkg/CpuDxe: Fix MMU initialization problem
During Mmu initialization in the CpuDxe, for a page table any bits set in the 'NextSectionAttributes' are garbage and were set from bits that are actually part of the pagetable address. We clear it out to zero so that the SyncCacheConfigPage will use the page attributes instead of trying to convert the (bogus) section attributes into page attributes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Kurt Kennett <kurt.kennett@microsoft.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This commit is contained in:
parent
7188b4557a
commit
f6be48e990
|
@ -297,6 +297,11 @@ SyncCacheConfig (
|
||||||
}
|
}
|
||||||
NextRegionLength += TT_DESCRIPTOR_SECTION_SIZE;
|
NextRegionLength += TT_DESCRIPTOR_SECTION_SIZE;
|
||||||
} else if (TT_DESCRIPTOR_SECTION_TYPE_IS_PAGE_TABLE(FirstLevelTable[i])) {
|
} else if (TT_DESCRIPTOR_SECTION_TYPE_IS_PAGE_TABLE(FirstLevelTable[i])) {
|
||||||
|
// In this case any bits set in the 'NextSectionAttributes' are garbage and were set from
|
||||||
|
// bits that are actually part of the pagetable address. We clear it out to zero so that
|
||||||
|
// the SyncCacheConfigPage will use the page attributes instead of trying to convert the
|
||||||
|
// section attributes into page attributes
|
||||||
|
NextSectionAttributes = 0;
|
||||||
Status = SyncCacheConfigPage (
|
Status = SyncCacheConfigPage (
|
||||||
i,FirstLevelTable[i],
|
i,FirstLevelTable[i],
|
||||||
NumberOfDescriptors, MemorySpaceMap,
|
NumberOfDescriptors, MemorySpaceMap,
|
||||||
|
|
Loading…
Reference in New Issue