Statistics
| Branch: | Revision:

root / linux-user / mips / syscall.h @ b9a02bed

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