diff --git a/exec.c b/exec.c index d9e959d69d21c034595679821a7c937216e4a8e7..eb3c8abf5dd28e3ab7d7ddcbb090a3719e29a43f 100644 --- a/exec.c +++ b/exec.c @@ -227,6 +227,10 @@ static void page_init(void) do { n = fscanf (f, "%llx-%llx %*[^\n]\n", &startaddr, &endaddr); if (n == 2) { + startaddr = MIN(startaddr, + (1ULL << TARGET_PHYS_ADDR_SPACE_BITS) - 1); + endaddr = MIN(endaddr, + (1ULL << TARGET_PHYS_ADDR_SPACE_BITS) - 1); page_set_flags(TARGET_PAGE_ALIGN(startaddr), TARGET_PAGE_ALIGN(endaddr), PAGE_RESERVED);