diff options
author | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
commit | 5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch) | |
tree | b1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/amd64/amd64/locore.s | |
parent | 83e00d4274950d2b531c24692cd123538ffbddb9 (diff) | |
download | FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.zip FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.tar.gz |
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
Diffstat (limited to 'sys/amd64/amd64/locore.s')
-rw-r--r-- | sys/amd64/amd64/locore.s | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/sys/amd64/amd64/locore.s b/sys/amd64/amd64/locore.s index 97a1e16..ab3dad5 100644 --- a/sys/amd64/amd64/locore.s +++ b/sys/amd64/amd64/locore.s @@ -147,9 +147,11 @@ IdlePTD: .long 0 /* phys addr of kernel PTD */ #endif KPTphys: .long 0 /* phys addr of kernel page tables */ - .globl proc0paddr -proc0paddr: .long 0 /* address of proc 0 address space */ -p0upa: .long 0 /* phys addr of proc0's UPAGES */ + .globl proc0uarea, proc0kstack +proc0uarea: .long 0 /* address of proc 0 uarea space */ +proc0kstack: .long 0 /* address of proc 0 kstack space */ +p0upa: .long 0 /* phys addr of proc0's UAREA */ +p0kpa: .long 0 /* phys addr of proc0's STACK */ vm86phystk: .long 0 /* PA of vm86/bios stack */ @@ -369,13 +371,14 @@ NON_GPROF_ENTRY(btext) /* now running relocated at KERNBASE where the system is linked to run */ begin: /* set up bootstrap stack */ - movl proc0paddr,%eax /* location of in-kernel pages */ - leal UPAGES*PAGE_SIZE(%eax),%esp /* bootstrap stack end location */ + movl proc0kstack,%eax /* location of in-kernel stack */ + /* bootstrap stack end location */ + leal (KSTACK_PAGES*PAGE_SIZE-PCB_SIZE)(%eax),%esp xorl %ebp,%ebp /* mark end of frames */ movl IdlePTD,%esi - movl %esi,PCB_CR3(%eax) + movl %esi,(KSTACK_PAGES*PAGE_SIZE-PCB_SIZE+PCB_CR3)(%eax) testl $CPUID_PGE, R(cpu_feature) jz 1f @@ -762,10 +765,15 @@ no_kernend: movl %esi,R(IdlePTD) /* Allocate UPAGES */ - ALLOCPAGES(UPAGES) + ALLOCPAGES(UAREA_PAGES) movl %esi,R(p0upa) addl $KERNBASE, %esi - movl %esi, R(proc0paddr) + movl %esi, R(proc0uarea) + + ALLOCPAGES(KSTACK_PAGES) + movl %esi,R(p0kpa) + addl $KERNBASE, %esi + movl %esi, R(proc0kstack) ALLOCPAGES(1) /* vm86/bios stack */ movl %esi,R(vm86phystk) @@ -833,7 +841,12 @@ map_read_write: /* Map proc0's UPAGES in the physical way ... */ movl R(p0upa), %eax - movl $UPAGES, %ecx + movl $(UAREA_PAGES), %ecx + fillkptphys($PG_RW) + +/* Map proc0's KSTACK in the physical way ... */ + movl R(p0kpa), %eax + movl $(KSTACK_PAGES), %ecx fillkptphys($PG_RW) /* Map ISA hole */ |