root / linux-user / ppc / syscall.h @ d2d979c6
History | View | Annotate | Download (1.8 kB)
1 | 79aceca5 | bellard | /*
|
---|---|---|---|
2 | 79aceca5 | bellard | * PPC emulation for qemu: syscall definitions.
|
3 | 5fafdf24 | ths | *
|
4 | 79aceca5 | bellard | * Copyright (c) 2003 Jocelyn Mayer
|
5 | 79aceca5 | bellard | *
|
6 | 79aceca5 | bellard | * This library is free software; you can redistribute it and/or
|
7 | 79aceca5 | bellard | * modify it under the terms of the GNU Lesser General Public
|
8 | 79aceca5 | bellard | * License as published by the Free Software Foundation; either
|
9 | 79aceca5 | bellard | * version 2 of the License, or (at your option) any later version.
|
10 | 79aceca5 | bellard | *
|
11 | 79aceca5 | bellard | * This library is distributed in the hope that it will be useful,
|
12 | 79aceca5 | bellard | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | 79aceca5 | bellard | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 | 79aceca5 | bellard | * Lesser General Public License for more details.
|
15 | 79aceca5 | bellard | *
|
16 | 79aceca5 | bellard | * You should have received a copy of the GNU Lesser General Public
|
17 | 8167ee88 | Blue Swirl | * License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
18 | 79aceca5 | bellard | */
|
19 | 79aceca5 | bellard | |
20 | 79aceca5 | bellard | /* XXX: ABSOLUTELY BUGGY:
|
21 | 79aceca5 | bellard | * for now, this is quite just a cut-and-paste from i386 target...
|
22 | 79aceca5 | bellard | */
|
23 | 79aceca5 | bellard | |
24 | 79aceca5 | bellard | /* default linux values for the selectors */
|
25 | 79aceca5 | bellard | #define __USER_DS (1) |
26 | 79aceca5 | bellard | |
27 | 79aceca5 | bellard | struct target_pt_regs {
|
28 | e32448e0 | j_mayer | abi_ulong gpr[32];
|
29 | e32448e0 | j_mayer | abi_ulong nip; |
30 | e32448e0 | j_mayer | abi_ulong msr; |
31 | e32448e0 | j_mayer | abi_ulong orig_gpr3; /* Used for restarting system calls */
|
32 | e32448e0 | j_mayer | abi_ulong ctr; |
33 | e32448e0 | j_mayer | abi_ulong link; |
34 | e32448e0 | j_mayer | abi_ulong xer; |
35 | e32448e0 | j_mayer | abi_ulong ccr; |
36 | e32448e0 | j_mayer | #if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
|
37 | e32448e0 | j_mayer | abi_ulong softe; |
38 | e32448e0 | j_mayer | #else
|
39 | e32448e0 | j_mayer | abi_ulong mq; /* 601 only (not used at present) */
|
40 | e32448e0 | j_mayer | #endif
|
41 | 79aceca5 | bellard | /* Used on APUS to hold IPL value. */
|
42 | e32448e0 | j_mayer | abi_ulong trap; /* Reason for being here */
|
43 | e32448e0 | j_mayer | abi_ulong dar; /* Fault registers */
|
44 | e32448e0 | j_mayer | abi_ulong dsisr; |
45 | e32448e0 | j_mayer | abi_ulong result; /* Result of a system call */
|
46 | 79aceca5 | bellard | }; |
47 | 79aceca5 | bellard | |
48 | 79aceca5 | bellard | /* ioctls */
|
49 | 79aceca5 | bellard | struct target_revectored_struct {
|
50 | 992f48a0 | blueswir1 | abi_ulong __map[8]; /* 256 bits */ |
51 | 79aceca5 | bellard | }; |
52 | 79aceca5 | bellard | |
53 | bcd4933a | Nathan Froyd | /* Nasty hack: define a fake errno value for use by sigreturn. */
|
54 | bcd4933a | Nathan Froyd | #define TARGET_QEMU_ESIGRETURN 255 |
55 | bcd4933a | Nathan Froyd | |
56 | 79aceca5 | bellard | /*
|
57 | 79aceca5 | bellard | * flags masks
|
58 | 79aceca5 | bellard | */
|
59 | 79aceca5 | bellard | |
60 | f85e9a68 | j_mayer | #if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
|
61 | f85e9a68 | j_mayer | #define UNAME_MACHINE "ppc64" |
62 | f85e9a68 | j_mayer | #else
|
63 | cf720db3 | bellard | #define UNAME_MACHINE "ppc" |
64 | f85e9a68 | j_mayer | #endif |