Statistics
| Branch: | Revision:

root / linux-user / mips / syscall.h @ 44dc0ca3

History | View | Annotate | Download (9.4 kB)

1 048f6b4d bellard
2 048f6b4d bellard
/* this struct defines the way the registers are stored on the
3 048f6b4d bellard
   stack during a system call. */
4 048f6b4d bellard
5 048f6b4d bellard
struct target_pt_regs {
6 048f6b4d bellard
        /* Pad bytes for argument save space on the stack. */
7 992f48a0 blueswir1
        abi_ulong pad0[6];
8 048f6b4d bellard
9 048f6b4d bellard
        /* Saved main processor registers. */
10 992f48a0 blueswir1
        abi_ulong regs[32];
11 048f6b4d bellard
12 048f6b4d bellard
        /* Saved special registers. */
13 992f48a0 blueswir1
        abi_ulong cp0_status;
14 992f48a0 blueswir1
        abi_ulong lo;
15 992f48a0 blueswir1
        abi_ulong hi;
16 992f48a0 blueswir1
        abi_ulong cp0_badvaddr;
17 992f48a0 blueswir1
        abi_ulong cp0_cause;
18 992f48a0 blueswir1
        abi_ulong cp0_epc;
19 048f6b4d bellard
};
20 048f6b4d bellard
21 637947f1 ths
/* Target errno definitions taken from asm-mips/errno.h */
22 637947f1 ths
#undef TARGET_ENOMSG
23 637947f1 ths
#define TARGET_ENOMSG          35      /* Identifier removed */
24 637947f1 ths
#undef TARGET_EIDRM
25 637947f1 ths
#define TARGET_EIDRM           36      /* Identifier removed */
26 637947f1 ths
#undef TARGET_ECHRNG
27 637947f1 ths
#define TARGET_ECHRNG          37      /* Channel number out of range */
28 637947f1 ths
#undef TARGET_EL2NSYNC
29 637947f1 ths
#define TARGET_EL2NSYNC        38      /* Level 2 not synchronized */
30 637947f1 ths
#undef TARGET_EL3HLT
31 637947f1 ths
#define TARGET_EL3HLT          39      /* Level 3 halted */
32 637947f1 ths
#undef TARGET_EL3RST
33 637947f1 ths
#define TARGET_EL3RST          40      /* Level 3 reset */
34 637947f1 ths
#undef TARGET_ELNRNG
35 637947f1 ths
#define TARGET_ELNRNG          41      /* Link number out of range */
36 637947f1 ths
#undef TARGET_EUNATCH
37 637947f1 ths
#define TARGET_EUNATCH         42      /* Protocol driver not attached */
38 637947f1 ths
#undef TARGET_ENOCSI
39 637947f1 ths
#define TARGET_ENOCSI          43      /* No CSI structure available */
40 637947f1 ths
#undef TARGET_EL2HLT
41 637947f1 ths
#define TARGET_EL2HLT          44      /* Level 2 halted */
42 637947f1 ths
#undef TARGET_EDEADLK
43 637947f1 ths
#define TARGET_EDEADLK         45      /* Resource deadlock would occur */
44 637947f1 ths
#undef TARGET_ENOLCK
45 637947f1 ths
#define TARGET_ENOLCK          46      /* No record locks available */
46 637947f1 ths
#undef TARGET_EBADE
47 637947f1 ths
#define TARGET_EBADE           50      /* Invalid exchange */
48 637947f1 ths
#undef TARGET_EBADR
49 637947f1 ths
#define TARGET_EBADR           51      /* Invalid request descriptor */
50 637947f1 ths
#undef TARGET_EXFULL
51 637947f1 ths
#define TARGET_EXFULL          52      /* TARGET_Exchange full */
52 637947f1 ths
#undef TARGET_ENOANO
53 637947f1 ths
#define TARGET_ENOANO          53      /* No anode */
54 637947f1 ths
#undef TARGET_EBADRQC
55 637947f1 ths
#define TARGET_EBADRQC         54      /* Invalid request code */
56 637947f1 ths
#undef TARGET_EBADSLT
57 637947f1 ths
#define TARGET_EBADSLT         55      /* Invalid slot */
58 637947f1 ths
#undef TARGET_EDEADLOCK
59 637947f1 ths
#define TARGET_EDEADLOCK       56      /* File locking deadlock error */
60 637947f1 ths
#undef TARGET_EBFONT
61 637947f1 ths
#define TARGET_EBFONT          59      /* Bad font file format */
62 637947f1 ths
#undef TARGET_ENOSTR
63 637947f1 ths
#define TARGET_ENOSTR          60      /* Device not a stream */
64 637947f1 ths
#undef TARGET_ENODATA
65 637947f1 ths
#define TARGET_ENODATA         61      /* No data available */
66 637947f1 ths
#undef TARGET_ETIME
67 637947f1 ths
#define TARGET_ETIME           62      /* Timer expired */
68 637947f1 ths
#undef TARGET_ENOSR
69 637947f1 ths
#define TARGET_ENOSR           63      /* Out of streams resources */
70 637947f1 ths
#undef TARGET_ENONET
71 637947f1 ths
#define TARGET_ENONET          64      /* Machine is not on the network */
72 637947f1 ths
#undef TARGET_ENOPKG
73 637947f1 ths
#define TARGET_ENOPKG          65      /* Package not installed */
74 637947f1 ths
#undef TARGET_EREMOTE
75 637947f1 ths
#define TARGET_EREMOTE         66      /* Object is remote */
76 637947f1 ths
#undef TARGET_ENOLINK
77 637947f1 ths
#define TARGET_ENOLINK         67      /* Link has been severed */
78 637947f1 ths
#undef TARGET_EADV
79 637947f1 ths
#define TARGET_EADV            68      /* Advertise error */
80 637947f1 ths
#undef TARGET_ESRMNT
81 637947f1 ths
#define TARGET_ESRMNT          69      /* Srmount error */
82 637947f1 ths
#undef TARGET_ECOMM
83 637947f1 ths
#define TARGET_ECOMM           70      /* Communication error on send */
84 637947f1 ths
#undef TARGET_EPROTO
85 637947f1 ths
#define TARGET_EPROTO          71      /* Protocol error */
86 637947f1 ths
#undef TARGET_EDOTDOT
87 637947f1 ths
#define TARGET_EDOTDOT         73      /* RFS specific error */
88 637947f1 ths
#undef TARGET_EMULTIHOP
89 637947f1 ths
#define TARGET_EMULTIHOP       74      /* Multihop attempted */
90 637947f1 ths
#undef TARGET_EBADMSG
91 637947f1 ths
#define TARGET_EBADMSG         77      /* Not a data message */
92 637947f1 ths
#undef TARGET_ENAMETOOLONG
93 637947f1 ths
#define TARGET_ENAMETOOLONG    78      /* File name too long */
94 637947f1 ths
#undef TARGET_EOVERFLOW
95 637947f1 ths
#define TARGET_EOVERFLOW       79      /* Value too large for defined data type */
96 637947f1 ths
#undef TARGET_ENOTUNIQ
97 637947f1 ths
#define TARGET_ENOTUNIQ        80      /* Name not unique on network */
98 637947f1 ths
#undef TARGET_EBADFD
99 637947f1 ths
#define TARGET_EBADFD          81      /* File descriptor in bad state */
100 637947f1 ths
#undef TARGET_EREMCHG
101 637947f1 ths
#define TARGET_EREMCHG         82      /* Remote address changed */
102 637947f1 ths
#undef TARGET_ELIBACC
103 637947f1 ths
#define TARGET_ELIBACC         83      /* Can not access a needed shared library */
104 637947f1 ths
#undef TARGET_ELIBBAD
105 637947f1 ths
#define TARGET_ELIBBAD         84      /* Accessing a corrupted shared library */
106 637947f1 ths
#undef TARGET_ELIBSCN
107 637947f1 ths
#define TARGET_ELIBSCN         85      /* .lib section in a.out corrupted */
108 637947f1 ths
#undef TARGET_ELIBMAX
109 637947f1 ths
#define TARGET_ELIBMAX         86      /* Attempting to link in too many shared libraries */
110 637947f1 ths
#undef TARGET_ELIBEXEC
111 637947f1 ths
#define TARGET_ELIBEXEC        87      /* Cannot exec a shared library directly */
112 637947f1 ths
#undef TARGET_EILSEQ
113 637947f1 ths
#define TARGET_EILSEQ          88      /* Illegal byte sequence */
114 637947f1 ths
#undef TARGET_ENOSYS
115 637947f1 ths
#define TARGET_ENOSYS          89      /* Function not implemented */
116 637947f1 ths
#undef TARGET_ELOOP
117 637947f1 ths
#define TARGET_ELOOP           90      /* Too many symbolic links encountered */
118 637947f1 ths
#undef TARGET_ERESTART
119 637947f1 ths
#define TARGET_ERESTART        91      /* Interrupted system call should be restarted */
120 637947f1 ths
#undef TARGET_ESTRPIPE
121 637947f1 ths
#define TARGET_ESTRPIPE        92      /* Streams pipe error */
122 637947f1 ths
#undef TARGET_ENOTEMPTY
123 637947f1 ths
#define TARGET_ENOTEMPTY       93      /* Directory not empty */
124 637947f1 ths
#undef TARGET_EUSERS
125 637947f1 ths
#define TARGET_EUSERS          94      /* Too many users */
126 637947f1 ths
#undef TARGET_ENOTSOCK
127 637947f1 ths
#define TARGET_ENOTSOCK        95      /* Socket operation on non-socket */
128 637947f1 ths
#undef TARGET_EDESTADDRREQ
129 637947f1 ths
#define TARGET_EDESTADDRREQ    96      /* Destination address required */
130 637947f1 ths
#undef TARGET_EMSGSIZE
131 637947f1 ths
#define TARGET_EMSGSIZE        97      /* Message too long */
132 637947f1 ths
#undef TARGET_EPROTOTYPE
133 637947f1 ths
#define TARGET_EPROTOTYPE      98      /* Protocol wrong type for socket */
134 637947f1 ths
#undef TARGET_ENOPROTOOPT
135 637947f1 ths
#define TARGET_ENOPROTOOPT     99      /* Protocol not available */
136 637947f1 ths
#undef TARGET_EPROTONOSUPPORT
137 637947f1 ths
#define TARGET_EPROTONOSUPPORT 120     /* Protocol not supported */
138 637947f1 ths
#undef TARGET_ESOCKTNOSUPPORT
139 637947f1 ths
#define TARGET_ESOCKTNOSUPPORT 121     /* Socket type not supported */
140 637947f1 ths
#undef TARGET_EOPNOTSUPP
141 637947f1 ths
#define TARGET_EOPNOTSUPP      122     /* Operation not supported on transport endpoint */
142 637947f1 ths
#undef TARGET_EPFNOSUPPORT
143 637947f1 ths
#define TARGET_EPFNOSUPPORT    123     /* Protocol family not supported */
144 637947f1 ths
#undef TARGET_EAFNOSUPPORT
145 637947f1 ths
#define TARGET_EAFNOSUPPORT    124     /* Address family not supported by protocol */
146 637947f1 ths
#undef TARGET_EADDRINUSE
147 637947f1 ths
#define TARGET_EADDRINUSE      125     /* Address already in use */
148 637947f1 ths
#undef TARGET_EADDRNOTAVAIL
149 637947f1 ths
#define TARGET_EADDRNOTAVAIL   126     /* Cannot assign requested address */
150 637947f1 ths
#undef TARGET_ENETDOWN
151 637947f1 ths
#define TARGET_ENETDOWN        127     /* Network is down */
152 637947f1 ths
#undef TARGET_ENETUNREACH
153 637947f1 ths
#define TARGET_ENETUNREACH     128     /* Network is unreachable */
154 637947f1 ths
#undef TARGET_ENETRESET
155 637947f1 ths
#define TARGET_ENETRESET       129     /* Network dropped connection because of reset */
156 637947f1 ths
#undef TARGET_ECONNABORTED
157 637947f1 ths
#define TARGET_ECONNABORTED    130     /* Software caused connection abort */
158 637947f1 ths
#undef TARGET_ECONNRESET
159 637947f1 ths
#define TARGET_ECONNRESET      131     /* Connection reset by peer */
160 637947f1 ths
#undef TARGET_ENOBUFS
161 637947f1 ths
#define TARGET_ENOBUFS         132     /* No buffer space available */
162 637947f1 ths
#undef TARGET_EISCONN
163 637947f1 ths
#define TARGET_EISCONN         133     /* Transport endpoint is already connected */
164 637947f1 ths
#undef TARGET_ENOTCONN
165 637947f1 ths
#define TARGET_ENOTCONN        134     /* Transport endpoint is not connected */
166 637947f1 ths
#undef TARGET_EUCLEAN
167 637947f1 ths
#define TARGET_EUCLEAN         135     /* Structure needs cleaning */
168 637947f1 ths
#undef TARGET_ENOTNAM
169 637947f1 ths
#define TARGET_ENOTNAM         137     /* Not a XENIX named type file */
170 637947f1 ths
#undef TARGET_ENAVAIL
171 637947f1 ths
#define TARGET_ENAVAIL         138     /* No XENIX semaphores available */
172 637947f1 ths
#undef TARGET_EISNAM
173 637947f1 ths
#define TARGET_EISNAM          139     /* Is a named type file */
174 637947f1 ths
#undef TARGET_EREMOTEIO
175 637947f1 ths
#define TARGET_EREMOTEIO       140     /* Remote I/O error */
176 637947f1 ths
#undef TARGET_EINIT
177 637947f1 ths
#define TARGET_EINIT           141     /* Reserved */
178 637947f1 ths
#undef TARGET_EREMDEV
179 637947f1 ths
#define TARGET_EREMDEV         142     /* TARGET_Error 142 */
180 637947f1 ths
#undef TARGET_ESHUTDOWN
181 637947f1 ths
#define TARGET_ESHUTDOWN       143     /* Cannot send after transport endpoint shutdown */
182 637947f1 ths
#undef TARGET_ETOOMANYREFS
183 637947f1 ths
#define TARGET_ETOOMANYREFS    144     /* Too many references: cannot splice */
184 637947f1 ths
#undef TARGET_ETIMEDOUT
185 637947f1 ths
#define TARGET_ETIMEDOUT       145     /* Connection timed out */
186 637947f1 ths
#undef TARGET_ECONNREFUSED
187 637947f1 ths
#define TARGET_ECONNREFUSED    146     /* Connection refused */
188 637947f1 ths
#undef TARGET_EHOSTDOWN
189 637947f1 ths
#define TARGET_EHOSTDOWN       147     /* Host is down */
190 637947f1 ths
#undef TARGET_EHOSTUNREACH
191 637947f1 ths
#define TARGET_EHOSTUNREACH    148     /* No route to host */
192 637947f1 ths
#undef TARGET_EALREADY
193 637947f1 ths
#define TARGET_EALREADY        149     /* Operation already in progress */
194 637947f1 ths
#undef TARGET_EINPROGRESS
195 637947f1 ths
#define TARGET_EINPROGRESS     150     /* Operation now in progress */
196 637947f1 ths
#undef TARGET_ESTALE
197 637947f1 ths
#define TARGET_ESTALE          151     /* Stale NFS file handle */
198 637947f1 ths
#undef TARGET_ECANCELED
199 637947f1 ths
#define TARGET_ECANCELED       158     /* AIO operation canceled */
200 637947f1 ths
/*
201 637947f1 ths
 * These error are Linux extensions.
202 637947f1 ths
 */
