diff mbox series

[PULL,10/38] linux-user/hppa: Set TASK_UNMAPPED_BASE to 0xfa000000 for hppa arch

Message ID 20220928081517.734954-11-laurent@vivier.eu
State New
Headers show
Series [PULL,01/38] linux-user: use 'max' instead of 'qemu32' / 'qemu64' by default | expand

Commit Message

Laurent Vivier Sept. 28, 2022, 8:14 a.m. UTC
From: Helge Deller <deller@gmx.de>

On the parisc architecture the stack grows upwards.
Move the TASK_UNMAPPED_BASE to high memory area as it's done by the
kernel on physical machines.

Signed-off-by: Helge Deller <deller@gmx.de>
Message-Id: <20220918194555.83535-9-deller@gmx.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/mmap.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 6a828e8418a7..83fdae7034ea 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -253,8 +253,12 @@  static int mmap_frag(abi_ulong real_start,
 # define TASK_UNMAPPED_BASE  (1ul << 38)
 #endif
 #else
+#ifdef TARGET_HPPA
+# define TASK_UNMAPPED_BASE  0xfa000000
+#else
 # define TASK_UNMAPPED_BASE  0x40000000
 #endif
+#endif
 abi_ulong mmap_next_start = TASK_UNMAPPED_BASE;
 
 unsigned long last_brk;