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