Alexandre Julliard : ntdll: Hardcode address space limits for ARM platforms.

Alexandre Julliard julliard at winehq.org
Mon Oct 28 16:43:37 CDT 2019


Module: wine
Branch: master
Commit: 5b1fc819081dd52225fb9df0ee07bbdc9b23ca19
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=5b1fc819081dd52225fb9df0ee07bbdc9b23ca19

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Oct 28 21:07:53 2019 +0100

ntdll: Hardcode address space limits for ARM platforms.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/ntdll_misc.h |  2 +-
 dlls/ntdll/virtual.c    | 16 +++++++++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 20e64c80c7..c3f7eca61e 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -34,7 +34,7 @@
 
 #define MAX_DOS_DRIVES 26
 
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
 static const UINT_PTR page_size = 0x1000;
 #else
 extern UINT_PTR page_size DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index d15b49f6fd..68249de902 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -134,6 +134,20 @@ static void *address_space_limit = (void *)0x7fffffff0000;
 static void *user_space_limit    = (void *)0x7fffffff0000;
 static void *working_set_limit   = (void *)0x7fffffff0000;
 static void *address_space_start = (void *)0x10000;
+#elif defined(__arm__)
+static const UINT page_shift = 12;
+static const UINT_PTR page_mask = 0xfff;
+static void *address_space_limit = (void *)0xc0000000;
+static void *user_space_limit    = (void *)0x7fff0000;
+static void *working_set_limit   = (void *)0x7fff0000;
+static void *address_space_start = (void *)0x10000;
+#elif defined(__aarch64__)
+static const UINT page_shift = 12;
+static const UINT_PTR page_mask = 0xfff;
+static void *address_space_limit = (void *)0xffffffff0000;
+static void *user_space_limit    = (void *)0x7fffffff0000;
+static void *working_set_limit   = (void *)0x7fffffff0000;
+static void *address_space_start = (void *)0x10000;
 #else
 UINT_PTR page_size = 0;
 static UINT page_shift;
@@ -1828,7 +1842,7 @@ void virtual_init(void)
     struct alloc_virtual_heap alloc_views;
     size_t size;
 
-#if !defined(__i386__) && !defined(__x86_64__)
+#if !defined(__i386__) && !defined(__x86_64__) && !defined(__arm__) && !defined(__aarch64__)
     page_size = sysconf( _SC_PAGESIZE );
     page_mask = page_size - 1;
     /* Make sure we have a power of 2 */




More information about the wine-cvs mailing list