Changeset View
Changeset View
Standalone View
Standalone View
head/sys/powerpc/powerpc/exec_machdep.c
Show First 20 Lines • Show All 949 Lines • ▼ Show 20 Lines | cpu_set_user_tls(struct thread *td, void *tls_base) | ||||
if (SV_PROC_FLAG(td->td_proc, SV_LP64)) | if (SV_PROC_FLAG(td->td_proc, SV_LP64)) | ||||
td->td_frame->fixreg[13] = (register_t)tls_base + 0x7010; | td->td_frame->fixreg[13] = (register_t)tls_base + 0x7010; | ||||
else | else | ||||
td->td_frame->fixreg[2] = (register_t)tls_base + 0x7008; | td->td_frame->fixreg[2] = (register_t)tls_base + 0x7008; | ||||
return (0); | return (0); | ||||
} | } | ||||
void | void | ||||
cpu_set_upcall(struct thread *td, struct thread *td0) | cpu_copy_thread(struct thread *td, struct thread *td0) | ||||
{ | { | ||||
struct pcb *pcb2; | struct pcb *pcb2; | ||||
struct trapframe *tf; | struct trapframe *tf; | ||||
struct callframe *cf; | struct callframe *cf; | ||||
pcb2 = td->td_pcb; | pcb2 = td->td_pcb; | ||||
/* Copy the upcall pcb */ | /* Copy the upcall pcb */ | ||||
Show All 24 Lines | cpu_copy_thread(struct thread *td, struct thread *td0) | ||||
pcb2->pcb_cpu.aim.usr_vsid = 0; | pcb2->pcb_cpu.aim.usr_vsid = 0; | ||||
/* Setup to release spin count in fork_exit(). */ | /* Setup to release spin count in fork_exit(). */ | ||||
td->td_md.md_spinlock_count = 1; | td->td_md.md_spinlock_count = 1; | ||||
td->td_md.md_saved_msr = PSL_KERNSET; | td->td_md.md_saved_msr = PSL_KERNSET; | ||||
} | } | ||||
void | void | ||||
cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, | cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, | ||||
stack_t *stack) | stack_t *stack) | ||||
{ | { | ||||
struct trapframe *tf; | struct trapframe *tf; | ||||
uintptr_t sp; | uintptr_t sp; | ||||
tf = td->td_frame; | tf = td->td_frame; | ||||
/* align stack and alloc space for frame ptr and saved LR */ | /* align stack and alloc space for frame ptr and saved LR */ | ||||
#ifdef __powerpc64__ | #ifdef __powerpc64__ | ||||
sp = ((uintptr_t)stack->ss_sp + stack->ss_size - 48) & | sp = ((uintptr_t)stack->ss_sp + stack->ss_size - 48) & | ||||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |