summaryrefslogtreecommitdiffstats
path: root/include/hw/mips
diff options
context:
space:
mode:
authorJames Hogan2013-06-27 09:35:27 +0200
committerAurelien Jarno2013-07-29 00:27:35 +0200
commit05b3274b6bedb68ff78b76c642e17e97f3181c2f (patch)
tree8f67e370a9baa134479510ec1a96fe4f73355008 /include/hw/mips
parentpflash_cfi01: duplicate status byte from bits 23:16 for 32bit reads (diff)
downloadqemu-05b3274b6bedb68ff78b76c642e17e97f3181c2f.tar.gz
qemu-05b3274b6bedb68ff78b76c642e17e97f3181c2f.tar.xz
qemu-05b3274b6bedb68ff78b76c642e17e97f3181c2f.zip
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 'include/hw/mips')
-rw-r--r--include/hw/mips/mips.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/mips/mips.h b/include/hw/mips/mips.h
index 291e85f6b9..2a7a9c9f42 100644
--- a/include/hw/mips/mips.h
+++ b/include/hw/mips/mips.h
@@ -2,6 +2,9 @@
#define HW_MIPS_H
/* Definitions for mips board emulation. */
+/* Kernels can be configured with 64KB pages */
+#define INITRD_PAGE_MASK (~((1 << 16) - 1))
+
#include "exec/memory.h"
/* gt64xxx.c */