summaryrefslogtreecommitdiff
path: root/target/mips/cpu-param.h
diff options
context:
space:
mode:
authorHuacai Chen <chenhc@lemote.com>2020-04-08 17:16:18 +0800
committerAleksandar Markovic <aleksandar.qemu.devel@gmail.com>2020-06-01 13:28:21 +0200
commitee3863b9d414f0b4a59a88f2a79b496a99d4f6dd (patch)
tree86adf1dfc7ff2583defc6cc4af9ae0f25d8b8cfa /target/mips/cpu-param.h
parent7e0896b0e134f5023107d8b4454c020ba51f2d42 (diff)
downloadqemu-ee3863b9d414f0b4a59a88f2a79b496a99d4f6dd.zip
target/mips: Support variable page size
Traditionally, MIPS use 4KB page size, but Loongson prefer 16KB page size in system emulator. So, let's define TARGET_PAGE_BITS_VARY and TARGET_PAGE_BITS_MIN to support variable page size. Cc: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Huacai Chen <chenhc@lemote.com> Reviewed-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> Message-Id: <1586337380-25217-1-git-send-email-chenhc@lemote.com>
Diffstat (limited to 'target/mips/cpu-param.h')
-rw-r--r--target/mips/cpu-param.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/target/mips/cpu-param.h b/target/mips/cpu-param.h
index 308660d29d..9c4a6ea45e 100644
--- a/target/mips/cpu-param.h
+++ b/target/mips/cpu-param.h
@@ -23,7 +23,12 @@
# define TARGET_VIRT_ADDR_SPACE_BITS 32
#endif
#endif
+#ifdef CONFIG_USER_ONLY
#define TARGET_PAGE_BITS 12
+#else
+#define TARGET_PAGE_BITS_VARY
+#define TARGET_PAGE_BITS_MIN 12
+#endif
#define NB_MMU_MODES 4
#endif