diff --git a/arm64.c b/arm64.c index d1c9c3e8..34c8c591 100644 --- a/arm64.c +++ b/arm64.c @@ -267,7 +267,10 @@ arm64_init(int when) case POST_GDB: arm64_calc_virtual_memory_ranges(); machdep->section_size_bits = _SECTION_SIZE_BITS; - machdep->max_physmem_bits = _MAX_PHYSMEM_BITS; + if (THIS_KERNEL_VERSION >= LINUX(3,17,0)) + machdep->max_physmem_bits = _MAX_PHYSMEM_BITS_3_17; + else + machdep->max_physmem_bits = _MAX_PHYSMEM_BITS; ms = machdep->machspec; if (THIS_KERNEL_VERSION >= LINUX(4,0,0)) { diff --git a/defs.h b/defs.h index a1746cc8..a09fa9a9 100644 --- a/defs.h +++ b/defs.h @@ -2965,6 +2965,7 @@ typedef signed int s32; #define _SECTION_SIZE_BITS 30 #define _MAX_PHYSMEM_BITS 40 +#define _MAX_PHYSMEM_BITS_3_17 48 typedef unsigned long long __u64; typedef unsigned long long u64;