Lines Matching +full:sync +full:- +full:token

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
82 if (rtas == -1) { in rtas_setup()
99 * that can fit into a 32-bit address space and accessed from real mode. in rtas_setup()
102 * It must be 4KB-aligned and not cross a 256 MB boundary. in rtas_setup()
105 OF_getencprop(rtas, "rtas-size", &rtas_size, sizeof(rtas_size)); in rtas_setup()
117 * Instantiate RTAS. We always use the 32-bit version. in rtas_setup()
120 if (OF_hasprop(rtas, "linux,rtas-entry") && in rtas_setup()
121 OF_hasprop(rtas, "linux,rtas-base")) { in rtas_setup()
122 OF_getencprop(rtas, "linux,rtas-base", &rtas_ptr, in rtas_setup()
125 OF_getencprop(rtas, "linux,rtas-entry", &rtas_ptr, in rtas_setup()
136 result = OF_call_method("instantiate-rtas", rtasi, 1, 1, in rtas_setup()
162 rtas_bounce_offset += sizeof(register_t) - in rtas_real_map()
189 memcpy(buf, rtas_bounce_virt + (physaddr - rtas_bounce_phys), len); in rtas_real_unmap()
199 /* Call an RTAS method by token */
201 rtas_call_method(cell_t token, int nargs, int nreturns, ...) in rtas_call_method() argument
207 cell_t token; in rtas_call_method() member
215 return (-1); in rtas_call_method()
217 args.token = htobe32(token); in rtas_call_method()
232 __asm __volatile ("sync; isync"); in rtas_call_method()
233 oldfaultbuf = curthread->td_pcb->pcb_onfault; in rtas_call_method()
234 curthread->td_pcb->pcb_onfault = &env; in rtas_call_method()
236 __asm __volatile ("sync"); in rtas_call_method()
238 __asm __volatile ("sync; isync"); in rtas_call_method()
242 curthread->td_pcb->pcb_onfault = oldfaultbuf; in rtas_call_method()
243 __asm __volatile ("sync"); in rtas_call_method()
256 /* Look up an RTAS token */
260 cell_t token; in rtas_token_lookup() local
263 return (-1); in rtas_token_lookup()
265 if (OF_getencprop(rtas, method, &token, sizeof(token)) == -1) in rtas_token_lookup()
266 return (-1); in rtas_token_lookup()
268 return (token); in rtas_token_lookup()