diff options
author | marcel <marcel@FreeBSD.org> | 2003-06-01 08:29:43 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-06-01 08:29:43 +0000 |
commit | 10b3bd530b2b085894118a8bf0f6785b8b62d3ae (patch) | |
tree | 13cdb87a35d631bb2a00fe59b559d4749315d1bb /sys | |
parent | 94463ac57a2205b26ddd3f8c4e33b76fc62ba575 (diff) | |
download | FreeBSD-src-10b3bd530b2b085894118a8bf0f6785b8b62d3ae.zip FreeBSD-src-10b3bd530b2b085894118a8bf0f6785b8b62d3ae.tar.gz |
Implement cpu_thread_setup(). This is mostly the same as on i386,
except for the fact that trapframes have a size recorded in it
that we set here too. We need this for proper thread setup.
Pointed out by: mtm
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ia64/ia64/vm_machdep.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c index 2822764..960cb39 100644 --- a/sys/ia64/ia64/vm_machdep.c +++ b/sys/ia64/ia64/vm_machdep.c @@ -109,6 +109,14 @@ cpu_thread_clean(struct thread *td) void cpu_thread_setup(struct thread *td) { + intptr_t sp; + + sp = td->td_kstack + KSTACK_PAGES * PAGE_SIZE; + sp -= sizeof(struct pcb); + td->td_pcb = (struct pcb *)sp; + sp -= sizeof(struct trapframe); + td->td_frame = (struct trapframe *)sp; + td->td_frame->tf_length = sizeof(struct trapframe); } void |