203 637947f1 ths
#undef TARGET_ENOMEDIUM
204 637947f1 ths
#define TARGET_ENOMEDIUM       159     /* No medium found */
205 637947f1 ths
#undef TARGET_EMEDIUMTYPE
206 637947f1 ths
#define TARGET_EMEDIUMTYPE     160     /* Wrong medium type */
207 637947f1 ths
#undef TARGET_ENOKEY
208 637947f1 ths
#define TARGET_ENOKEY          161     /* Required key not available */
209 637947f1 ths
#undef TARGET_EKEYEXPIRED
210 637947f1 ths
#define TARGET_EKEYEXPIRED     162     /* Key has expired */
211 637947f1 ths
#undef TARGET_EKEYREVOKED
212 637947f1 ths
#define TARGET_EKEYREVOKED     163     /* Key has been revoked */
213 637947f1 ths
#undef TARGET_EKEYREJECTED
214 637947f1 ths
#define TARGET_EKEYREJECTED    164     /* Key was rejected by service */
215 637947f1 ths
216 637947f1 ths
/* for robust mutexes */
217 637947f1 ths
#undef TARGET_EOWNERDEAD
218 637947f1 ths
#define TARGET_EOWNERDEAD      165     /* Owner died */
219 637947f1 ths
#undef TARGET_ENOTRECOVERABLE
220 637947f1 ths
#define TARGET_ENOTRECOVERABLE 166     /* State not recoverable */
221 637947f1 ths
222 637947f1 ths
223 637947f1 ths
224 0b1bcb00 pbrook
/* Nasty hack: define a fake errno value for use by sigreturn.  */
225 0b1bcb00 pbrook
#define TARGET_QEMU_ESIGRETURN 255
226 0b1bcb00 pbrook
227 048f6b4d bellard
#define UNAME_MACHINE "mips"