svn commit: r285171 - head/sys/arm64/arm64
Andrew Turner
andrew at FreeBSD.org
Sun Jul 5 18:16:07 UTC 2015
Author: andrew
Date: Sun Jul 5 18:16:06 2015
New Revision: 285171
URL: https://svnweb.freebsd.org/changeset/base/285171
Log:
Add the kernel functions needed to enable threading.
Sponsored by: ABT Systems Ltd
Modified:
head/sys/arm64/arm64/vm_machdep.c
Modified: head/sys/arm64/arm64/vm_machdep.c
==============================================================================
--- head/sys/arm64/arm64/vm_machdep.c Sun Jul 5 16:48:40 2015 (r285170)
+++ head/sys/arm64/arm64/vm_machdep.c Sun Jul 5 18:16:06 2015 (r285171)
@@ -184,15 +184,25 @@ void
cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg,
stack_t *stack)
{
+ struct trapframe *tf = td->td_frame;
- panic("cpu_set_upcall_kse");
+ tf->tf_sp = STACKALIGN(stack->ss_sp + stack->ss_size);
+ tf->tf_elr = (register_t)entry;
+ tf->tf_x[0] = (register_t)arg;
}
int
cpu_set_user_tls(struct thread *td, void *tls_base)
{
+ struct pcb *pcb;
- panic("cpu_set_user_tls");
+ if ((uintptr_t)tls_base >= VM_MAXUSER_ADDRESS)
+ return (EINVAL);
+
+ pcb = td->td_pcb;
+ pcb->pcb_tpidr_el0 = (register_t)tls_base;
+
+ return (0);
}
void
More information about the svn-src-all
mailing list