aboutsummaryrefslogtreecommitdiff
path: root/target/sh4
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2017-10-05 10:36:01 -0400
committerRiku Voipio <riku.voipio@linaro.org>2017-10-16 16:00:56 +0300
commitcc1b3960a1a54125d2c87719fa945179bffbae68 (patch)
tree3440e13698752f13ef468d5d28190f8a01f37cc6 /target/sh4
parent18e80c55bb6ec17c05ec0ba717ec83933c2bfc07 (diff)
downloadqemu-cc1b3960a1a54125d2c87719fa945179bffbae68.zip
qemu-cc1b3960a1a54125d2c87719fa945179bffbae68.tar.gz
qemu-cc1b3960a1a54125d2c87719fa945179bffbae68.tar.bz2
linux-user/sh4: Reduce TARGET_VIRT_ADDR_SPACE_BITS to 31
The real kernel has TASK_SIZE as 0x7c000000, due to quirks with a couple of SH parts. But nominally user-space is limited to 2GB. Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20170708025030.15845-4-rth@twiddle.net> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'target/sh4')
-rw-r--r--target/sh4/cpu.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h
index 79f85d3..123f347 100644
--- a/target/sh4/cpu.h
+++ b/target/sh4/cpu.h
@@ -45,7 +45,11 @@
#define TARGET_PAGE_BITS 12 /* 4k XXXXX */
#define TARGET_PHYS_ADDR_SPACE_BITS 32
-#define TARGET_VIRT_ADDR_SPACE_BITS 32
+#ifdef CONFIG_USER_ONLY
+# define TARGET_VIRT_ADDR_SPACE_BITS 31
+#else
+# define TARGET_VIRT_ADDR_SPACE_BITS 32
+#endif
#define SR_MD 30
#define SR_RB 29