From cd632cb9fbbbd16e20dc6fdaa5f37be67f3a65d9 Mon Sep 17 00:00:00 2001 From: "Rodney W. Grimes" Date: Thu, 14 Oct 1993 18:15:35 +0000 Subject: [PATCH] >From David Greenman Bruce Evans had limited the kernel virtual address space to not include the last 4MB since it was not being used. Other changes are being made that will reloate the Alternate Page Directory Table (APDT) into this area so the limit is being fixed to be the last virtual address. (Infact with this patch you can now do that relocation) --- sys/amd64/amd64/machdep.c | 14 ++++++-------- sys/i386/i386/machdep.c | 14 ++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 5c6570c7bf4..3877ece8b6c 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.9 1993/10/08 20:45:12 rgrimes Exp $ + * $Id: machdep.c,v 1.10 1993/10/10 06:01:44 rgrimes Exp $ */ #include "npx.h" @@ -947,15 +947,13 @@ init386(first) cninit (); - /* make gdt memory segments */ - gdt_segs[GCODE_SEL].ssd_limit = i386_btop(i386_round_page(&etext)) - 1; /* - * XXX - VM_MAX_KERNEL_ADDRESS is correctly a max, but bogusly the - * address of the last page, not the last byte. Then above the end - * :-) there is another 4M of page tables or something. + * make gdt memory segments, the code segment goes up to end of the + * page with etext in it, the data segment goes to the end of + * the address space */ -#define VM_END_KERNEL_ADDRESS (VM_MAX_KERNEL_ADDRESS + NBPG + NBPDR) - gdt_segs[GDATA_SEL].ssd_limit = i386_btop(VM_END_KERNEL_ADDRESS) - 1; + gdt_segs[GCODE_SEL].ssd_limit = i386_btop(i386_round_page(&etext)) - 1; + gdt_segs[GDATA_SEL].ssd_limit = 0xffffffff; /* XXX constant? */ for (x=0; x < NGDT; x++) ssdtosd(gdt_segs+x, gdt+x); /* make ldt memory segments */ /* diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 5c6570c7bf4..3877ece8b6c 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.9 1993/10/08 20:45:12 rgrimes Exp $ + * $Id: machdep.c,v 1.10 1993/10/10 06:01:44 rgrimes Exp $ */ #include "npx.h" @@ -947,15 +947,13 @@ init386(first) cninit (); - /* make gdt memory segments */ - gdt_segs[GCODE_SEL].ssd_limit = i386_btop(i386_round_page(&etext)) - 1; /* - * XXX - VM_MAX_KERNEL_ADDRESS is correctly a max, but bogusly the - * address of the last page, not the last byte. Then above the end - * :-) there is another 4M of page tables or something. + * make gdt memory segments, the code segment goes up to end of the + * page with etext in it, the data segment goes to the end of + * the address space */ -#define VM_END_KERNEL_ADDRESS (VM_MAX_KERNEL_ADDRESS + NBPG + NBPDR) - gdt_segs[GDATA_SEL].ssd_limit = i386_btop(VM_END_KERNEL_ADDRESS) - 1; + gdt_segs[GCODE_SEL].ssd_limit = i386_btop(i386_round_page(&etext)) - 1; + gdt_segs[GDATA_SEL].ssd_limit = 0xffffffff; /* XXX constant? */ for (x=0; x < NGDT; x++) ssdtosd(gdt_segs+x, gdt+x); /* make ldt memory segments */ /*