[haiku-commits] haiku: hrev48091 - src/system/boot/arch/arm

  • From: ithamar@xxxxxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 25 Oct 2014 18:44:55 +0200 (CEST)

hrev48091 adds 1 changeset to branch 'master'
old head: fdec4227f5fc60024af6f092e1ae14f6425938b9
new head: 2ce0d69a7e6cba33d0022ec274076177707091c8
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=2ce0d69+%5Efdec422

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

2ce0d69: ARM: fix bootloader's mmu_map_physical_memory size
  
  When the address is not page aligned, not only adjust the address
  to start mapping, but also take the "overflow" on the last page
  into account.
  
  This makes the bootloader boot again ;)

                          [ Ithamar R. Adema <ithamar@xxxxxxxxxxxxxxxxxxx> ]

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

Revision:    hrev48091
Commit:      2ce0d69a7e6cba33d0022ec274076177707091c8
URL:         http://cgit.haiku-os.org/haiku/commit/?id=2ce0d69
Author:      Ithamar R. Adema <ithamar@xxxxxxxxxxxxxxxxxxx>
Date:        Sat Oct 25 16:43:15 2014 UTC

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

1 file changed, 3 insertions(+)
src/system/boot/arch/arm/arch_mmu.cpp | 3 +++

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

diff --git a/src/system/boot/arch/arm/arch_mmu.cpp 
b/src/system/boot/arch/arm/arch_mmu.cpp
index 715ffc6..c26893c 100644
--- a/src/system/boot/arch/arm/arch_mmu.cpp
+++ b/src/system/boot/arch/arm/arch_mmu.cpp
@@ -383,10 +383,13 @@ map_page(addr_t virtualAddress, addr_t physicalAddress, 
uint32 flags)
 extern "C" addr_t
 mmu_map_physical_memory(addr_t physicalAddress, size_t size, uint32 flags)
 {
+       TRACE(("mmu_map_physical_memory(phAddr=%lx, %lx, %lu)\n", 
physicalAddress, size, flags));
        addr_t address = sNextVirtualAddress;
        addr_t pageOffset = physicalAddress & (B_PAGE_SIZE - 1);
 
        physicalAddress -= pageOffset;
+       if (pageOffset)
+               size += B_PAGE_SIZE;
 
        for (addr_t offset = 0; offset < size; offset += B_PAGE_SIZE) {
                map_page(get_next_virtual_page(B_PAGE_SIZE), physicalAddress + 
offset,


Other related posts: