Commit 5fd386f698e71955b03742eb6e85f5de2b213e6e

Authored by bellard
1 parent 0ced6589

PowerPC merge


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@858 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 1 deletions
... ... @@ -1789,8 +1789,9 @@ void cpu_register_physical_memory(target_phys_addr_t start_addr,
1789 1789 unsigned long addr, end_addr;
1790 1790 PhysPageDesc *p;
1791 1791  
  1792 + size = (size + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK;
1792 1793 end_addr = start_addr + size;
1793   - for(addr = start_addr; addr < end_addr; addr += TARGET_PAGE_SIZE) {
  1794 + for(addr = start_addr; addr != end_addr; addr += TARGET_PAGE_SIZE) {
1794 1795 p = phys_page_find_alloc(addr >> TARGET_PAGE_BITS);
1795 1796 p->phys_offset = phys_offset;
1796 1797 if ((phys_offset & ~TARGET_PAGE_MASK) <= IO_MEM_ROM)
... ...