public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] Pkg-Module: ArmPkg Fix Mmu Initialization Problem.
@ 2016-09-23 21:59 Kurt Kennett
  0 siblings, 0 replies; 7+ messages in thread
From: Kurt Kennett @ 2016-09-23 21:59 UTC (permalink / raw)
  To: edk2-devel@lists.01.org; +Cc: Leif Lindholm, Ard Biesheuvel

Please see attached proposed patch.

K2


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH] Pkg-Module: ArmPkg Fix Mmu Initialization Problem.
@ 2016-09-26 15:36 Kurt Kennett
  2016-09-26 17:04 ` Ard Biesheuvel
  0 siblings, 1 reply; 7+ messages in thread
From: Kurt Kennett @ 2016-09-26 15:36 UTC (permalink / raw)
  To: edk2-devel@lists.01.org; +Cc: Leif Lindholm, Ard Biesheuvel

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>
---
ArmPkg/Drivers/CpuDxe/Arm/Mmu.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
index 63da8ba..64ef1bb 100644
--- a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
+++ b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
@@ -297,6 +297,11 @@ SyncCacheConfig (
       }
       NextRegionLength += TT_DESCRIPTOR_SECTION_SIZE;
     } 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 (
           i,FirstLevelTable[i],
           NumberOfDescriptors, MemorySpaceMap,
--
2.9.0.windows.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-09-26 17:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-23 21:59 [PATCH] Pkg-Module: ArmPkg Fix Mmu Initialization Problem Kurt Kennett
  -- strict thread matches above, loose matches on Subject: below --
2016-09-26 15:36 Kurt Kennett
2016-09-26 17:04 ` Ard Biesheuvel
2016-09-26 17:08   ` Kurt Kennett
2016-09-26 17:10   ` Kurt Kennett
2016-09-26 17:17     ` Ard Biesheuvel
2016-09-26 17:20       ` Kurt Kennett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox