OSDN Git Service

linux-user/sh4: Reduce TARGET_VIRT_ADDR_SPACE_BITS to 31
authorRichard Henderson <rth@twiddle.net>
Thu, 5 Oct 2017 14:36:01 +0000 (10:36 -0400)
committerRiku Voipio <riku.voipio@linaro.org>
Mon, 16 Oct 2017 13:00:56 +0000 (16:00 +0300)
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>
target/sh4/cpu.h

index 79f85d3..123f347 100644 (file)
 #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