aboutsummaryrefslogtreecommitdiff
path: root/hw/mips/mips_r4k.c
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2013-06-27 08:35:27 +0100
committerAurelien Jarno <aurelien@aurel32.net>2013-07-29 00:27:35 +0200
commit05b3274b6bedb68ff78b76c642e17e97f3181c2f (patch)
tree8f67e370a9baa134479510ec1a96fe4f73355008 /hw/mips/mips_r4k.c
parentea0a4f34418c9f2cad9722bb27acd6349148fac0 (diff)
hw/mips: align initrd to 64KB to avoid kernel error
The Linux kernel can be configured to use 64KB pages, but it also requires initrd to be page aligned. Therefore, to be safe, align the initrd to 64KB using a new INITRD_PAGE_MASK rather than TARGET_PAGE_MASK. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw/mips/mips_r4k.c')
-rw-r--r--hw/mips/mips_r4k.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
index 4bc2e3fa7a..7af08b8d0f 100644
--- a/hw/mips/mips_r4k.c
+++ b/hw/mips/mips_r4k.c
@@ -102,7 +102,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 + ~TARGET_PAGE_MASK) & TARGET_PAGE_MASK;
+ initrd_offset = (kernel_high + ~INITRD_PAGE_MASK) & INITRD_PAGE_MASK;
if (initrd_offset + initrd_size > ram_size) {
fprintf(stderr,
"qemu: memory too small for initial ram disk '%s'\n",