From bf8ca114e2ba26db9a83261173ba4c867e37806d Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Wed, 9 Jul 2003 23:04:23 +0000 Subject: Fix the VADDR() macros to use either KVADDR() or UVADDR(), depending on the implied sign extension. The single unified VADDR() macro was not able to avoid sign extending the VM_MAXUSER_ADDRESS/USRSTACK values. Be explicit about UVADDR() (positive address space) and KVADDR() (kernel negative address space) to make mistakes show up more spectacularly. Increase user VM space from 1/2TB (512GB) to 128TB. --- sys/amd64/include/vmparam.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sys/amd64/include/vmparam.h') diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index 6dc756017258..9336bab4d7cb 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -92,18 +92,18 @@ * messy at times, but hey, we'll do anything to save a page :-) */ -#define VM_MAX_KERNEL_ADDRESS VADDR(KPML4I, NPDPEPG-1, NKPDE-1, NPTEPG-1) -#define VM_MIN_KERNEL_ADDRESS VADDR(KPML4I, KPDPI, 0, 0) +#define VM_MAX_KERNEL_ADDRESS KVADDR(KPML4I, NPDPEPG-1, NKPDE-1, NPTEPG-1) +#define VM_MIN_KERNEL_ADDRESS KVADDR(KPML4I, KPDPI, 0, 0) -#define DMAP_MIN_ADDRESS VADDR(DMPML4I, 0, 0, 0) -#define DMAP_MAX_ADDRESS VADDR(DMPML4I+1, 0, 0, 0) +#define DMAP_MIN_ADDRESS KVADDR(DMPML4I, 0, 0, 0) +#define DMAP_MAX_ADDRESS KVADDR(DMPML4I+1, 0, 0, 0) -#define KERNBASE VADDR(KPML4I, KPDPI, 0, 0) +#define KERNBASE KVADDR(KPML4I, KPDPI, 0, 0) -#define UPT_MAX_ADDRESS VADDR(PML4PML4I, PML4PML4I, PML4PML4I, PML4PML4I) -#define UPT_MIN_ADDRESS VADDR(PML4PML4I, 0, 0, 0) +#define UPT_MAX_ADDRESS KVADDR(PML4PML4I, PML4PML4I, PML4PML4I, PML4PML4I) +#define UPT_MIN_ADDRESS KVADDR(PML4PML4I, 0, 0, 0) -#define VM_MAXUSER_ADDRESS VADDR(NUPML4E, 0, 0, 0) +#define VM_MAXUSER_ADDRESS UVADDR(NUPML4E, 0, 0, 0) #define USRSTACK VM_MAXUSER_ADDRESS -- cgit v1.2.3