From 6bd7917903112ab1541d10a006f7074c4d0fa7da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=A9=A720201110?= Date: Fri, 6 Dec 2024 13:34:31 +0800 Subject: [PATCH] linux-user/hppa: Set TASK_UNMAPPED_BASE to 0xfa000000 for hppa arch 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 Message-Id: <20220918194555.83535-9-deller@gmx.de> Signed-off-by: Laurent Vivier Signed-off-by: Liu Jing --- linux-user/mmap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index c125031b90..d674d5b00d 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -251,8 +251,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; -- Gitee