machdep.h revision 1.7 1 1.7 reinoud /* $NetBSD: machdep.h,v 1.7 2012/01/03 10:53:46 reinoud Exp $ */
2 1.1 reinoud
3 1.1 reinoud /*-
4 1.1 reinoud * Copyright (c) 2011 Reinoud Zandijk <reinoud (at) netbsd.org>
5 1.1 reinoud * All rights reserved.
6 1.1 reinoud *
7 1.1 reinoud * Redistribution and use in source and binary forms, with or without
8 1.1 reinoud * modification, are permitted provided that the following conditions
9 1.1 reinoud * are met:
10 1.1 reinoud * 1. Redistributions of source code must retain the above copyright
11 1.1 reinoud * notice, this list of conditions and the following disclaimer.
12 1.1 reinoud * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 reinoud * notice, this list of conditions and the following disclaimer in the
14 1.1 reinoud * documentation and/or other materials provided with the distribution.
15 1.1 reinoud *
16 1.1 reinoud * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
17 1.1 reinoud * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18 1.1 reinoud * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 1.1 reinoud * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20 1.1 reinoud * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 1.1 reinoud * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 1.1 reinoud * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 1.1 reinoud * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 1.1 reinoud * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 1.1 reinoud * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 1.1 reinoud * POSSIBILITY OF SUCH DAMAGE.
27 1.1 reinoud */
28 1.1 reinoud
29 1.6 reinoud int md_syscall_check_opcode(ucontext_t *ucp);
30 1.4 reinoud void md_syscall_get_opcode(ucontext_t *ucp, uint32_t *opcode);
31 1.2 reinoud void md_syscall_get_syscallnumber(ucontext_t *ucp, uint32_t *code);
32 1.2 reinoud int md_syscall_getargs(lwp_t *l, ucontext_t *ucp, int nargs, int argsize,
33 1.2 reinoud register_t *args);
34 1.3 reinoud void md_syscall_set_returnargs(lwp_t *l, ucontext_t *ucp,
35 1.3 reinoud int error, register_t *rval);
36 1.4 reinoud void md_syscall_inc_pc(ucontext_t *ucp, uint32_t opcode);
37 1.4 reinoud void md_syscall_dec_pc(ucontext_t *ucp, uint32_t opcode);
38 1.7 reinoud register_t md_get_pc(ucontext_t *ucp);
39 1.2 reinoud
40 1.4 reinoud /* handlers */
41 1.1 reinoud void syscall(void);
42 1.4 reinoud void pagefault(void);
43 1.1 reinoud
44 1.5 jmcneill /* signal stack */
45 1.5 jmcneill stack_t *usermode_signal_stack(void);
46