aboutsummaryrefslogtreecommitdiff
path: root/hw/mips/r4k.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/mips/r4k.c')
-rw-r--r--hw/mips/r4k.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/mips/r4k.c b/hw/mips/r4k.c
index 7ee37c4..3830854 100644
--- a/hw/mips/r4k.c
+++ b/hw/mips/r4k.c
@@ -115,8 +115,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 > ram_size) {
error_report("memory too small for initial ram disk '%s'",
loaderparams.initrd_filename);