summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2003-05-05 17:55:00 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2003-05-05 17:55:00 +0000
commit3058178bb059c84eed2b301e7b7aee89947cd34e (patch)
tree33623d1905d6657c8e1694a78339c4ac8b1ab292
parent7298fb799640ae3b48410f01cb03df2c45d848d7 (diff)
Move exec base to 0x1c000000, exe/data gap to 512MB. Allows better
interleave of exe/shared libs. Raise MAXDSIZ back to 1G. This change REQUIRES a binary update on i386.
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf_i386.sh4
-rw-r--r--sys/arch/i386/i386/machdep.c4
-rw-r--r--sys/arch/i386/i386/pmap.c4
-rw-r--r--sys/arch/i386/include/vmparam.h7
-rw-r--r--sys/uvm/uvm_map.c4
5 files changed, 13 insertions, 10 deletions
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf_i386.sh b/gnu/usr.bin/binutils/ld/emulparams/elf_i386.sh
index 317475babbc..96eace8c901 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/elf_i386.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf_i386.sh
@@ -1,13 +1,13 @@
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-i386"
-TEXT_START_ADDR=0x00001000
+TEXT_START_ADDR=0x1C000000
MAXPAGESIZE=0x1000
NONPAGED_TEXT_START_ADDR=0x08048000
ARCH=i386
MACHINE=
NOP=0x9090
PAD_RO=
-RODATA_PADSIZE=0x40000000
+RODATA_PADSIZE=0x20000000
RODATA_ALIGN=". = ALIGN(${RODATA_PADSIZE})"
RODATA_ALIGN_ADD="${TEXT_START_ADDR}"
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 5addf6b2430..02b1d8453f1 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.227 2003/05/04 04:29:03 tedu Exp $ */
+/* $OpenBSD: machdep.c,v 1.228 2003/05/05 17:54:59 drahn Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -2227,7 +2227,7 @@ init386(paddr_t first_avail)
0, 0);
setsegment(&gdt[GUCODE1_SEL].sd, 0, i386_btop(VM_MAXUSER_ADDRESS) - 1,
SDT_MEMERA, SEL_UPL, 1, 1);
- setsegment(&gdt[GUCODE_SEL].sd, 0, i386_btop(0x3fffffff), /* 1G */
+ setsegment(&gdt[GUCODE_SEL].sd, 0, i386_btop(I386_MAX_EXE_ADDR) - 1,
SDT_MEMERA, SEL_UPL, 1, 1);
setsegment(&gdt[GUDATA_SEL].sd, 0, i386_btop(VM_MAXUSER_ADDRESS) - 1,
SDT_MEMRWA, SEL_UPL, 1, 1);
diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c
index 341f2d72c39..2aa41487633 100644
--- a/sys/arch/i386/i386/pmap.c
+++ b/sys/arch/i386/i386/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.69 2003/05/02 21:07:47 mickey Exp $ */
+/* $OpenBSD: pmap.c,v 1.70 2003/05/05 17:54:59 drahn Exp $ */
/* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */
/*
@@ -576,7 +576,7 @@ pmap_nxstack_account(struct pmap *pmap, vaddr_t va,
pt_entry_t opte, pt_entry_t npte)
{
if (((opte ^ npte) & PG_X) &&
- va < VM_MAXUSER_ADDRESS && va >= 0x40000000) {
+ va < VM_MAXUSER_ADDRESS && va >= I386_MAX_EXE_ADDR) {
struct trapframe *tf = curproc->p_md.md_regs;
struct vm_map *map = &curproc->p_vmspace->vm_map;
struct pcb *pcb = &curproc->p_addr->u_pcb;
diff --git a/sys/arch/i386/include/vmparam.h b/sys/arch/i386/include/vmparam.h
index 51065871af3..2769e45efea 100644
--- a/sys/arch/i386/include/vmparam.h
+++ b/sys/arch/i386/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.26 2003/04/17 03:42:14 drahn Exp $ */
+/* $OpenBSD: vmparam.h,v 1.27 2003/05/05 17:54:59 drahn Exp $ */
/* $NetBSD: vmparam.h,v 1.15 1994/10/27 04:16:34 cgd Exp $ */
/*-
@@ -67,7 +67,7 @@
#define DFLDSIZ (64*1024*1024) /* initial data size limit */
#endif
#ifndef MAXDSIZ
-#define MAXDSIZ (512*1024*1024) /* max data size */
+#define MAXDSIZ (1024*1024*1024) /* max data size */
#endif
#ifndef DFLSSIZ
#define DFLSSIZ (4*1024*1024) /* initial stack size limit */
@@ -76,6 +76,9 @@
#define MAXSSIZ (32*1024*1024) /* max stack size */
#endif
+/* I386 has a line where all code is executable: 0 - I386_MAX_EXE_ADDR */
+#define I386_MAX_EXE_ADDR 0x20000000 /* exec line */
+
/*
* Size of shared memory map
*/
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c
index 9dc0d92fa4f..bc5c6c87e3c 100644
--- a/sys/uvm/uvm_map.c
+++ b/sys/uvm/uvm_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_map.c,v 1.58 2003/04/17 03:50:54 drahn Exp $ */
+/* $OpenBSD: uvm_map.c,v 1.59 2003/05/05 17:54:59 drahn Exp $ */
/* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */
/*
@@ -1084,7 +1084,7 @@ uvm_map_hint(struct proc *p, vm_prot_t prot)
* after data + heap region.
*/
if ((prot & VM_PROT_EXECUTE) &&
- ((vaddr_t)p->p_vmspace->vm_daddr >= 0x40000000))
+ ((vaddr_t)p->p_vmspace->vm_daddr >= I386_MAX_EXE_ADDR))
return (round_page(PAGE_SIZE*2));
#endif
return (round_page((vaddr_t)p->p_vmspace->vm_daddr + MAXDSIZ));