[haiku-commits] haiku: hrev44931 - src/system/kernel/arch/arm/paging/32bit

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 30 Nov 2012 22:09:34 +0100 (CET)

hrev44931 adds 1 changeset to branch 'master'
old head: 587cd228badd8a28b03c758be95bc3098fcd3ed3
new head: fed8bb7dff054cc37c266f9ce78244cdc04c28fc
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=fed8bb7+%5E587cd22

----------------------------------------------------------------------------

fed8bb7: Fix index range for ARM MMU coarse page tables.
  
  As there are only 8 bits for the index in the coarse page table entries
  the maximum index is 256. This makes us correctly move to the next page
  directory once we've run through all entries. Fixes missing unmap of
  pages that crossed that boundary and consequent panic "page still has
  mappings" when the page was removed from a cache.

                                            [ Michael Lotz <mmlr@xxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev44931
Commit:      fed8bb7dff054cc37c266f9ce78244cdc04c28fc
URL:         http://cgit.haiku-os.org/haiku/commit/?id=fed8bb7
Author:      Michael Lotz <mmlr@xxxxxxxx>
Date:        Fri Nov 30 21:03:06 2012 UTC

----------------------------------------------------------------------------

1 file changed, 3 insertions(+), 3 deletions(-)
.../kernel/arch/arm/paging/32bit/ARMVMTranslationMap32Bit.cpp   | 6 +++---

----------------------------------------------------------------------------

diff --git 
a/src/system/kernel/arch/arm/paging/32bit/ARMVMTranslationMap32Bit.cpp 
b/src/system/kernel/arch/arm/paging/32bit/ARMVMTranslationMap32Bit.cpp
index ba70d0f..a1268c1 100644
--- a/src/system/kernel/arch/arm/paging/32bit/ARMVMTranslationMap32Bit.cpp
+++ b/src/system/kernel/arch/arm/paging/32bit/ARMVMTranslationMap32Bit.cpp
@@ -235,7 +235,7 @@ ARMVMTranslationMap32Bit::Unmap(addr_t start, addr_t end)
                page_table_entry* pt = 
(page_table_entry*)fPageMapper->GetPageTableAt(
                        pd[index] & ARM_PDE_ADDRESS_MASK);
 
-               for (index = VADDR_TO_PTENT(start); (index < 1024) && (start < 
end);
+               for (index = VADDR_TO_PTENT(start); (index < 256) && (start < 
end);
                                index++, start += B_PAGE_SIZE) {
                        if ((pt[index] & ARM_PTE_TYPE_MASK) == 0) {
                                // page mapping not valid
@@ -364,7 +364,7 @@ ARMVMTranslationMap32Bit::UnmapPages(VMArea* area, addr_t 
base, size_t size,
                page_table_entry* pt = 
(page_table_entry*)fPageMapper->GetPageTableAt(
                        pd[index] & ARM_PDE_ADDRESS_MASK);
 
-               for (index = VADDR_TO_PTENT(start); (index < 1024) && (start < 
end);
+               for (index = VADDR_TO_PTENT(start); (index < 256) && (start < 
end);
                                index++, start += B_PAGE_SIZE) {
                        page_table_entry oldEntry
                                = 
ARMPagingMethod32Bit::ClearPageTableEntry(&pt[index]);
@@ -680,7 +680,7 @@ ARMVMTranslationMap32Bit::Protect(addr_t start, addr_t end, 
uint32 attributes,
                page_table_entry* pt = 
(page_table_entry*)fPageMapper->GetPageTableAt(
                        pd[index] & ARM_PDE_ADDRESS_MASK);
 
-               for (index = VADDR_TO_PTENT(start); index < 1024 && start < end;
+               for (index = VADDR_TO_PTENT(start); index < 256 && start < end;
                                index++, start += B_PAGE_SIZE) {
                        page_table_entry entry = pt[index];
                        if ((entry & ARM_PTE_PRESENT) == 0) {


Other related posts:

  • » [haiku-commits] haiku: hrev44931 - src/system/kernel/arch/arm/paging/32bit - mmlr