diff options
author | Luca Dariz <luca@orpolo.org> | 2023-05-21 22:45:24 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-05-21 22:50:30 +0200 |
commit | d9c47d8e829fbb6f15fdb3796776d78be1b082fc (patch) | |
tree | b3f83d236811c72ebc886c13199a53309548e16e /i386/include | |
parent | 659c109b6285632058bf9ca81bf450371165bd63 (diff) | |
download | gnumach-d9c47d8e829fbb6f15fdb3796776d78be1b082fc.tar.gz gnumach-d9c47d8e829fbb6f15fdb3796776d78be1b082fc.tar.bz2 gnumach-d9c47d8e829fbb6f15fdb3796776d78be1b082fc.zip |
x86_64: push user's VM_MAX_ADDRESS
* i386/include/mach/i386/vm_param.h: check for both KERNEL and USER32
to differentiate between user/kernel on x86_64, and push the upper
limit of user address space to 128 TB.
Message-Id: <20230521204524.492700-1-luca@orpolo.org>
Diffstat (limited to 'i386/include')
-rw-r--r-- | i386/include/mach/i386/vm_param.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/i386/include/mach/i386/vm_param.h b/i386/include/mach/i386/vm_param.h index f09049a5..1576f048 100644 --- a/i386/include/mach/i386/vm_param.h +++ b/i386/include/mach/i386/vm_param.h @@ -65,18 +65,26 @@ ~(I386_PGBYTES-1)) #define i386_trunc_page(x) (((unsigned long)(x)) & ~(I386_PGBYTES-1)) -/* User address spaces are 3GB each, - starting at virtual and linear address 0. +/* User address spaces are 3GB each on a 32-bit kernel, starting at + virtual and linear address 0. + On a 64-bit krenel we split the address space in half, with the + lower 128TB for the user address space and the upper 128TB for the + kernel address space. - VM_MAX_ADDRESS can be reduced to leave more space for the kernel, but must - not be increased to more than 3GB as glibc and hurd servers would not cope - with that. + On a 32-bit kernel VM_MAX_ADDRESS can be reduced to leave more + space for the kernel, but must not be increased to more than 3GB as + glibc and hurd servers would not cope with that. */ #define VM_MIN_ADDRESS (0ULL) + #ifdef __x86_64__ -#define VM_MAX_ADDRESS (0xc0000000ULL) -#else +#if defined(KERNEL) && defined(USER32) +#define VM_MAX_ADDRESS (0xc0000000UL) +#else /* defined(KERNEL) && defined(USER32) */ +#define VM_MAX_ADDRESS (0x800000000000ULL) +#endif /* defined(KERNEL) && defined(USER32) */ +#else /* __x86_64__ */ #define VM_MAX_ADDRESS (0xc0000000UL) -#endif +#endif /* __x86_64__ */ #endif /* _MACH_I386_VM_PARAM_H_ */ |