summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/vm_machdep.c8
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
OpenPOWER on IntegriCloud