xref: /openbmc/qemu/bsd-user/i386/signal.c (revision ae2b5d8381a73b27f35f19c988d45c78bb4d5768)
1f7d5ed61SWarner Losh /*
2f7d5ed61SWarner Losh  *  i386 dependent signal definitions
3f7d5ed61SWarner Losh  *
4f7d5ed61SWarner Losh  *  Copyright (c) 2013 Stacey D. Son
5f7d5ed61SWarner Losh  *
6f7d5ed61SWarner Losh  *  This program is free software; you can redistribute it and/or modify
7f7d5ed61SWarner Losh  *  it under the terms of the GNU General Public License as published by
8f7d5ed61SWarner Losh  *  the Free Software Foundation; either version 2 of the License, or
9f7d5ed61SWarner Losh  *  (at your option) any later version.
10f7d5ed61SWarner Losh  *
11f7d5ed61SWarner Losh  *  This program is distributed in the hope that it will be useful,
12f7d5ed61SWarner Losh  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13f7d5ed61SWarner Losh  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14f7d5ed61SWarner Losh  *  GNU General Public License for more details.
15f7d5ed61SWarner Losh  *
16f7d5ed61SWarner Losh  *  You should have received a copy of the GNU General Public License
17f7d5ed61SWarner Losh  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
18f7d5ed61SWarner Losh  */
19f7d5ed61SWarner Losh 
20*48e438a3SMarkus Armbruster #include "qemu/osdep.h"
21f7d5ed61SWarner Losh #include "qemu.h"
22f7d5ed61SWarner Losh 
23f7d5ed61SWarner Losh /*
24f7d5ed61SWarner Losh  * Compare to i386/i386/machdep.c sendsig()
25f7d5ed61SWarner Losh  * Assumes that target stack frame memory is locked.
26f7d5ed61SWarner Losh  */
set_sigtramp_args(CPUX86State * env,int sig,struct target_sigframe * frame,abi_ulong frame_addr,struct target_sigaction * ka)27f7d5ed61SWarner Losh abi_long set_sigtramp_args(CPUX86State *env, int sig,
28f7d5ed61SWarner Losh                            struct target_sigframe *frame,
29f7d5ed61SWarner Losh                            abi_ulong frame_addr,
30f7d5ed61SWarner Losh                            struct target_sigaction *ka)
31f7d5ed61SWarner Losh {
32f7d5ed61SWarner Losh     /* XXX return -TARGET_EOPNOTSUPP; */
33f7d5ed61SWarner Losh     return 0;
34f7d5ed61SWarner Losh }
35f7d5ed61SWarner Losh 
362373a62aSWarner Losh /*
372373a62aSWarner Losh  * Compare to i386/i386/exec_machdep.c sendsig()
382373a62aSWarner Losh  * Assumes that the memory is locked if frame points to user memory.
392373a62aSWarner Losh  */
setup_sigframe_arch(CPUX86State * env,abi_ulong frame_addr,struct target_sigframe * frame,int flags)402373a62aSWarner Losh abi_long setup_sigframe_arch(CPUX86State *env, abi_ulong frame_addr,
412373a62aSWarner Losh                              struct target_sigframe *frame, int flags)
422373a62aSWarner Losh {
432373a62aSWarner Losh     target_mcontext_t *mcp = &frame->sf_uc.uc_mcontext;
442373a62aSWarner Losh 
452373a62aSWarner Losh     get_mcontext(env, mcp, flags);
462373a62aSWarner Losh     return 0;
472373a62aSWarner Losh }
482373a62aSWarner Losh 
49f7d5ed61SWarner Losh /* Compare to i386/i386/machdep.c get_mcontext() */
get_mcontext(CPUX86State * regs,target_mcontext_t * mcp,int flags)50f7d5ed61SWarner Losh abi_long get_mcontext(CPUX86State *regs, target_mcontext_t *mcp, int flags)
51f7d5ed61SWarner Losh {
52f7d5ed61SWarner Losh     /* XXX */
53f7d5ed61SWarner Losh     return -TARGET_EOPNOTSUPP;
54f7d5ed61SWarner Losh }
55f7d5ed61SWarner Losh 
56f7d5ed61SWarner Losh /* Compare to i386/i386/machdep.c set_mcontext() */
set_mcontext(CPUX86State * regs,target_mcontext_t * mcp,int srflag)57f7d5ed61SWarner Losh abi_long set_mcontext(CPUX86State *regs, target_mcontext_t *mcp, int srflag)
58f7d5ed61SWarner Losh {
59f7d5ed61SWarner Losh     /* XXX */
60f7d5ed61SWarner Losh     return -TARGET_EOPNOTSUPP;
61f7d5ed61SWarner Losh }
62f7d5ed61SWarner Losh 
get_ucontext_sigreturn(CPUX86State * regs,abi_ulong target_sf,abi_ulong * target_uc)63f7d5ed61SWarner Losh abi_long get_ucontext_sigreturn(CPUX86State *regs, abi_ulong target_sf,
64f7d5ed61SWarner Losh                                 abi_ulong *target_uc)
65f7d5ed61SWarner Losh {
66f7d5ed61SWarner Losh     /* XXX */
67f7d5ed61SWarner Losh     *target_uc = 0;
68f7d5ed61SWarner Losh     return -TARGET_EOPNOTSUPP;
69f7d5ed61SWarner Losh }
70