aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-05-23 21:11:22 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-05-23 21:11:22 +0000
commit5fd386f698e71955b03742eb6e85f5de2b213e6e (patch)
treebb8c702844b439f9e6431c3c8af3b617c8f565ae /exec.c
parent0ced6589701ec3716f7df86dbaf29db154a6a0d7 (diff)
PowerPC merge
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@858 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index c0b6a8f32f..9a6d81a95f 100644
--- a/exec.c
+++ b/exec.c
@@ -1789,8 +1789,9 @@ void cpu_register_physical_memory(target_phys_addr_t start_addr,
unsigned long addr, end_addr;
PhysPageDesc *p;
+ size = (size + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK;
end_addr = start_addr + size;
- for(addr = start_addr; addr < end_addr; addr += TARGET_PAGE_SIZE) {
+ for(addr = start_addr; addr != end_addr; addr += TARGET_PAGE_SIZE) {
p = phys_page_find_alloc(addr >> TARGET_PAGE_BITS);
p->phys_offset = phys_offset;
if ((phys_offset & ~TARGET_PAGE_MASK) <= IO_MEM_ROM)