From 35f406aafbc0c7c3690f144e4597a8eb796ba14c Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Fri, 1 Sep 2006 06:05:40 +0000 Subject: [PATCH] In cpu_set_user_tls(), properly set the thread pointer. It is 0x7000 bytes after the end of the TCB, which is itself 8 bytes. --- sys/powerpc/aim/vm_machdep.c | 2 +- sys/powerpc/powerpc/vm_machdep.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c index cf6a4358d69..0f4ac46486c 100644 --- a/sys/powerpc/aim/vm_machdep.c +++ b/sys/powerpc/aim/vm_machdep.c @@ -358,6 +358,6 @@ int cpu_set_user_tls(struct thread *td, void *tls_base) { - td->td_frame->fixreg[2] = (register_t)tls_base; + td->td_frame->fixreg[2] = (register_t)tls_base + 0x7008; return (0); } diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c index cf6a4358d69..0f4ac46486c 100644 --- a/sys/powerpc/powerpc/vm_machdep.c +++ b/sys/powerpc/powerpc/vm_machdep.c @@ -358,6 +358,6 @@ int cpu_set_user_tls(struct thread *td, void *tls_base) { - td->td_frame->fixreg[2] = (register_t)tls_base; + td->td_frame->fixreg[2] = (register_t)tls_base + 0x7008; return (0); }