Enlarge user address space on ARM64

ARM64 is expanded to the maximum 4k page value (48-bits), and ARM64u32
is expanded to the full 32-bit range.

ARM32 is left as-is, since it is usually intended as a low-overhead
target (and has ASLR off by default, the main motivation for this)

Bug: 80146040
Change-Id: I967f1ebd04c0e693d1754c28a6ab5d507f5e9062
diff --git a/project/generic-arm-inc.mk b/project/generic-arm-inc.mk
index 5a93ac4..fa3577b 100644
--- a/project/generic-arm-inc.mk
+++ b/project/generic-arm-inc.mk
@@ -27,10 +27,16 @@
 KERNEL_ASPACE_BASE := 0xffffffffe0000000
 KERNEL_ASPACE_SIZE := 0x0000000020000000
 KERNEL_BASE        := 0xffffffffe0000000
-USER_ASPACE_BASE   := 0x0000000000008000
-USER_ASPACE_SIZE   := 0x0000000001ff8000
 
-GLOBAL_DEFINES += MMU_USER_SIZE_SHIFT=25 # 32 MB user-space address space
+USER_ASPACE_BASE   := 0x0000000000008000
+
+ifeq (false,$(call TOBOOL,$(USER_32BIT)))
+USER_ASPACE_SIZE   := 0x0000ffffffff8000
+GLOBAL_DEFINES += MMU_USER_SIZE_SHIFT=48
+else
+USER_ASPACE_SIZE   := 0x00000000ffff8000
+GLOBAL_DEFINES += MMU_USER_SIZE_SHIFT=32
+endif
 
 else