diff options
author | Olivier Houchard <cognet@FreeBSD.org> | 2004-11-20 16:51:32 +0000 |
---|---|---|
committer | Olivier Houchard <cognet@FreeBSD.org> | 2004-11-20 16:51:32 +0000 |
commit | 579d53f4cfba80bbe4ba86f7f49f68decca75d04 (patch) | |
tree | cca168ceb753103e6d06a8b771e9935b4e5458a4 /sys/arm | |
parent | e6f9d4b6de04b2eb2d4498ba7e021a6449cbb7d5 (diff) | |
download | src-579d53f4cfba80bbe4ba86f7f49f68decca75d04.tar.gz src-579d53f4cfba80bbe4ba86f7f49f68decca75d04.zip |
Get the kernel stack right now that the u-area is gone.
Notes
Notes:
svn path=/head/; revision=137939
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/arm/vm_machdep.c | 5 | ||||
-rw-r--r-- | sys/arm/include/param.h | 2 | ||||
-rw-r--r-- | sys/arm/sa11x0/assabet_machdep.c | 3 | ||||
-rw-r--r-- | sys/arm/xscale/i80321/iq31244_machdep.c | 3 |
4 files changed, 7 insertions, 6 deletions
diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c index 481f72c10ead..4e37463ac07a 100644 --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -145,7 +145,6 @@ cpu_fork(register struct thread *td1, register struct proc *p2, struct trapframe *tf; struct switchframe *sf; struct mdproc *mdp2; - vm_offset_t uarea = td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE; pcb1 = td1->td_pcb; pcb2 = (struct pcb *)(td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1; @@ -156,8 +155,8 @@ cpu_fork(register struct thread *td1, register struct proc *p2, bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); mdp2 = &p2->p_md; bcopy(&td1->td_proc->p_md, mdp2, sizeof(*mdp2)); - pcb2->un_32.pcb32_und_sp = uarea + USPACE_UNDEF_STACK_TOP; - pcb2->un_32.pcb32_sp = uarea + + pcb2->un_32.pcb32_und_sp = td2->td_kstack + USPACE_UNDEF_STACK_TOP; + pcb2->un_32.pcb32_sp = td2->td_kstack + USPACE_SVC_STACK_TOP - sizeof(*pcb2); pmap_activate(td2); td2->td_frame = tf = diff --git a/sys/arm/include/param.h b/sys/arm/include/param.h index 65ea52b8fa18..885f2d2a48c5 100644 --- a/sys/arm/include/param.h +++ b/sys/arm/include/param.h @@ -106,7 +106,7 @@ #define KSTACK_GUARD_PAGES 1 #endif /* !KSTACK_GUARD_PAGES */ -#define USPACE_SVC_STACK_TOP 0 +#define USPACE_SVC_STACK_TOP KSTACK_PAGES * PAGE_SIZE #define USPACE_SVC_STACK_BOTTOM (USPACE_SVC_STACK_TOP - 0x1000) #define USPACE_UNDEF_STACK_TOP (USPACE_SVC_STACK_BOTTOM - 0x10) #define USPACE_UNDEF_STACK_BOTTOM (FPCONTEXTSIZE + 10) diff --git a/sys/arm/sa11x0/assabet_machdep.c b/sys/arm/sa11x0/assabet_machdep.c index 92fc4cba619d..04f637c56035 100644 --- a/sys/arm/sa11x0/assabet_machdep.c +++ b/sys/arm/sa11x0/assabet_machdep.c @@ -417,5 +417,6 @@ initarm(void *arg, void *arg2) init_param2(physmem); kdb_init(); avail_end = 0xc0000000 + 0x02000000 - 1; - return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP)); + return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - + sizeof(struct pcb))); } diff --git a/sys/arm/xscale/i80321/iq31244_machdep.c b/sys/arm/xscale/i80321/iq31244_machdep.c index 4e5833489be9..0bb644aedf79 100644 --- a/sys/arm/xscale/i80321/iq31244_machdep.c +++ b/sys/arm/xscale/i80321/iq31244_machdep.c @@ -432,5 +432,6 @@ initarm(void *arg, void *arg2) init_param2(physmem); avail_end = 0xa0000000 + memsize - 1; kdb_init(); - return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP)); + return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - + sizeof(struct pcb))); } |