diff options
Diffstat (limited to 'hw/mips/mipssim.c')
-rw-r--r-- | hw/mips/mipssim.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c index afef4f2e77..97dcc23247 100644 --- a/hw/mips/mipssim.c +++ b/hw/mips/mipssim.c @@ -90,8 +90,7 @@ static int64_t load_kernel(void) if (loaderparams.initrd_filename) { initrd_size = get_image_size(loaderparams.initrd_filename); if (initrd_size > 0) { - initrd_offset = (kernel_high + ~INITRD_PAGE_MASK) & - INITRD_PAGE_MASK; + initrd_offset = ROUND_UP(kernel_high, INITRD_PAGE_SIZE); if (initrd_offset + initrd_size > loaderparams.ram_size) { error_report("memory too small for initial ram disk '%s'", loaderparams.initrd_filename); |