vki-mips64-linux.h 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047
  1. /*--------------------------------------------------------------------*/
  2. /*--- mips/Linux-specific kernel interface. vki-mips64-linux.h ---*/
  3. /*--------------------------------------------------------------------*/
  4. /*
  5. This file is part of Valgrind, a dynamic binary instrumentation
  6. framework.
  7. Copyright (C) 2010-2017 RT-RK
  8. mips-valgrind@rt-rk.com
  9. This program is free software; you can redistribute it and/or
  10. modify it under the terms of the GNU General Public License as
  11. published by the Free Software Foundation; either version 2 of the
  12. License, or (at your option) any later version.
  13. This program is distributed in the hope that it will be useful, but
  14. WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. General Public License for more details.
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  20. 02111-1307, USA.
  21. */
  22. #ifndef __VKI_MIPS64_LINUX_H
  23. #define __VKI_MIPS64_LINUX_H
  24. #include <config.h>
  25. // mips endian
  26. #if defined (_MIPSEL)
  27. #define VKI_LITTLE_ENDIAN 1
  28. #elif defined (_MIPSEB)
  29. #define VKI_BIG_ENDIAN 1
  30. #endif
  31. //----------------------------------------------------------------------
  32. // From linux-2.6.35.9/include/asm-mips/cachectl.h
  33. //----------------------------------------------------------------------
  34. #define VKI_ICACHE (1<<0) /* flush instruction cache */
  35. #define VKI_DCACHE (1<<1) /* writeback and flush data cache */
  36. #define VKI_BCACHE (VKI_ICACHE | VKI_DCACHE) /* flush both caches */
  37. //----------------------------------------------------------------------
  38. // From linux-2.6.35.9/include/mips-mips/types.h
  39. //----------------------------------------------------------------------
  40. typedef __signed__ char __vki_s8;
  41. typedef unsigned char __vki_u8;
  42. typedef __signed__ short __vki_s16;
  43. typedef unsigned short __vki_u16;
  44. typedef __signed__ int __vki_s32;
  45. typedef unsigned int __vki_u32;
  46. typedef __signed char vki_s8;
  47. typedef unsigned char vki_u8;
  48. typedef __signed short vki_s16;
  49. typedef unsigned short vki_u16;
  50. typedef __signed int vki_s32;
  51. typedef unsigned int vki_u32;
  52. #if (_MIPS_SZLONG == 64)
  53. typedef __signed__ long __vki_s64;
  54. typedef unsigned long __vki_u64;
  55. #else
  56. typedef __signed__ long long __vki_s64;
  57. typedef unsigned long long __vki_u64;
  58. #endif
  59. //----------------------------------------------------------------------
  60. // From linux-2.6.35.9/include/asm-mips/page.h
  61. //----------------------------------------------------------------------
  62. /* MIPS64 uses runtime pagesize detection */
  63. extern UWord VKI_PAGE_SHIFT;
  64. extern UWord VKI_PAGE_SIZE;
  65. #define VKI_PAGE_MASK (~(VKI_PAGE_SIZE-1))
  66. #define VKI_MAX_PAGE_SHIFT 16
  67. #define VKI_MAX_PAGE_SIZE (1UL << VKI_MAX_PAGE_SHIFT)
  68. //----------------------------------------------------------------------
  69. // From linux-2.6.35.9/arch/mips/include/bits/shm.h
  70. //----------------------------------------------------------------------
  71. #define VKI_SHMLBA 0x40000
  72. //----------------------------------------------------------------------
  73. // From linux-2.6.35.9/include/asm-mips/signal.h
  74. //----------------------------------------------------------------------
  75. #define VKI_MINSIGSTKSZ 2048
  76. #define VKI_SIG_BLOCK 1 /* for blocking signals */
  77. #define VKI_SIG_UNBLOCK 2 /* for unblocking signals */
  78. #define VKI_SIG_SETMASK 3 /* for setting the signal mask */
  79. /* Type of a signal handler. */
  80. typedef void __vki_signalfn_t(int);
  81. typedef __vki_signalfn_t __user *__vki_sighandler_t;
  82. typedef void __vki_restorefn_t(void);
  83. typedef __vki_restorefn_t __user *__vki_sigrestore_t;
  84. #define VKI_SIG_DFL ((__vki_sighandler_t)0) /* default signal handling */
  85. #define VKI_SIG_IGN ((__vki_sighandler_t)1) /* ignore signal */
  86. #define VKI_SIG_ERR ((__vki_sighandler_t)-1) /* error return from signal */
  87. #define _VKI_NSIG 128
  88. #define _VKI_NSIG_BPW (__SIZEOF_LONG__ * 8)
  89. #define _VKI_NSIG_WORDS (_VKI_NSIG / _VKI_NSIG_BPW)
  90. typedef unsigned long vki_old_sigset_t; /* at least 32 bits */
  91. typedef struct {
  92. unsigned long sig[_VKI_NSIG_WORDS];
  93. } vki_sigset_t;
  94. #define VKI_SIGHUP 1 /* Hangup (POSIX). */
  95. #define VKI_SIGINT 2 /* Interrupt (ANSI). */
  96. #define VKI_SIGQUIT 3 /* Quit (POSIX). */
  97. #define VKI_SIGILL 4 /* Illegal instruction (ANSI). */
  98. #define VKI_SIGTRAP 5 /* Trace trap (POSIX). */
  99. #define VKI_SIGIOT 6 /* IOT trap (4.2 BSD). */
  100. #define VKI_SIGABRT VKI_SIGIOT /* Abort (ANSI). */
  101. #define VKI_SIGEMT 7
  102. #define VKI_SIGFPE 8 /* Floating-point exception (ANSI). */
  103. #define VKI_SIGKILL 9 /* Kill, unblockable (POSIX). */
  104. #define VKI_SIGBUS 10 /* BUS error (4.2 BSD). */
  105. #define VKI_SIGSEGV 11 /* Segmentation violation (ANSI). */
  106. #define VKI_SIGSYS 12
  107. #define VKI_SIGPIPE 13 /* Broken pipe (POSIX). */
  108. #define VKI_SIGALRM 14 /* Alarm clock (POSIX). */
  109. #define VKI_SIGTERM 15 /* Termination (ANSI). */
  110. #define VKI_SIGUSR1 16 /* User-defined signal 1 (POSIX). */
  111. #define VKI_SIGUSR2 17 /* User-defined signal 2 (POSIX). */
  112. #define VKI_SIGCHLD 18 /* Child status has changed (POSIX). */
  113. #define VKI_SIGCLD VKI_SIGCHLD /* Same as SIGCHLD (System V). */
  114. #define VKI_SIGPWR 19 /* Power failure restart (System V). */
  115. #define VKI_SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
  116. #define VKI_SIGURG 21 /* Urgent condition on socket. */
  117. #define VKI_SIGIO 22 /* I/O now possible (4.2 BSD). */
  118. #define VKI_SIGPOLL VKI_SIGIO /* Pollable event occurred (System V).*/
  119. #define VKI_SIGSTOP 23 /* Stop, unblockable (POSIX). */
  120. #define VKI_SIGTSTP 24 /* Keyboard stop (POSIX). */
  121. #define VKI_SIGCONT 25 /* Continue (POSIX). */
  122. #define VKI_SIGTTIN 26 /* Background read from tty (POSIX). */
  123. #define VKI_SIGTTOU 27 /* Background write to tty (POSIX). */
  124. #define VKI_SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */
  125. #define VKI_SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */
  126. #define VKI_SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */
  127. #define VKI_SIGXFSZ 31 /* File size limit exceeded (4.2 BSD).*/
  128. /* These should not be considered constants from userland. */
  129. #define VKI_SIGRTMIN 32
  130. // [[This was (_NSIG-1) in 2.4.X... not sure if it matters.]]
  131. #define VKI_SIGRTMAX (_VKI_NSIG - 1)
  132. #define VKI_SA_ONSTACK 0x08000000u
  133. #define VKI_SA_RESETHAND 0x80000000u
  134. #define VKI_SA_RESTART 0x10000000u
  135. #define VKI_SA_SIGINFO 0x00000008u
  136. #define VKI_SA_NODEFER 0x40000000u
  137. #define VKI_SA_NOCLDWAIT 0x00010000u
  138. #define VKI_SA_NOCLDSTOP 0x00000001u
  139. #define VKI_SA_NOMASK VKI_SA_NODEFER
  140. #define VKI_SA_ONESHOT VKI_SA_RESETHAND
  141. //#define VKI_SA_INTERRUPT 0x20000000 /* dummy -- ignored */
  142. #define VKI_SA_RESTORER 0x04000000
  143. #define VKI_SS_ONSTACK 1
  144. #define VKI_SS_DISABLE 2
  145. struct vki_old_sigaction {
  146. // [[Nb: a 'k' prefix is added to "sa_handler" because
  147. // bits/sigaction.h (which gets dragged in somehow via signal.h)
  148. // #defines it as something else. Since that is done for glibc's
  149. // purposes, which we don't care about here, we use our own name.]]
  150. unsigned long sa_flags;
  151. __vki_sighandler_t ksa_handler;
  152. vki_old_sigset_t sa_mask;
  153. __vki_sigrestore_t sa_restorer;
  154. };
  155. struct vki_sigaction {
  156. unsigned int sa_flags;
  157. __vki_sighandler_t sa_handler;
  158. vki_sigset_t sa_mask;
  159. };
  160. struct vki_sigaction_base {
  161. // [[See comment about extra 'k' above]]
  162. unsigned int sa_flags;
  163. __vki_sighandler_t ksa_handler;
  164. vki_sigset_t sa_mask; // mask last for extensibility
  165. __vki_sigrestore_t sa_restorer;
  166. };
  167. /* On Linux we use the same type for passing sigactions to
  168. and from the kernel. Hence: */
  169. typedef struct vki_sigaction_base vki_sigaction_toK_t;
  170. typedef struct vki_sigaction_base vki_sigaction_fromK_t;
  171. typedef struct vki_sigaltstack {
  172. void __user *ss_sp;
  173. vki_size_t ss_size;
  174. int ss_flags;
  175. } vki_stack_t;
  176. //----------------------------------------------------------------------
  177. // From linux-2.6.35.9/include/asm-mips/sigcontext.h
  178. //----------------------------------------------------------------------
  179. struct _vki_fpreg {
  180. unsigned short significand[4];
  181. unsigned short exponent;
  182. };
  183. struct _vki_fpxreg {
  184. unsigned short significand[4];
  185. unsigned short exponent;
  186. unsigned short padding[3];
  187. };
  188. struct _vki_xmmreg {
  189. unsigned long element[4];
  190. };
  191. struct _vki_fpstate {
  192. /* Regular FPU environment */
  193. unsigned long cw;
  194. unsigned long sw;
  195. unsigned long tag;
  196. unsigned long ipoff;
  197. unsigned long cssel;
  198. unsigned long dataoff;
  199. unsigned long datasel;
  200. struct _vki_fpreg _st[8];
  201. unsigned short status;
  202. unsigned short magic; /* 0xffff = regular FPU data only */
  203. /* FXSR FPU environment */
  204. unsigned long _fxsr_env[6]; /* FXSR FPU env is ignored */
  205. unsigned long mxcsr;
  206. unsigned long reserved;
  207. struct _vki_fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */
  208. struct _vki_xmmreg _xmm[8];
  209. unsigned long padding[56];
  210. };
  211. //----------------------------------------------------------------------
  212. // From linux-2.6.35.9/include/asm-mips/sigcontext.h
  213. //----------------------------------------------------------------------
  214. struct vki_sigcontext {
  215. __vki_u64 sc_regs[32];
  216. __vki_u64 sc_fpregs[32];
  217. __vki_u64 sc_mdhi;
  218. __vki_u64 sc_hi1;
  219. __vki_u64 sc_hi2;
  220. __vki_u64 sc_hi3;
  221. __vki_u64 sc_mdlo;
  222. __vki_u64 sc_lo1;
  223. __vki_u64 sc_lo2;
  224. __vki_u64 sc_lo3;
  225. __vki_u64 sc_pc;
  226. __vki_u64 sc_fpc_csr;
  227. __vki_u64 sc_used_math;
  228. __vki_u64 sc_dsp;
  229. __vki_u64 sc_reserved;
  230. };
  231. //----------------------------------------------------------------------
  232. // From linux-2.6.35.9/include/asm-mips/mman.h
  233. //----------------------------------------------------------------------
  234. #define VKI_PROT_NONE 0x0 /* No page permissions */
  235. #define VKI_PROT_READ 0x1 /* page can be read */
  236. #define VKI_PROT_WRITE 0x2 /* page can be written */
  237. #define VKI_PROT_EXEC 0x4 /* page can be executed */
  238. #define VKI_PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start
  239. of growsdown vma */
  240. #define VKI_PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end
  241. of growsup vma */
  242. #define VKI_MAP_SHARED 0x001 /* Share changes */
  243. #define VKI_MAP_PRIVATE 0x002 /* Changes are private */
  244. //#define VKI_MAP_TYPE 0x0f /* Mask for type of mapping */
  245. #define VKI_MAP_FIXED 0x010 /* Interpret addr exactly */
  246. #define VKI_MAP_NORESERVE 0x0400 /* don't reserve swap pages */
  247. /* These are linux-specific */
  248. #define VKI_MAP_NORESERVE 0x0400 /* don't check for reservations */
  249. #define VKI_MAP_ANONYMOUS 0x0800 /* don't use a file */
  250. #define VKI_MAP_GROWSDOWN 0x1000 /* stack-like segment */
  251. #define VKI_MAP_DENYWRITE 0x2000 /* ETXTBSY */
  252. #define VKI_MAP_EXECUTABLE 0x4000 /* mark it as an executable */
  253. #define VKI_MAP_LOCKED 0x8000 /* pages are locked */
  254. #define VKI_MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
  255. #define VKI_MAP_NONBLOCK 0x20000 /* do not block on IO */
  256. //----------------------------------------------------------------------
  257. // From linux-2.6.35.9/include/asm-mips/fcntl.h
  258. //----------------------------------------------------------------------
  259. #define VKI_O_RDONLY 00
  260. #define VKI_O_WRONLY 01
  261. #define VKI_O_RDWR 02
  262. #define VKI_O_ACCMODE 03
  263. #define VKI_O_CREAT 0x0100 /* not fcntl */
  264. #define VKI_O_EXCL 0x0400 /* not fcntl */
  265. #define VKI_O_TRUNC 0x0200 /* not fcntl */
  266. #define VKI_O_APPEND 0x0008
  267. #define VKI_O_NONBLOCK 0x0080
  268. #define VKI_O_LARGEFILE 0x2000
  269. #define VKI_AT_FDCWD -100
  270. #define VKI_F_DUPFD 0 /* dup */
  271. #define VKI_F_GETFD 1 /* get close_on_exec */
  272. #define VKI_F_SETFD 2 /* set/clear close_on_exec */
  273. #define VKI_F_GETFL 3 /* get file->f_flags */
  274. #define VKI_F_SETFL 4 /* set file->f_flags */
  275. #define VKI_F_GETLK 14
  276. #define VKI_F_SETLK 6
  277. #define VKI_F_SETLKW 7
  278. #define VKI_F_SETOWN 24 /* for sockets. */
  279. #define VKI_F_GETOWN 23 /* for sockets. */
  280. #define VKI_F_SETSIG 10 /* for sockets. */
  281. #define VKI_F_GETSIG 11 /* for sockets. */
  282. #define VKI_F_SETOWN_EX 15
  283. #define VKI_F_GETOWN_EX 16
  284. #define VKI_F_OFD_GETLK 36
  285. #define VKI_F_OFD_SETLK 37
  286. #define VKI_F_OFD_SETLKW 38
  287. #define VKI_F_GETLK64 33 /* using 'struct flock64' */
  288. #define VKI_F_SETLK64 34
  289. #define VKI_F_SETLKW64 35
  290. /* for F_[GET|SET]FL */
  291. #define VKI_FD_CLOEXEC 1 /* actually anything with low bit set goes */
  292. #define VKI_F_LINUX_SPECIFIC_BASE 1024
  293. struct vki_f_owner_ex {
  294. int type;
  295. __vki_kernel_pid_t pid;
  296. };
  297. //----------------------------------------------------------------------
  298. // From linux-2.6.35.9/include/asm-mips/resource.h
  299. //----------------------------------------------------------------------
  300. #define VKI_RLIMIT_DATA 2 /* max data size */
  301. #define VKI_RLIMIT_STACK 3 /* max stack size */
  302. #define VKI_RLIMIT_CORE 4 /* max core file size */
  303. #define VKI_RLIMIT_NOFILE 5 /* max number of open files */
  304. //----------------------------------------------------------------------
  305. // From linux-2.6.35.9/include/asm-mips/socket.h
  306. //----------------------------------------------------------------------
  307. #define VKI_SOL_SOCKET 0xffff
  308. #define VKI_SO_TYPE 0x1008
  309. #define VKI_SO_ATTACH_FILTER 26
  310. //----------------------------------------------------------------------
  311. // From linux-2.6.35.9/include/asm-i386/sockios.h
  312. //----------------------------------------------------------------------
  313. #define VKI_SIOCATMARK _VKI_IOR('s', 7, int)
  314. #define VKI_SIOCSPGRP _VKI_IOW('s', 8, vki_pid_t)
  315. #define VKI_SIOCGPGRP _VKI_IOR('s', 9, vki_pid_t)
  316. #define VKI_SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
  317. #define VKI_SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
  318. //----------------------------------------------------------------------
  319. // From linux-2.6.35.9/include/asm-mips/stat.h
  320. //----------------------------------------------------------------------
  321. /* Size of kernel long is different from Valgrind MIPS n32 long size, so we have to
  322. use long long instead long type. */
  323. struct vki_stat {
  324. unsigned int st_dev;
  325. unsigned int st_pad0[3]; /* Reserved for st_dev expansion */
  326. #if defined(VGABI_N32)
  327. unsigned long long st_ino;
  328. #else
  329. unsigned long st_ino;
  330. #endif
  331. int st_mode;
  332. unsigned int st_nlink;
  333. unsigned int st_uid;
  334. unsigned int st_gid;
  335. unsigned int st_rdev;
  336. unsigned int st_pad1[3]; /* Reserved for st_rdev expansion */
  337. #if defined(VGABI_N32)
  338. long long st_size;
  339. #else
  340. long st_size;
  341. #endif
  342. /*
  343. * Actually this should be timestruc_t st_atime, st_mtime and st_ctime
  344. * but we don't have it under Linux.
  345. */
  346. unsigned int st_atime;
  347. unsigned int st_atime_nsec; /* Reserved for st_atime expansion */
  348. unsigned int st_mtime;
  349. unsigned int st_mtime_nsec; /* Reserved for st_mtime expansion */
  350. unsigned int st_ctime;
  351. unsigned int st_ctime_nsec; /* Reserved for st_ctime expansion */
  352. unsigned int st_blksize;
  353. unsigned int st_pad2;
  354. long long st_blocks;
  355. };
  356. struct vki_stat64 {
  357. unsigned long st_dev;
  358. unsigned long st_pad0[3]; /* Reserved for st_dev expansion */
  359. unsigned long long st_ino;
  360. int st_mode;
  361. unsigned int st_nlink;
  362. unsigned int st_uid;
  363. unsigned int st_gid;
  364. unsigned long st_rdev;
  365. unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */
  366. long long st_size;
  367. /*
  368. * Actually this should be timestruc_t st_atime, st_mtime and st_ctime
  369. * but we don't have it under Linux.
  370. */
  371. unsigned long st_atime;
  372. unsigned long st_atime_nsec; /* Reserved for st_atime expansion */
  373. unsigned long st_mtime;
  374. unsigned long st_mtime_nsec; /* Reserved for st_mtime expansion */
  375. unsigned long st_ctime;
  376. unsigned long st_ctime_nsec; /* Reserved for st_ctime expansion */
  377. unsigned long st_blksize;
  378. unsigned long st_pad2;
  379. long long st_blocks;
  380. };
  381. //----------------------------------------------------------------------
  382. // From linux-2.6.35.9/include/asm-mips/statfs.h
  383. //----------------------------------------------------------------------
  384. struct vki_statfs {
  385. __vki_u32 f_type;
  386. #define f_fstyp f_type
  387. __vki_u32 f_bsize;
  388. __vki_u32 f_frsize;
  389. __vki_u32 f_blocks;
  390. __vki_u32 f_bfree;
  391. __vki_u32 f_files;
  392. __vki_u32 f_ffree;
  393. __vki_u32 f_bavail;
  394. __vki_kernel_fsid_t f_fsid;
  395. __vki_u32 f_namelen;
  396. __vki_u32 f_spare[6];
  397. };
  398. //----------------------------------------------------------------------
  399. // From linux-2.6.35.9/include/asm-mips/termios.h
  400. //----------------------------------------------------------------------
  401. struct vki_winsize {
  402. unsigned short ws_row;
  403. unsigned short ws_col;
  404. unsigned short ws_xpixel;
  405. unsigned short ws_ypixel;
  406. };
  407. #define NCC 8
  408. #define NCCS 23
  409. struct vki_termio {
  410. unsigned short c_iflag; /* input mode flags */
  411. unsigned short c_oflag; /* output mode flags */
  412. unsigned short c_cflag; /* control mode flags */
  413. unsigned short c_lflag; /* local mode flags */
  414. char c_line; /* line discipline */
  415. unsigned char c_cc[NCCS]; /* control characters */
  416. };
  417. //----------------------------------------------------------------------
  418. // From linux-2.6.35.9/include/asm-mips/termbits.h
  419. //----------------------------------------------------------------------
  420. typedef unsigned char vki_cc_t;
  421. typedef unsigned long vki_speed_t;
  422. typedef unsigned long vki_tcflag_t;
  423. struct vki_termios {
  424. vki_tcflag_t c_iflag; /* input mode flags */
  425. vki_tcflag_t c_oflag; /* output mode flags */
  426. vki_tcflag_t c_cflag; /* control mode flags */
  427. vki_tcflag_t c_lflag; /* local mode flags */
  428. vki_cc_t c_line; /* line discipline */
  429. vki_cc_t c_cc[NCCS]; /* control characters */
  430. };
  431. //----------------------------------------------------------------------
  432. // From linux-2.6.35.9/include/asm-mips/ioctl.h
  433. //----------------------------------------------------------------------
  434. #define _VKI_IOC_NRBITS 8
  435. #define _VKI_IOC_TYPEBITS 8
  436. #define _VKI_IOC_SIZEBITS 13
  437. #define _VKI_IOC_DIRBITS 3
  438. #define _VKI_IOC_NRMASK ((1 << _VKI_IOC_NRBITS)-1)
  439. #define _VKI_IOC_TYPEMASK ((1 << _VKI_IOC_TYPEBITS)-1)
  440. #define _VKI_IOC_SIZEMASK ((1 << _VKI_IOC_SIZEBITS)-1)
  441. #define _VKI_IOC_DIRMASK ((1 << _VKI_IOC_DIRBITS)-1)
  442. #define _VKI_IOC_NRSHIFT 0
  443. #define _VKI_IOC_TYPESHIFT (_VKI_IOC_NRSHIFT+_VKI_IOC_NRBITS)
  444. #define _VKI_IOC_SIZESHIFT (_VKI_IOC_TYPESHIFT+_VKI_IOC_TYPEBITS)
  445. #define _VKI_IOC_DIRSHIFT (_VKI_IOC_SIZESHIFT+_VKI_IOC_SIZEBITS)
  446. #define _VKI_IOC_NONE 1U
  447. #define _VKI_IOC_READ 2U
  448. #define _VKI_IOC_WRITE 4U
  449. #define _VKI_IOC(dir,type,nr,size) \
  450. (((dir) << _VKI_IOC_DIRSHIFT) | \
  451. ((type) << _VKI_IOC_TYPESHIFT) | \
  452. ((nr) << _VKI_IOC_NRSHIFT) | \
  453. ((size) << _VKI_IOC_SIZESHIFT))
  454. /* provoke compile error for invalid uses of size argument */
  455. extern unsigned int __VKI_invalid_size_argument_for_IOC;
  456. /* used to create numbers */
  457. #define _VKI_IO(type,nr) _VKI_IOC(_VKI_IOC_NONE,(type),(nr),0)
  458. #define _VKI_IOR(type,nr,size) _VKI_IOC(_VKI_IOC_READ,(type),(nr), \
  459. (_VKI_IOC_TYPECHECK(size)))
  460. #define _VKI_IOW(type,nr,size) _VKI_IOC(_VKI_IOC_WRITE,(type),(nr), \
  461. (_VKI_IOC_TYPECHECK(size)))
  462. #define _VKI_IOWR(type,nr,size) _VKI_IOC(_VKI_IOC_READ|_VKI_IOC_WRITE,(type), \
  463. (nr),(_VKI_IOC_TYPECHECK(size)))
  464. /* used to decode ioctl numbers.. */
  465. #define _VKI_IOC_DIR(nr) (((nr) >> _VKI_IOC_DIRSHIFT) & _VKI_IOC_DIRMASK)
  466. #define _VKI_IOC_TYPE(nr) (((nr) >> _VKI_IOC_TYPESHIFT) & _VKI_IOC_TYPEMASK)
  467. #define _VKI_IOC_NR(nr) (((nr) >> _VKI_IOC_NRSHIFT) & _VKI_IOC_NRMASK)
  468. #define _VKI_IOC_SIZE(nr) (((nr) >> _VKI_IOC_SIZESHIFT) & _VKI_IOC_SIZEMASK)
  469. //----------------------------------------------------------------------
  470. // From linux-2.6.35.9/include/asm-mips/ioctls.h
  471. //----------------------------------------------------------------------
  472. #define VKI_TCGETA 0x5401
  473. #define VKI_TCSETA 0x5402 /* Clashes with SNDCTL_TMR_START
  474. sound ioctl */
  475. #define VKI_TCSETAW 0x5403
  476. #define VKI_TCSETAF 0x5404
  477. #define VKI_TCSBRK 0x5405
  478. #define VKI_TCXONC 0x5406
  479. #define VKI_TCFLSH 0x5407
  480. #define VKI_TCGETS 0x540d
  481. #define VKI_TCSETS 0x540e
  482. #define VKI_TCSETSW 0x540f
  483. #define VKI_TCSETSF 0x5410
  484. #define VKI_TIOCEXCL 0x740d /* set exclusive use of tty */
  485. #define VKI_TIOCNXCL 0x740e /* reset exclusive use of tty */
  486. #define VKI_TIOCOUTQ 0x7472 /* output queue size */
  487. #define VKI_TIOCSTI 0x5472 /* simulate terminal input */
  488. #define VKI_TIOCMGET 0x741d /* get all modem bits */
  489. #define VKI_TIOCMBIS 0x741b /* bis modem bits */
  490. #define VKI_TIOCMBIC 0x741c /* bic modem bits */
  491. #define VKI_TIOCMSET 0x741a /* set all modem bits */
  492. #define VKI_TIOCPKT 0x5470 /* pty: set/clear packet mode */
  493. #define VKI_TIOCPKT_DATA 0x00 /* data packet */
  494. #define VKI_TIOCPKT_FLUSHREAD 0x01 /* flush packet */
  495. #define VKI_TIOCPKT_FLUSHWRITE 0x02 /* flush packet */
  496. #define VKI_TIOCPKT_STOP 0x04 /* stop output */
  497. #define VKI_TIOCPKT_START 0x08 /* start output */
  498. #define VKI_TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */
  499. #define VKI_TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */
  500. /* set window size */
  501. #define VKI_TIOCSWINSZ _VKI_IOW('t', 103, struct vki_winsize)
  502. /* get window size */
  503. #define VKI_TIOCGWINSZ _VKI_IOR('t', 104, struct vki_winsize)
  504. #define VKI_TIOCNOTTY 0x5471 /* void tty association */
  505. #define VKI_TIOCSETD 0x7401
  506. #define VKI_TIOCGETD 0x7400
  507. #define VKI_FIOCLEX 0x6601
  508. #define VKI_FIONCLEX 0x6602
  509. #define VKI_FIOASYNC 0x667d
  510. #define VKI_FIONBIO 0x667e
  511. #define VKI_FIOQSIZE 0x667f
  512. #define VKI_TIOCGLTC 0x7474 /* get special local chars */
  513. #define VKI_TIOCSLTC 0x7475 /* set special local chars */
  514. #define VKI_TIOCSPGRP _VKI_IOW('t', 118, int) /* set pgrp of tty */
  515. #define VKI_TIOCGPGRP _VKI_IOR('t', 119, int) /* get pgrp of tty */
  516. #define VKI_TIOCCONS _VKI_IOW('t', 120, int) /* become virtual
  517. console */
  518. #define VKI_FIONREAD 0x467f
  519. #define VKI_TIOCINQ FIONREAD
  520. #define VKI_TIOCGETP 0x7408
  521. #define VKI_TIOCSETP 0x7409
  522. #define VKI_TIOCSETN 0x740a /* TIOCSETP wo flush */
  523. #define VKI_TIOCSBRK 0x5427 /* BSD compatibility */
  524. #define VKI_TIOCCBRK 0x5428 /* BSD compatibility */
  525. #define VKI_TIOCGSID 0x7416 /* Return the session ID of FD */
  526. #define VKI_TIOCGPTN _VKI_IOR('T',0x30, unsigned int) /* Get Pty
  527. Number (of pty-mux device) */
  528. #define VKI_TIOCSPTLCK _VKI_IOW('T',0x31, int) /* Lock/unlock Pty */
  529. /* I hope the range from 0x5480 on is free ... */
  530. #define VKI_TIOCSCTTY 0x5480 /* become controlling tty */
  531. #define VKI_TIOCGSOFTCAR 0x5481
  532. #define VKI_TIOCSSOFTCAR 0x5482
  533. #define VKI_TIOCLINUX 0x5483
  534. #define VKI_TIOCGSERIAL 0x5484
  535. #define VKI_TIOCSSERIAL 0x5485
  536. #define VKI_TCSBRKP 0x5486 /* Needed for POSIX tcsendbreak() */
  537. #define VKI_TIOCSERCONFIG 0x5488
  538. #define VKI_TIOCSERGWILD 0x5489
  539. #define VKI_TIOCSERSWILD 0x548a
  540. #define VKI_TIOCGLCKTRMIOS 0x548b
  541. #define VKI_TIOCSLCKTRMIOS 0x548c
  542. #define VKI_TIOCSERGSTRUCT 0x548d /* For debugging only */
  543. #define VKI_TIOCSERGETLSR 0x548e /* Get line status register */
  544. #define VKI_TIOCSERGETMULTI 0x548f /* Get multiport config */
  545. #define VKI_TIOCSERSETMULTI 0x5490 /* Set multiport config */
  546. #define VKI_TIOCMIWAIT 0x5491 /* wait for a change on serial input
  547. line(s) */
  548. #define VKI_TIOCGICOUNT 0x5492 /* read serial port inline interrupt
  549. counts */
  550. #define VKI_TIOCGHAYESESP 0x5493 /* Get Hayes ESP configuration */
  551. #define VKI_TIOCSHAYESESP 0x5494 /* Set Hayes ESP configuration */
  552. //----------------------------------------------------------------------
  553. // From asm-generic/poll.h
  554. //----------------------------------------------------------------------
  555. /* These are specified by iBCS2 */
  556. #define VKI_POLLIN 0x0001
  557. struct vki_pollfd {
  558. int fd;
  559. short events;
  560. short revents;
  561. };
  562. //----------------------------------------------------------------------
  563. // From linux-2.6.35.9/include/asm-mips/elf.h
  564. //----------------------------------------------------------------------
  565. #define VKI_ELF_NGREG 45 /* includes nip, msr, lr, etc. */
  566. #define VKI_ELF_NFPREG 33 /* includes fpscr */
  567. typedef unsigned long vki_elf_greg_t;
  568. typedef vki_elf_greg_t vki_elf_gregset_t[VKI_ELF_NGREG];
  569. typedef double vki_elf_fpreg_t;
  570. typedef vki_elf_fpreg_t vki_elf_fpregset_t[VKI_ELF_NFPREG];
  571. typedef struct vki_user_fxsr_struct vki_elf_fpxregset_t;
  572. #define VKI_AT_SYSINFO 32
  573. //----------------------------------------------------------------------
  574. // From linux-2.6.35.9/include/asm-mips/ucontext.h
  575. //----------------------------------------------------------------------
  576. struct vki_ucontext {
  577. unsigned long uc_flags;
  578. struct vki_ucontext *uc_link;
  579. vki_stack_t uc_stack;
  580. struct vki_sigcontext uc_mcontext;
  581. vki_sigset_t uc_sigmask; /* mask last for extensibility */
  582. };
  583. typedef char vki_modify_ldt_t;
  584. //----------------------------------------------------------------------
  585. // From linux-2.6.35.9/include/asm-mips/ipcbuf.h
  586. //----------------------------------------------------------------------
  587. struct vki_ipc64_perm {
  588. __vki_kernel_key_t key;
  589. __vki_kernel_uid_t uid;
  590. __vki_kernel_gid_t gid;
  591. __vki_kernel_uid_t cuid;
  592. __vki_kernel_gid_t cgid;
  593. __vki_kernel_mode_t mode;
  594. unsigned short seq;
  595. unsigned short __pad1;
  596. unsigned long __unused1;
  597. unsigned long __unused2;
  598. };
  599. //----------------------------------------------------------------------
  600. // From linux-2.6.35.9/include/asm-mips/sembuf.h
  601. //----------------------------------------------------------------------
  602. struct vki_semid64_ds {
  603. struct vki_ipc64_perm sem_perm; /* permissions .. see ipc.h */
  604. __vki_kernel_time_t sem_otime; /* last semop time */
  605. __vki_kernel_time_t sem_ctime; /* last change time */
  606. unsigned long sem_nsems; /* no. of semaphores in array */
  607. unsigned long __unused1;
  608. unsigned long __unused2;
  609. };
  610. //----------------------------------------------------------------------
  611. // From linux-2.6.35.9/include/asm-mips/msgbuf.h
  612. //----------------------------------------------------------------------
  613. struct vki_msqid64_ds {
  614. struct vki_ipc64_perm msg_perm;
  615. __vki_kernel_time_t msg_stime; /* last msgsnd time */
  616. __vki_kernel_time_t msg_rtime; /* last msgrcv time */
  617. __vki_kernel_time_t msg_ctime; /* last change time */
  618. unsigned long msg_cbytes; /* current number of bytes on queue */
  619. unsigned long msg_qnum; /* number of messages in queue */
  620. unsigned long msg_qbytes; /* max number of bytes on queue */
  621. __vki_kernel_pid_t msg_lspid; /* pid of last msgsnd */
  622. __vki_kernel_pid_t msg_lrpid; /* last receive pid */
  623. unsigned long __unused4;
  624. unsigned long __unused5;
  625. };
  626. //----------------------------------------------------------------------
  627. // From linux-2.6.35.9/include/asm-mips/ipc.h
  628. //----------------------------------------------------------------------
  629. struct vki_ipc_kludge {
  630. struct vki_msgbuf __user *msgp;
  631. long msgtyp;
  632. };
  633. #define VKI_SEMOP 1
  634. #define VKI_SEMGET 2
  635. #define VKI_SEMCTL 3
  636. #define VKI_SEMTIMEDOP 4
  637. #define VKI_MSGSND 11
  638. #define VKI_MSGRCV 12
  639. #define VKI_MSGGET 13
  640. #define VKI_MSGCTL 14
  641. #define VKI_SHMAT 21
  642. #define VKI_SHMDT 22
  643. #define VKI_SHMGET 23
  644. #define VKI_SHMCTL 24
  645. //----------------------------------------------------------------------
  646. // From linux-2.6.35.9/include/asm-mips/shmbuf.h
  647. //----------------------------------------------------------------------
  648. struct vki_shmid64_ds {
  649. struct vki_ipc64_perm shm_perm; /* operation perms */
  650. vki_size_t shm_segsz; /* size of segment (bytes) */
  651. __vki_kernel_time_t shm_atime; /* last attach time */
  652. __vki_kernel_time_t shm_dtime; /* last detach time */
  653. __vki_kernel_time_t shm_ctime; /* last change time */
  654. __vki_kernel_pid_t shm_cpid; /* pid of creator */
  655. __vki_kernel_pid_t shm_lpid; /* pid of last operator */
  656. unsigned long shm_nattch; /* no. of current attaches */
  657. unsigned long __unused1;
  658. unsigned long __unused2;
  659. };
  660. struct vki_shminfo64 {
  661. unsigned long shmmax;
  662. unsigned long shmmin;
  663. unsigned long shmmni;
  664. unsigned long shmseg;
  665. unsigned long shmall;
  666. unsigned long __unused1;
  667. unsigned long __unused2;
  668. unsigned long __unused3;
  669. unsigned long __unused4;
  670. };
  671. //----------------------------------------------------------------------
  672. // From linux-2.6.35.9/include/asm-mips/ptrace.h
  673. //----------------------------------------------------------------------
  674. struct vki_pt_regs {
  675. #ifdef CONFIG_32BIT
  676. /* Pad bytes for argument save space on the stack. */
  677. unsigned long pad0[6];
  678. #endif
  679. /* Saved main processor registers. */
  680. unsigned long regs[32];
  681. /* Saved special registers. */
  682. unsigned long cp0_status;
  683. unsigned long hi;
  684. unsigned long lo;
  685. #ifdef CONFIG_CPU_HAS_SMARTMIPS
  686. unsigned long acx;
  687. #endif
  688. unsigned long cp0_badvaddr;
  689. unsigned long cp0_cause;
  690. unsigned long cp0_epc;
  691. #ifdef CONFIG_MIPS_MT_SMTC
  692. unsigned long cp0_tcstatus;
  693. #endif /* CONFIG_MIPS_MT_SMTC */
  694. #ifdef CONFIG_CPU_CAVIUM_OCTEON
  695. unsigned long long mpl[3]; /* MTM{0,1,2} */
  696. unsigned long long mtp[3]; /* MTP{0,1,2} */
  697. #endif
  698. } __attribute__ ((aligned (8)));
  699. //----------------------------------------------------------------------
  700. // From linux-4.5/arch/mips/include/uapi/asm/reg.h
  701. //----------------------------------------------------------------------
  702. #define VKI_MIPS64_EF_R0 0
  703. #define VKI_MIPS64_EF_R1 1
  704. #define VKI_MIPS64_EF_R2 2
  705. #define VKI_MIPS64_EF_R3 3
  706. #define VKI_MIPS64_EF_R4 4
  707. #define VKI_MIPS64_EF_R5 5
  708. #define VKI_MIPS64_EF_R6 6
  709. #define VKI_MIPS64_EF_R7 7
  710. #define VKI_MIPS64_EF_R8 8
  711. #define VKI_MIPS64_EF_R9 9
  712. #define VKI_MIPS64_EF_R10 10
  713. #define VKI_MIPS64_EF_R11 11
  714. #define VKI_MIPS64_EF_R12 12
  715. #define VKI_MIPS64_EF_R13 13
  716. #define VKI_MIPS64_EF_R14 14
  717. #define VKI_MIPS64_EF_R15 15
  718. #define VKI_MIPS64_EF_R16 16
  719. #define VKI_MIPS64_EF_R17 17
  720. #define VKI_MIPS64_EF_R18 18
  721. #define VKI_MIPS64_EF_R19 19
  722. #define VKI_MIPS64_EF_R20 20
  723. #define VKI_MIPS64_EF_R21 21
  724. #define VKI_MIPS64_EF_R22 22
  725. #define VKI_MIPS64_EF_R23 23
  726. #define VKI_MIPS64_EF_R24 24
  727. #define VKI_MIPS64_EF_R25 25
  728. #define VKI_MIPS64_EF_R26 26
  729. #define VKI_MIPS64_EF_R27 27
  730. #define VKI_MIPS64_EF_R28 28
  731. #define VKI_MIPS64_EF_R29 29
  732. #define VKI_MIPS64_EF_R30 30
  733. #define VKI_MIPS64_EF_R31 31
  734. #define VKI_MIPS64_EF_LO 32
  735. #define VKI_MIPS64_EF_HI 33
  736. #define VKI_MIPS64_EF_CP0_EPC 34
  737. #define VKI_MIPS64_EF_CP0_BADVADDR 35
  738. #define VKI_MIPS64_EF_CP0_STATUS 36
  739. #define VKI_MIPS64_EF_CP0_CAUSE 37
  740. //----------------------------------------------------------------------
  741. // From linux-2.6.35.9/include/asm-i386/ptrace.h
  742. //----------------------------------------------------------------------
  743. #define VKI_PTRACE_GETREGS 12
  744. #define VKI_PTRACE_SETREGS 13
  745. #define VKI_PTRACE_GETFPREGS 14
  746. #define VKI_PTRACE_SETFPREGS 15
  747. #define VKI_PTRACE_GETFPXREGS 18
  748. #define VKI_PTRACE_SETFPXREGS 19
  749. /* Calls to trace a 64bit program from a 32bit program. */
  750. #define VKI_PTRACE_PEEKTEXT_3264 0xc0
  751. #define VKI_PTRACE_PEEKDATA_3264 0xc1
  752. #define VKI_PTRACE_POKETEXT_3264 0xc2
  753. #define VKI_PTRACE_POKEDATA_3264 0xc3
  754. #define VKI_PTRACE_GET_THREAD_AREA_3264 0xc4s
  755. //----------------------------------------------------------------------
  756. // From linux-2.6.35.9/include/asm-generic/siginfo.h
  757. //----------------------------------------------------------------------
  758. #define HAVE_ARCH_SIGINFO_T
  759. typedef union vki_sigval {
  760. int sival_int;
  761. void __user *sival_ptr;
  762. } vki_sigval_t;
  763. #ifndef __VKI_ARCH_SI_PREAMBLE_SIZE
  764. #if defined(VGABI_64)
  765. #define __VKI_ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
  766. #elif defined(VGABI_N32)
  767. #define __VKI_ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
  768. #else
  769. #error unknown mips64 abi
  770. #endif
  771. #endif
  772. #define VKI_SI_MAX_SIZE 128
  773. #ifndef VKI_SI_PAD_SIZE
  774. #define VKI_SI_PAD_SIZE ((VKI_SI_MAX_SIZE - __VKI_ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
  775. #endif
  776. #ifndef __VKI_ARCH_SI_UID_T
  777. #define __VKI_ARCH_SI_UID_T vki_uid_t
  778. #endif
  779. #ifndef __VKI_ARCH_SI_BAND_T
  780. #define __VKI_ARCH_SI_BAND_T long
  781. #endif
  782. typedef struct vki_siginfo {
  783. int si_signo;
  784. int si_code;
  785. int si_errno;
  786. int __pad0[VKI_SI_MAX_SIZE / sizeof(int) - VKI_SI_PAD_SIZE - 3];
  787. union {
  788. int _pad[VKI_SI_PAD_SIZE];
  789. /* kill() */
  790. struct {
  791. vki_pid_t _pid; /* sender's pid */
  792. __VKI_ARCH_SI_UID_T _uid; /* sender's uid */
  793. } _kill;
  794. /* POSIX.1b timers */
  795. struct {
  796. vki_timer_t _tid; /* timer id */
  797. int _overrun; /* overrun count */
  798. char _pad[sizeof( __VKI_ARCH_SI_UID_T) - sizeof(int)];
  799. vki_sigval_t _sigval; /* same as below */
  800. int _sys_private; /* not to be passed to user */
  801. } _timer;
  802. /* POSIX.1b signals */
  803. struct {
  804. vki_pid_t _pid; /* sender's pid */
  805. __VKI_ARCH_SI_UID_T _uid; /* sender's uid */
  806. vki_sigval_t _sigval;
  807. } _rt;
  808. /* SIGCHLD */
  809. struct {
  810. vki_pid_t _pid; /* which child */
  811. __VKI_ARCH_SI_UID_T _uid; /* sender's uid */
  812. int _status; /* exit code */
  813. vki_clock_t _utime;
  814. vki_clock_t _stime;
  815. } _sigchld;
  816. /* IRIX SIGCHLD */
  817. struct {
  818. vki_pid_t _pid; /* which child */
  819. vki_clock_t _utime;
  820. int _status; /* exit code */
  821. vki_clock_t _stime;
  822. } _irix_sigchld;
  823. /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
  824. struct {
  825. void __user *_addr; /* faulting insn/memory ref. */
  826. #ifdef __ARCH_SI_TRAPNO
  827. int _trapno; /* TRAP # which caused the signal */
  828. #endif
  829. } _sigfault;
  830. /* SIGPOLL, SIGXFSZ (To do ...) */
  831. struct {
  832. __VKI_ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */
  833. int _fd;
  834. } _sigpoll;
  835. } _sifields;
  836. } vki_siginfo_t;
  837. //----------------------------------------------------------------------
  838. // From linux-2.6.35.5/include/asm/break.h
  839. //----------------------------------------------------------------------
  840. #define VKI_BRK_OVERFLOW 6 /* Overflow check */
  841. #define VKI_BRK_DIVZERO 7 /* Divide by zero check */
  842. //----------------------------------------------------------------------
  843. // From linux-3.6.35.5/arch/mips/include/socket.h
  844. //----------------------------------------------------------------------
  845. enum vki_sock_type {
  846. VKI_SOCK_STREAM = 2,
  847. // [[others omitted]]
  848. };
  849. #define ARCH_HAS_SOCKET_TYPES 1
  850. //----------------------------------------------------------------------
  851. // From linux-3.13.0/include/asm/errno.h
  852. //----------------------------------------------------------------------
  853. #define VKI_ENOSYS 89 /* Function not implemented */
  854. #define VKI_EOVERFLOW 79 /* Value too large for defined data type */
  855. //----------------------------------------------------------------------
  856. // From linux-3.7.0/arch/mips/include/uapi/asm/errno.h
  857. //----------------------------------------------------------------------
  858. #define VKI_EOPNOTSUPP 122 /* Operation not supported on transport
  859. endpoint */
  860. #endif // __VKI_MIPS64_LINUX_H
  861. /*--------------------------------------------------------------------*/
  862. /*--- end vki-mips64-linux.h ---*/
  863. /*--------------------------------------------------------------------*/