vm_machdep.c (fdafd315ad0d0f28a11b9fb4476a9ab059c62b92) vm_machdep.c (7b68fb5ab2a276ccd081cc1a43cebf0fb315e952)
1/*-
2 * SPDX-License-Identifier: BSD-4-Clause
3 *
4 * Copyright (c) 1982, 1986 The Regents of the University of California.
5 * Copyright (c) 1989, 1990 William Jolitz
6 * Copyright (c) 1994 John Dyson
7 * All rights reserved.
8 *

--- 210 unchanged lines hidden (view full) ---

219 td->td_md.md_spinlock_count = 1;
220 td->td_md.md_saved_cspr = PSR_SVC32_MODE;
221}
222
223/*
224 * Set that machine state for performing an upcall that starts
225 * the entry function with the given argument.
226 */
1/*-
2 * SPDX-License-Identifier: BSD-4-Clause
3 *
4 * Copyright (c) 1982, 1986 The Regents of the University of California.
5 * Copyright (c) 1989, 1990 William Jolitz
6 * Copyright (c) 1994 John Dyson
7 * All rights reserved.
8 *

--- 210 unchanged lines hidden (view full) ---

219 td->td_md.md_spinlock_count = 1;
220 td->td_md.md_saved_cspr = PSR_SVC32_MODE;
221}
222
223/*
224 * Set that machine state for performing an upcall that starts
225 * the entry function with the given argument.
226 */
227void
227int
228cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg,
229 stack_t *stack)
230{
231 struct trapframe *tf = td->td_frame;
232
233 tf->tf_usr_sp = STACKALIGN((int)stack->ss_sp + stack->ss_size);
234 tf->tf_pc = (int)entry;
235 tf->tf_r0 = (int)arg;
236 tf->tf_spsr = PSR_USR32_MODE;
237 if ((register_t)entry & 1)
238 tf->tf_spsr |= PSR_T;
228cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg,
229 stack_t *stack)
230{
231 struct trapframe *tf = td->td_frame;
232
233 tf->tf_usr_sp = STACKALIGN((int)stack->ss_sp + stack->ss_size);
234 tf->tf_pc = (int)entry;
235 tf->tf_r0 = (int)arg;
236 tf->tf_spsr = PSR_USR32_MODE;
237 if ((register_t)entry & 1)
238 tf->tf_spsr |= PSR_T;
239 return (0);
239}
240
241int
242cpu_set_user_tls(struct thread *td, void *tls_base)
243{
244
245 td->td_pcb->pcb_regs.sf_tpidrurw = (register_t)tls_base;
246 if (td == curthread)

--- 69 unchanged lines hidden ---
240}
241
242int
243cpu_set_user_tls(struct thread *td, void *tls_base)
244{
245
246 td->td_pcb->pcb_regs.sf_tpidrurw = (register_t)tls_base;
247 if (td == curthread)

--- 69 unchanged lines hidden ---