Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:13:24

0001 
0002 /*--------------------------------------------------------------------*/
0003 /*--- mips/Linux-specific kernel interface.     vki-mips64-linux.h ---*/
0004 /*--------------------------------------------------------------------*/
0005 
0006 /*
0007    This file is part of Valgrind, a dynamic binary instrumentation
0008    framework.
0009 
0010    Copyright (C) 2010-2017 RT-RK
0011 
0012    This program is free software; you can redistribute it and/or
0013    modify it under the terms of the GNU General Public License as
0014    published by the Free Software Foundation; either version 2 of the
0015    License, or (at your option) any later version.
0016 
0017    This program is distributed in the hope that it will be useful, but
0018    WITHOUT ANY WARRANTY; without even the implied warranty of
0019    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0020    General Public License for more details.
0021 
0022    You should have received a copy of the GNU General Public License
0023    along with this program; if not, see <http://www.gnu.org/licenses/>.
0024 */
0025 
0026 #ifndef __VKI_MIPS64_LINUX_H
0027 #define __VKI_MIPS64_LINUX_H
0028 
0029 #include <config.h>
0030 
0031 // mips endian
0032 #if defined (_MIPSEL)
0033 #define VKI_LITTLE_ENDIAN  1
0034 #elif defined (_MIPSEB)
0035 #define VKI_BIG_ENDIAN  1
0036 #endif
0037 
0038 //----------------------------------------------------------------------
0039 // From linux-2.6.35.9/include/asm-mips/cachectl.h
0040 //----------------------------------------------------------------------
0041 
0042 #define VKI_ICACHE  (1<<0)          /* flush instruction cache        */
0043 #define VKI_DCACHE  (1<<1)          /* writeback and flush data cache */
0044 #define VKI_BCACHE  (VKI_ICACHE | VKI_DCACHE) /* flush both caches    */
0045 
0046 //----------------------------------------------------------------------
0047 // From linux-2.6.35.9/include/mips-mips/types.h
0048 //----------------------------------------------------------------------
0049 
0050 typedef __signed__ char __vki_s8;
0051 typedef unsigned   char __vki_u8;
0052 
0053 typedef __signed__ short __vki_s16;
0054 typedef unsigned   short __vki_u16;
0055 
0056 typedef __signed__ int __vki_s32;
0057 typedef unsigned   int __vki_u32;
0058 
0059 typedef __signed char vki_s8;
0060 typedef unsigned char vki_u8;
0061 
0062 typedef __signed short vki_s16;
0063 typedef unsigned short vki_u16;
0064 
0065 typedef __signed int vki_s32;
0066 typedef unsigned int vki_u32;
0067 
0068 #if (_MIPS_SZLONG == 64)
0069 typedef __signed__ long __vki_s64;
0070 typedef unsigned   long __vki_u64;
0071 #else
0072 typedef __signed__ long long __vki_s64;
0073 typedef unsigned   long long __vki_u64;
0074 #endif
0075 
0076 //----------------------------------------------------------------------
0077 // From linux-2.6.35.9/include/asm-mips/page.h
0078 //----------------------------------------------------------------------
0079 
0080 /* MIPS64 uses runtime pagesize detection */
0081 extern UWord VKI_PAGE_SHIFT;
0082 extern UWord VKI_PAGE_SIZE;
0083 #define VKI_PAGE_MASK           (~(VKI_PAGE_SIZE-1))
0084 #define VKI_MAX_PAGE_SHIFT      16
0085 #define VKI_MAX_PAGE_SIZE       (1UL << VKI_MAX_PAGE_SHIFT)
0086 
0087 //----------------------------------------------------------------------
0088 // From linux-2.6.35.9/arch/mips/include/bits/shm.h
0089 //----------------------------------------------------------------------
0090 
0091 #define VKI_SHMLBA  0x40000
0092 
0093 //----------------------------------------------------------------------
0094 // From linux-2.6.35.9/include/asm-mips/signal.h
0095 //----------------------------------------------------------------------
0096 
0097 #define VKI_MINSIGSTKSZ 2048
0098 
0099 #define VKI_SIG_BLOCK   1  /* for blocking signals */
0100 #define VKI_SIG_UNBLOCK 2  /* for unblocking signals */
0101 #define VKI_SIG_SETMASK 3  /* for setting the signal mask */
0102 
0103 /* Type of a signal handler.  */
0104 typedef void __vki_signalfn_t(int);
0105 typedef __vki_signalfn_t __user *__vki_sighandler_t;
0106 
0107 typedef void __vki_restorefn_t(void);
0108 typedef __vki_restorefn_t __user *__vki_sigrestore_t;
0109 
0110 #define VKI_SIG_DFL     ((__vki_sighandler_t)0)   /* default signal handling */
0111 #define VKI_SIG_IGN     ((__vki_sighandler_t)1)   /* ignore signal */
0112 #define VKI_SIG_ERR     ((__vki_sighandler_t)-1)  /* error return from signal */
0113 
0114 #define _VKI_NSIG       128
0115 #define _VKI_NSIG_BPW   (__SIZEOF_LONG__ * 8)
0116 #define _VKI_NSIG_WORDS (_VKI_NSIG / _VKI_NSIG_BPW)
0117 
0118 typedef unsigned long vki_old_sigset_t;  /* at least 32 bits */
0119 
0120 typedef struct {
0121         unsigned long sig[_VKI_NSIG_WORDS];
0122 } vki_sigset_t;
0123 
0124 #define VKI_SIGHUP           1          /* Hangup (POSIX).                    */
0125 #define VKI_SIGINT           2          /* Interrupt (ANSI).                  */
0126 #define VKI_SIGQUIT          3          /* Quit (POSIX).                      */
0127 #define VKI_SIGILL           4          /* Illegal instruction (ANSI).        */
0128 #define VKI_SIGTRAP          5          /* Trace trap (POSIX).                */
0129 #define VKI_SIGIOT           6          /* IOT trap (4.2 BSD).                */
0130 #define VKI_SIGABRT          VKI_SIGIOT /* Abort (ANSI).                      */
0131 #define VKI_SIGEMT           7
0132 #define VKI_SIGFPE           8          /* Floating-point exception (ANSI).   */
0133 #define VKI_SIGKILL          9          /* Kill, unblockable (POSIX).         */
0134 #define VKI_SIGBUS          10          /* BUS error (4.2 BSD).               */
0135 #define VKI_SIGSEGV         11          /* Segmentation violation (ANSI).     */
0136 #define VKI_SIGSYS          12
0137 #define VKI_SIGPIPE         13          /* Broken pipe (POSIX).               */
0138 #define VKI_SIGALRM         14          /* Alarm clock (POSIX).               */
0139 #define VKI_SIGTERM         15          /* Termination (ANSI).                */
0140 #define VKI_SIGUSR1         16          /* User-defined signal 1 (POSIX).     */
0141 #define VKI_SIGUSR2         17          /* User-defined signal 2 (POSIX).     */
0142 #define VKI_SIGCHLD         18          /* Child status has changed (POSIX).  */
0143 #define VKI_SIGCLD          VKI_SIGCHLD /* Same as SIGCHLD (System V).        */
0144 #define VKI_SIGPWR          19          /* Power failure restart (System V).  */
0145 #define VKI_SIGWINCH        20          /* Window size change (4.3 BSD, Sun). */
0146 #define VKI_SIGURG          21          /* Urgent condition on socket.        */
0147 #define VKI_SIGIO           22          /* I/O now possible (4.2 BSD).        */
0148 #define VKI_SIGPOLL         VKI_SIGIO   /* Pollable event occurred (System V).*/
0149 #define VKI_SIGSTOP         23          /* Stop, unblockable (POSIX).         */
0150 #define VKI_SIGTSTP         24          /* Keyboard stop (POSIX).             */
0151 #define VKI_SIGCONT         25          /* Continue (POSIX).                  */
0152 #define VKI_SIGTTIN         26          /* Background read from tty (POSIX).  */
0153 #define VKI_SIGTTOU         27          /* Background write to tty (POSIX).   */
0154 #define VKI_SIGVTALRM       28          /* Virtual alarm clock (4.2 BSD).     */
0155 #define VKI_SIGPROF         29          /* Profiling alarm clock (4.2 BSD).   */
0156 #define VKI_SIGXCPU         30          /* CPU limit exceeded (4.2 BSD).      */
0157 #define VKI_SIGXFSZ         31          /* File size limit exceeded (4.2 BSD).*/
0158 
0159 /* These should not be considered constants from userland.  */
0160 #define VKI_SIGRTMIN    32
0161 // [[This was (_NSIG-1) in 2.4.X... not sure if it matters.]]
0162 #define VKI_SIGRTMAX    (_VKI_NSIG - 1)
0163 
0164 #define VKI_SA_ONSTACK      0x08000000u
0165 #define VKI_SA_RESETHAND    0x80000000u
0166 #define VKI_SA_RESTART      0x10000000u
0167 #define VKI_SA_SIGINFO      0x00000008u
0168 #define VKI_SA_NODEFER      0x40000000u
0169 #define VKI_SA_NOCLDWAIT    0x00010000u
0170 #define VKI_SA_NOCLDSTOP    0x00000001u
0171 
0172 #define VKI_SA_NOMASK           VKI_SA_NODEFER
0173 #define VKI_SA_ONESHOT          VKI_SA_RESETHAND
0174 //#define VKI_SA_INTERRUPT      0x20000000  /* dummy -- ignored */
0175 
0176 #define VKI_SA_RESTORER         0x04000000
0177 
0178 #define VKI_SS_ONSTACK          1
0179 #define VKI_SS_DISABLE          2
0180 
0181 struct vki_old_sigaction {
0182        // [[Nb: a 'k' prefix is added to "sa_handler" because
0183        // bits/sigaction.h (which gets dragged in somehow via signal.h)
0184        // #defines it as something else.  Since that is done for glibc's
0185        // purposes, which we don't care about here, we use our own name.]]
0186        unsigned long sa_flags;
0187        __vki_sighandler_t ksa_handler;
0188        vki_old_sigset_t sa_mask;
0189        __vki_sigrestore_t sa_restorer;
0190 };
0191 
0192 struct vki_sigaction {
0193        unsigned int    sa_flags;
0194        __vki_sighandler_t  sa_handler;
0195        vki_sigset_t        sa_mask;
0196 };
0197 
0198 
0199 struct vki_sigaction_base {
0200        // [[See comment about extra 'k' above]]
0201        unsigned int sa_flags;
0202        __vki_sighandler_t ksa_handler;
0203        vki_sigset_t sa_mask;           // mask last for extensibility
0204        __vki_sigrestore_t sa_restorer;
0205 };
0206 
0207 /* On Linux we use the same type for passing sigactions to
0208    and from the kernel.  Hence: */
0209 typedef  struct vki_sigaction_base  vki_sigaction_toK_t;
0210 typedef  struct vki_sigaction_base  vki_sigaction_fromK_t;
0211 
0212 typedef struct vki_sigaltstack {
0213         void __user *ss_sp;
0214         vki_size_t ss_size;
0215         int ss_flags;
0216 } vki_stack_t;
0217 
0218 //----------------------------------------------------------------------
0219 // From linux-2.6.35.9/include/asm-mips/sigcontext.h
0220 //----------------------------------------------------------------------
0221 
0222 struct _vki_fpreg {
0223        unsigned short significand[4];
0224        unsigned short exponent;
0225 };
0226 
0227 struct _vki_fpxreg {
0228        unsigned short significand[4];
0229        unsigned short exponent;
0230        unsigned short padding[3];
0231 };
0232 
0233 struct _vki_xmmreg {
0234        unsigned long element[4];
0235 };
0236 
0237 struct _vki_fpstate {
0238        /* Regular FPU environment */
0239        unsigned long    cw;
0240        unsigned long    sw;
0241        unsigned long    tag;
0242        unsigned long    ipoff;
0243        unsigned long    cssel;
0244        unsigned long    dataoff;
0245        unsigned long    datasel;
0246        struct _vki_fpreg    _st[8];
0247        unsigned short   status;
0248        unsigned short   magic;           /* 0xffff = regular FPU data only */
0249 
0250        /* FXSR FPU environment */
0251        unsigned long    _fxsr_env[6];    /* FXSR FPU env is ignored */
0252        unsigned long    mxcsr;
0253        unsigned long    reserved;
0254        struct _vki_fpxreg   _fxsr_st[8]; /* FXSR FPU reg data is ignored */
0255        struct _vki_xmmreg   _xmm[8];
0256        unsigned long    padding[56];
0257 };
0258 
0259 //----------------------------------------------------------------------
0260 // From linux-2.6.35.9/include/asm-mips/sigcontext.h
0261 //----------------------------------------------------------------------
0262 struct vki_sigcontext {
0263        __vki_u64   sc_regs[32];
0264        __vki_u64   sc_fpregs[32];
0265        __vki_u64   sc_mdhi;
0266        __vki_u64   sc_hi1;
0267        __vki_u64   sc_hi2;
0268        __vki_u64   sc_hi3;
0269        __vki_u64   sc_mdlo;
0270        __vki_u64   sc_lo1;
0271        __vki_u64   sc_lo2;
0272        __vki_u64   sc_lo3;
0273        __vki_u64   sc_pc;
0274        __vki_u64   sc_fpc_csr;
0275        __vki_u64   sc_used_math;
0276        __vki_u64   sc_dsp;
0277        __vki_u64   sc_reserved;
0278 };
0279 
0280 //----------------------------------------------------------------------
0281 // From linux-2.6.35.9/include/asm-mips/mman.h
0282 //----------------------------------------------------------------------
0283 
0284 #define VKI_PROT_NONE       0x0      /* No page permissions */
0285 #define VKI_PROT_READ       0x1      /* page can be read */
0286 #define VKI_PROT_WRITE      0x2      /* page can be written */
0287 #define VKI_PROT_EXEC       0x4      /* page can be executed */
0288 #define VKI_PROT_GROWSDOWN  0x01000000  /* mprotect flag: extend change to start
0289                                            of growsdown vma */
0290 #define VKI_PROT_GROWSUP    0x02000000  /* mprotect flag: extend change to end
0291                                            of growsup vma */
0292 
0293 #define VKI_MAP_SHARED      0x001     /* Share changes */
0294 #define VKI_MAP_PRIVATE     0x002     /* Changes are private */
0295 //#define VKI_MAP_TYPE      0x0f        /* Mask for type of mapping */
0296 #define VKI_MAP_FIXED       0x010     /* Interpret addr exactly */
0297 
0298 #define VKI_MAP_NORESERVE   0x0400   /* don't reserve swap pages */
0299 
0300 /* These are linux-specific */
0301 #define VKI_MAP_NORESERVE   0x0400          /* don't check for reservations */
0302 #define VKI_MAP_ANONYMOUS   0x0800          /* don't use a file */
0303 #define VKI_MAP_GROWSDOWN   0x1000          /* stack-like segment */
0304 #define VKI_MAP_DENYWRITE   0x2000          /* ETXTBSY */
0305 #define VKI_MAP_EXECUTABLE  0x4000          /* mark it as an executable */
0306 #define VKI_MAP_LOCKED      0x8000          /* pages are locked */
0307 #define VKI_MAP_POPULATE    0x10000         /* populate (prefault) pagetables */
0308 #define VKI_MAP_NONBLOCK    0x20000         /* do not block on IO */
0309 
0310 //----------------------------------------------------------------------
0311 // From linux-2.6.35.9/include/asm-mips/fcntl.h
0312 //----------------------------------------------------------------------
0313 
0314 #define VKI_O_RDONLY        00
0315 #define VKI_O_WRONLY        01
0316 #define VKI_O_RDWR          02
0317 #define VKI_O_ACCMODE       03
0318 
0319 #define VKI_O_CREAT         0x0100      /* not fcntl */
0320 #define VKI_O_EXCL          0x0400      /* not fcntl */
0321 
0322 #define VKI_O_TRUNC         0x0200      /* not fcntl */
0323 
0324 #define VKI_O_APPEND        0x0008
0325 #define VKI_O_NONBLOCK      0x0080
0326 #define VKI_O_LARGEFILE     0x2000
0327 
0328 #define VKI_AT_FDCWD        -100
0329 
0330 #define VKI_F_DUPFD         0           /* dup */
0331 #define VKI_F_GETFD         1           /* get close_on_exec */
0332 #define VKI_F_SETFD         2           /* set/clear close_on_exec */
0333 #define VKI_F_GETFL         3           /* get file->f_flags */
0334 #define VKI_F_SETFL         4           /* set file->f_flags */
0335 
0336 #define VKI_F_GETLK         14
0337 #define VKI_F_SETLK         6
0338 #define VKI_F_SETLKW        7
0339 
0340 #define VKI_F_SETOWN        24          /*  for sockets. */
0341 #define VKI_F_GETOWN        23          /*  for sockets. */
0342 #define VKI_F_SETSIG        10          /*  for sockets. */
0343 #define VKI_F_GETSIG        11          /*  for sockets. */
0344 
0345 #define VKI_F_SETOWN_EX     15
0346 #define VKI_F_GETOWN_EX     16
0347 
0348 #define VKI_F_OFD_GETLK     36
0349 #define VKI_F_OFD_SETLK     37
0350 #define VKI_F_OFD_SETLKW    38
0351 
0352 #define VKI_F_GETLK64       33          /*  using 'struct flock64' */
0353 #define VKI_F_SETLK64       34
0354 #define VKI_F_SETLKW64      35
0355 
0356 /* for F_[GET|SET]FL */
0357 #define VKI_FD_CLOEXEC      1      /* actually anything with low bit set goes */
0358 
0359 #define VKI_F_LINUX_SPECIFIC_BASE 1024
0360 
0361 struct vki_f_owner_ex {
0362        int type;
0363        __vki_kernel_pid_t pid;
0364 };
0365 
0366 //----------------------------------------------------------------------
0367 // From linux-2.6.35.9/include/asm-mips/resource.h
0368 //----------------------------------------------------------------------
0369 
0370 #define VKI_RLIMIT_DATA     2   /* max data size */
0371 #define VKI_RLIMIT_STACK    3   /* max stack size */
0372 #define VKI_RLIMIT_CORE     4   /* max core file size */
0373 #define VKI_RLIMIT_NOFILE   5   /* max number of open files */
0374 
0375 //----------------------------------------------------------------------
0376 // From linux-2.6.35.9/include/asm-mips/socket.h
0377 //----------------------------------------------------------------------
0378 
0379 #define VKI_SOL_SOCKET   0xffff
0380 
0381 #define VKI_SO_TYPE      0x1008
0382 
0383 #define VKI_SO_ATTACH_FILTER    26
0384 
0385 //----------------------------------------------------------------------
0386 // From linux-2.6.35.9/include/asm-i386/sockios.h
0387 //----------------------------------------------------------------------
0388 
0389 #define VKI_SIOCATMARK          _VKI_IOR('s', 7, int)
0390 #define VKI_SIOCSPGRP           _VKI_IOW('s', 8, vki_pid_t)
0391 #define VKI_SIOCGPGRP           _VKI_IOR('s', 9, vki_pid_t)
0392 #define VKI_SIOCGSTAMP          0x8906      /* Get stamp (timeval) */
0393 #define VKI_SIOCGSTAMPNS        0x8907      /* Get stamp (timespec) */
0394 
0395 //----------------------------------------------------------------------
0396 // From linux-2.6.35.9/include/asm-mips/stat.h
0397 //----------------------------------------------------------------------
0398 
0399 /* Size of kernel long is different from Valgrind MIPS n32 long size, so we have to
0400 use long long instead long type. */
0401 struct vki_stat {
0402         unsigned int    st_dev;
0403         unsigned int    st_pad0[3];     /* Reserved for st_dev expansion  */
0404 
0405 #if defined(VGABI_N32)
0406         unsigned long long st_ino;
0407 #else
0408         unsigned long   st_ino;
0409 #endif
0410 
0411         int             st_mode;
0412         unsigned int    st_nlink;
0413 
0414         unsigned int    st_uid;
0415         unsigned int    st_gid;
0416 
0417         unsigned int    st_rdev;
0418         unsigned int    st_pad1[3];     /* Reserved for st_rdev expansion  */
0419 
0420 #if defined(VGABI_N32)
0421         long long       st_size;
0422 #else
0423         long            st_size;
0424 #endif
0425 
0426         /*
0427          * Actually this should be timestruc_t st_atime, st_mtime and st_ctime
0428          * but we don't have it under Linux.
0429          */
0430         unsigned int    st_atime;
0431         unsigned int    st_atime_nsec;  /* Reserved for st_atime expansion  */
0432 
0433         unsigned int    st_mtime;
0434         unsigned int    st_mtime_nsec;  /* Reserved for st_mtime expansion  */
0435 
0436         unsigned int    st_ctime;
0437         unsigned int    st_ctime_nsec;  /* Reserved for st_ctime expansion  */
0438 
0439         unsigned int    st_blksize;
0440         unsigned int    st_pad2;
0441 
0442         long long       st_blocks;
0443 };
0444 
0445 struct vki_stat64 {
0446         unsigned long   st_dev;
0447         unsigned long   st_pad0[3];     /* Reserved for st_dev expansion  */
0448 
0449         unsigned long long      st_ino;
0450 
0451         int             st_mode;
0452         unsigned int    st_nlink;
0453 
0454         unsigned int    st_uid;
0455         unsigned int    st_gid;
0456 
0457         unsigned long   st_rdev;
0458         unsigned long   st_pad1[3];     /* Reserved for st_rdev expansion  */
0459 
0460         long long       st_size;
0461 
0462         /*
0463          * Actually this should be timestruc_t st_atime, st_mtime and st_ctime
0464          * but we don't have it under Linux.
0465          */
0466         unsigned long   st_atime;
0467         unsigned long   st_atime_nsec;  /* Reserved for st_atime expansion  */
0468 
0469         unsigned long   st_mtime;
0470         unsigned long   st_mtime_nsec;  /* Reserved for st_mtime expansion  */
0471 
0472         unsigned long   st_ctime;
0473         unsigned long   st_ctime_nsec;  /* Reserved for st_ctime expansion  */
0474 
0475         unsigned long   st_blksize;
0476         unsigned long   st_pad2;
0477 
0478         long long       st_blocks;
0479 };
0480 
0481 //----------------------------------------------------------------------
0482 // From linux-2.6.35.9/include/asm-mips/statfs.h
0483 //----------------------------------------------------------------------
0484 
0485 struct vki_statfs {
0486        __vki_u32 f_type;
0487 #define f_fstyp f_type
0488        __vki_u32 f_bsize;
0489        __vki_u32 f_frsize;
0490        __vki_u32 f_blocks;
0491        __vki_u32 f_bfree;
0492        __vki_u32 f_files;
0493        __vki_u32 f_ffree;
0494        __vki_u32 f_bavail;
0495        __vki_kernel_fsid_t f_fsid;
0496        __vki_u32 f_namelen;
0497        __vki_u32 f_spare[6];
0498 };
0499 
0500 //----------------------------------------------------------------------
0501 // From linux-2.6.35.9/include/asm-mips/termios.h
0502 //----------------------------------------------------------------------
0503 
0504 struct vki_winsize {
0505        unsigned short ws_row;
0506        unsigned short ws_col;
0507        unsigned short ws_xpixel;
0508        unsigned short ws_ypixel;
0509 };
0510 
0511 #define NCC     8
0512 #define NCCS    23
0513 struct vki_termio {
0514        unsigned short c_iflag;      /* input mode flags */
0515        unsigned short c_oflag;      /* output mode flags */
0516        unsigned short c_cflag;      /* control mode flags */
0517        unsigned short c_lflag;      /* local mode flags */
0518        char           c_line;       /* line discipline */
0519        unsigned char  c_cc[NCCS];   /* control characters */
0520 };
0521 
0522 //----------------------------------------------------------------------
0523 // From linux-2.6.35.9/include/asm-mips/termbits.h
0524 //----------------------------------------------------------------------
0525 
0526 typedef unsigned char   vki_cc_t;
0527 typedef unsigned long   vki_speed_t;
0528 typedef unsigned long   vki_tcflag_t;
0529 
0530 struct vki_termios {
0531        vki_tcflag_t c_iflag;        /* input mode flags */
0532        vki_tcflag_t c_oflag;        /* output mode flags */
0533        vki_tcflag_t c_cflag;        /* control mode flags */
0534        vki_tcflag_t c_lflag;        /* local mode flags */
0535        vki_cc_t c_line;             /* line discipline */
0536        vki_cc_t c_cc[NCCS];         /* control characters */
0537 };
0538 
0539 //----------------------------------------------------------------------
0540 // From linux-2.6.35.9/include/asm-mips/ioctl.h
0541 //----------------------------------------------------------------------
0542 
0543 #define _VKI_IOC_NRBITS     8
0544 #define _VKI_IOC_TYPEBITS   8
0545 #define _VKI_IOC_SIZEBITS   13
0546 #define _VKI_IOC_DIRBITS    3
0547 
0548 #define _VKI_IOC_NRMASK     ((1 << _VKI_IOC_NRBITS)-1)
0549 #define _VKI_IOC_TYPEMASK   ((1 << _VKI_IOC_TYPEBITS)-1)
0550 #define _VKI_IOC_SIZEMASK   ((1 << _VKI_IOC_SIZEBITS)-1)
0551 #define _VKI_IOC_DIRMASK    ((1 << _VKI_IOC_DIRBITS)-1)
0552 
0553 #define _VKI_IOC_NRSHIFT    0
0554 #define _VKI_IOC_TYPESHIFT  (_VKI_IOC_NRSHIFT+_VKI_IOC_NRBITS)
0555 #define _VKI_IOC_SIZESHIFT  (_VKI_IOC_TYPESHIFT+_VKI_IOC_TYPEBITS)
0556 #define _VKI_IOC_DIRSHIFT   (_VKI_IOC_SIZESHIFT+_VKI_IOC_SIZEBITS)
0557 
0558 #define _VKI_IOC_NONE   1U
0559 #define _VKI_IOC_READ   2U
0560 #define _VKI_IOC_WRITE  4U
0561 
0562 #define _VKI_IOC(dir,type,nr,size) \
0563                 (((dir)  << _VKI_IOC_DIRSHIFT) | \
0564                 ((type) << _VKI_IOC_TYPESHIFT) | \
0565                 ((nr)   << _VKI_IOC_NRSHIFT) | \
0566                 ((size) << _VKI_IOC_SIZESHIFT))
0567 
0568 /* provoke compile error for invalid uses of size argument */
0569 extern unsigned int __VKI_invalid_size_argument_for_IOC;
0570 /* used to create numbers */
0571 #define _VKI_IO(type,nr)        _VKI_IOC(_VKI_IOC_NONE,(type),(nr),0)
0572 #define _VKI_IOR(type,nr,size)  _VKI_IOC(_VKI_IOC_READ,(type),(nr), \
0573                                 (_VKI_IOC_TYPECHECK(size)))
0574 #define _VKI_IOW(type,nr,size)  _VKI_IOC(_VKI_IOC_WRITE,(type),(nr), \
0575                                 (_VKI_IOC_TYPECHECK(size)))
0576 #define _VKI_IOWR(type,nr,size) _VKI_IOC(_VKI_IOC_READ|_VKI_IOC_WRITE,(type), \
0577                                 (nr),(_VKI_IOC_TYPECHECK(size)))
0578 
0579 /* used to decode ioctl numbers.. */
0580 #define _VKI_IOC_DIR(nr)    (((nr) >> _VKI_IOC_DIRSHIFT) & _VKI_IOC_DIRMASK)
0581 #define _VKI_IOC_TYPE(nr)   (((nr) >> _VKI_IOC_TYPESHIFT) & _VKI_IOC_TYPEMASK)
0582 #define _VKI_IOC_NR(nr)     (((nr) >> _VKI_IOC_NRSHIFT) & _VKI_IOC_NRMASK)
0583 #define _VKI_IOC_SIZE(nr)   (((nr) >> _VKI_IOC_SIZESHIFT) & _VKI_IOC_SIZEMASK)
0584 
0585 //----------------------------------------------------------------------
0586 // From linux-2.6.35.9/include/asm-mips/ioctls.h
0587 //----------------------------------------------------------------------
0588 
0589 #define VKI_TCGETA              0x5401
0590 #define VKI_TCSETA              0x5402 /* Clashes with SNDCTL_TMR_START
0591                                           sound ioctl */
0592 #define VKI_TCSETAW             0x5403
0593 #define VKI_TCSETAF             0x5404
0594 
0595 #define VKI_TCSBRK              0x5405
0596 #define VKI_TCXONC              0x5406
0597 #define VKI_TCFLSH              0x5407
0598 
0599 #define VKI_TCGETS              0x540d
0600 #define VKI_TCSETS              0x540e
0601 #define VKI_TCSETSW             0x540f
0602 #define VKI_TCSETSF             0x5410
0603 
0604 #define VKI_TIOCEXCL            0x740d  /* set exclusive use of tty */
0605 #define VKI_TIOCNXCL            0x740e  /* reset exclusive use of tty */
0606 #define VKI_TIOCOUTQ            0x7472  /* output queue size */
0607 #define VKI_TIOCSTI             0x5472  /* simulate terminal input */
0608 #define VKI_TIOCMGET            0x741d  /* get all modem bits */
0609 #define VKI_TIOCMBIS            0x741b  /* bis modem bits */
0610 #define VKI_TIOCMBIC            0x741c  /* bic modem bits */
0611 #define VKI_TIOCMSET            0x741a  /* set all modem bits */
0612 #define VKI_TIOCPKT             0x5470  /* pty: set/clear packet mode */
0613 #define VKI_TIOCPKT_DATA        0x00    /* data packet */
0614 #define VKI_TIOCPKT_FLUSHREAD   0x01    /* flush packet */
0615 #define VKI_TIOCPKT_FLUSHWRITE  0x02    /* flush packet */
0616 #define VKI_TIOCPKT_STOP        0x04    /* stop output */
0617 #define VKI_TIOCPKT_START       0x08    /* start output */
0618 #define VKI_TIOCPKT_NOSTOP      0x10    /* no more ^S, ^Q */
0619 #define VKI_TIOCPKT_DOSTOP      0x20    /* now do ^S ^Q */
0620 
0621 /* set window size */
0622 #define VKI_TIOCSWINSZ          _VKI_IOW('t', 103, struct vki_winsize)
0623 /* get window size */
0624 #define VKI_TIOCGWINSZ          _VKI_IOR('t', 104, struct vki_winsize)
0625 #define VKI_TIOCNOTTY           0x5471 /* void tty association */
0626 #define VKI_TIOCSETD            0x7401
0627 #define VKI_TIOCGETD            0x7400
0628 
0629 #define VKI_FIOCLEX             0x6601
0630 #define VKI_FIONCLEX            0x6602
0631 #define VKI_FIOASYNC            0x667d
0632 #define VKI_FIONBIO             0x667e
0633 #define VKI_FIOQSIZE            0x667f
0634 
0635 #define VKI_TIOCGLTC            0x7474 /* get special local chars */
0636 #define VKI_TIOCSLTC            0x7475 /* set special local chars */
0637 #define VKI_TIOCSPGRP           _VKI_IOW('t', 118, int) /* set pgrp of tty */
0638 #define VKI_TIOCGPGRP           _VKI_IOR('t', 119, int) /* get pgrp of tty */
0639 #define VKI_TIOCCONS            _VKI_IOW('t', 120, int) /* become virtual
0640                                                            console */
0641 
0642 #define VKI_FIONREAD            0x467f
0643 #define VKI_TIOCINQ             FIONREAD
0644 
0645 #define VKI_TIOCGETP            0x7408
0646 #define VKI_TIOCSETP            0x7409
0647 #define VKI_TIOCSETN            0x740a /* TIOCSETP wo flush */
0648 
0649 #define VKI_TIOCSBRK            0x5427 /* BSD compatibility */
0650 #define VKI_TIOCCBRK            0x5428 /* BSD compatibility */
0651 #define VKI_TIOCGSID            0x7416 /* Return the session ID of FD */
0652 #define VKI_TIOCGPTN            _VKI_IOR('T',0x30, unsigned int) /* Get Pty
0653                                                    Number (of pty-mux device) */
0654 #define VKI_TIOCSPTLCK          _VKI_IOW('T',0x31, int) /* Lock/unlock Pty */
0655 
0656 /* I hope the range from 0x5480 on is free ... */
0657 #define VKI_TIOCSCTTY           0x5480 /* become controlling tty */
0658 #define VKI_TIOCGSOFTCAR        0x5481
0659 #define VKI_TIOCSSOFTCAR        0x5482
0660 #define VKI_TIOCLINUX           0x5483
0661 #define VKI_TIOCGSERIAL         0x5484
0662 #define VKI_TIOCSSERIAL         0x5485
0663 #define VKI_TCSBRKP             0x5486 /* Needed for POSIX tcsendbreak() */
0664 #define VKI_TIOCSERCONFIG       0x5488
0665 #define VKI_TIOCSERGWILD        0x5489
0666 #define VKI_TIOCSERSWILD        0x548a
0667 #define VKI_TIOCGLCKTRMIOS      0x548b
0668 #define VKI_TIOCSLCKTRMIOS      0x548c
0669 #define VKI_TIOCSERGSTRUCT      0x548d /* For debugging only */
0670 #define VKI_TIOCSERGETLSR       0x548e /* Get line status register */
0671 #define VKI_TIOCSERGETMULTI     0x548f /* Get multiport config  */
0672 #define VKI_TIOCSERSETMULTI     0x5490 /* Set multiport config */
0673 #define VKI_TIOCMIWAIT          0x5491 /* wait for a change on serial input
0674                                           line(s) */
0675 #define VKI_TIOCGICOUNT         0x5492 /* read serial port inline interrupt
0676                                           counts */
0677 #define VKI_TIOCGHAYESESP       0x5493 /* Get Hayes ESP configuration */
0678 #define VKI_TIOCSHAYESESP       0x5494 /* Set Hayes ESP configuration */
0679 
0680 //----------------------------------------------------------------------
0681 // From asm-generic/poll.h
0682 //----------------------------------------------------------------------
0683 
0684 /* These are specified by iBCS2 */
0685 #define VKI_POLLIN              0x0001
0686 
0687 struct vki_pollfd {
0688        int fd;
0689        short events;
0690        short revents;
0691 };
0692 //----------------------------------------------------------------------
0693 // From linux-2.6.35.9/include/asm-mips/elf.h
0694 //----------------------------------------------------------------------
0695 
0696 #define VKI_ELF_NGREG           45  /* includes nip, msr, lr, etc. */
0697 #define VKI_ELF_NFPREG          33  /* includes fpscr */
0698 
0699 typedef unsigned long vki_elf_greg_t;
0700 typedef vki_elf_greg_t vki_elf_gregset_t[VKI_ELF_NGREG];
0701 
0702 typedef double vki_elf_fpreg_t;
0703 typedef vki_elf_fpreg_t vki_elf_fpregset_t[VKI_ELF_NFPREG];
0704 
0705 typedef struct vki_user_fxsr_struct vki_elf_fpxregset_t;
0706 
0707 #define VKI_AT_SYSINFO          32
0708 //----------------------------------------------------------------------
0709 // From linux-2.6.35.9/include/asm-mips/ucontext.h
0710 //----------------------------------------------------------------------
0711 
0712 struct vki_ucontext {
0713        unsigned long          uc_flags;
0714        struct vki_ucontext    *uc_link;
0715        vki_stack_t            uc_stack;
0716        struct vki_sigcontext  uc_mcontext;
0717        vki_sigset_t           uc_sigmask;  /* mask last for extensibility */
0718 };
0719 
0720 typedef char vki_modify_ldt_t;
0721 //----------------------------------------------------------------------
0722 // From linux-2.6.35.9/include/asm-mips/ipcbuf.h
0723 //----------------------------------------------------------------------
0724 
0725 struct vki_ipc64_perm {
0726        __vki_kernel_key_t  key;
0727        __vki_kernel_uid_t  uid;
0728        __vki_kernel_gid_t  gid;
0729        __vki_kernel_uid_t  cuid;
0730        __vki_kernel_gid_t  cgid;
0731        __vki_kernel_mode_t mode;
0732        unsigned short  seq;
0733        unsigned short  __pad1;
0734        unsigned long   __unused1;
0735        unsigned long   __unused2;
0736 };
0737 
0738 //----------------------------------------------------------------------
0739 // From linux-2.6.35.9/include/asm-mips/sembuf.h
0740 //----------------------------------------------------------------------
0741 
0742 struct vki_semid64_ds {
0743        struct vki_ipc64_perm sem_perm;         /* permissions .. see ipc.h */
0744        __vki_kernel_time_t sem_otime;          /* last semop time */
0745        __vki_kernel_time_t sem_ctime;          /* last change time */
0746        unsigned long   sem_nsems;              /* no. of semaphores in array */
0747        unsigned long   __unused1;
0748        unsigned long   __unused2;
0749 };
0750 
0751 //----------------------------------------------------------------------
0752 // From linux-2.6.35.9/include/asm-mips/msgbuf.h
0753 //----------------------------------------------------------------------
0754 
0755 struct vki_msqid64_ds {
0756        struct vki_ipc64_perm msg_perm;
0757        __vki_kernel_time_t msg_stime;     /* last msgsnd time */
0758        __vki_kernel_time_t msg_rtime;     /* last msgrcv time */
0759        __vki_kernel_time_t msg_ctime;     /* last change time */
0760        unsigned long  msg_cbytes;         /* current number of bytes on queue */
0761        unsigned long  msg_qnum;           /* number of messages in queue */
0762        unsigned long  msg_qbytes;         /* max number of bytes on queue */
0763        __vki_kernel_pid_t msg_lspid;      /* pid of last msgsnd */
0764        __vki_kernel_pid_t msg_lrpid;      /* last receive pid */
0765        unsigned long  __unused4;
0766        unsigned long  __unused5;
0767 };
0768 
0769 //----------------------------------------------------------------------
0770 // From linux-2.6.35.9/include/asm-mips/ipc.h
0771 //----------------------------------------------------------------------
0772 
0773 struct vki_ipc_kludge {
0774        struct vki_msgbuf __user *msgp;
0775        long msgtyp;
0776 };
0777 
0778 #define VKI_SEMOP            1
0779 #define VKI_SEMGET           2
0780 #define VKI_SEMCTL           3
0781 #define VKI_SEMTIMEDOP       4
0782 #define VKI_MSGSND          11
0783 #define VKI_MSGRCV          12
0784 #define VKI_MSGGET          13
0785 #define VKI_MSGCTL          14
0786 #define VKI_SHMAT           21
0787 #define VKI_SHMDT           22
0788 #define VKI_SHMGET          23
0789 #define VKI_SHMCTL          24
0790 
0791 //----------------------------------------------------------------------
0792 // From linux-2.6.35.9/include/asm-mips/shmbuf.h
0793 //----------------------------------------------------------------------
0794 
0795 struct vki_shmid64_ds {
0796        struct vki_ipc64_perm       shm_perm;       /* operation perms */
0797        vki_size_t                  shm_segsz;      /* size of segment (bytes) */
0798        __vki_kernel_time_t         shm_atime;      /* last attach time */
0799        __vki_kernel_time_t         shm_dtime;      /* last detach time */
0800        __vki_kernel_time_t         shm_ctime;      /* last change time */
0801        __vki_kernel_pid_t          shm_cpid;       /* pid of creator */
0802        __vki_kernel_pid_t          shm_lpid;       /* pid of last operator */
0803        unsigned long               shm_nattch;     /* no. of current attaches */
0804        unsigned long               __unused1;
0805        unsigned long               __unused2;
0806 };
0807 
0808 struct vki_shminfo64 {
0809        unsigned long   shmmax;
0810        unsigned long   shmmin;
0811        unsigned long   shmmni;
0812        unsigned long   shmseg;
0813        unsigned long   shmall;
0814        unsigned long   __unused1;
0815        unsigned long   __unused2;
0816        unsigned long   __unused3;
0817        unsigned long   __unused4;
0818 };
0819 
0820 //----------------------------------------------------------------------
0821 // From linux-2.6.35.9/include/asm-mips/ptrace.h
0822 //----------------------------------------------------------------------
0823 
0824 struct vki_pt_regs {
0825 #ifdef CONFIG_32BIT
0826         /* Pad bytes for argument save space on the stack. */
0827        unsigned long pad0[6];
0828 #endif
0829 
0830        /* Saved main processor registers. */
0831        unsigned long regs[32];
0832 
0833        /* Saved special registers. */
0834        unsigned long cp0_status;
0835        unsigned long hi;
0836        unsigned long lo;
0837 #ifdef CONFIG_CPU_HAS_SMARTMIPS
0838        unsigned long acx;
0839 #endif
0840        unsigned long cp0_badvaddr;
0841        unsigned long cp0_cause;
0842        unsigned long cp0_epc;
0843 #ifdef CONFIG_MIPS_MT_SMTC
0844        unsigned long cp0_tcstatus;
0845 #endif /* CONFIG_MIPS_MT_SMTC */
0846 #ifdef CONFIG_CPU_CAVIUM_OCTEON
0847        unsigned long long mpl[3];        /* MTM{0,1,2} */
0848        unsigned long long mtp[3];        /* MTP{0,1,2} */
0849 #endif
0850 } __attribute__ ((aligned (8)));
0851 
0852 //----------------------------------------------------------------------
0853 // From linux-4.5/arch/mips/include/uapi/asm/reg.h
0854 //----------------------------------------------------------------------
0855 
0856 #define VKI_MIPS64_EF_R0             0
0857 #define VKI_MIPS64_EF_R1             1
0858 #define VKI_MIPS64_EF_R2             2
0859 #define VKI_MIPS64_EF_R3             3
0860 #define VKI_MIPS64_EF_R4             4
0861 #define VKI_MIPS64_EF_R5             5
0862 #define VKI_MIPS64_EF_R6             6
0863 #define VKI_MIPS64_EF_R7             7
0864 #define VKI_MIPS64_EF_R8             8
0865 #define VKI_MIPS64_EF_R9             9
0866 #define VKI_MIPS64_EF_R10           10
0867 #define VKI_MIPS64_EF_R11           11
0868 #define VKI_MIPS64_EF_R12           12
0869 #define VKI_MIPS64_EF_R13           13
0870 #define VKI_MIPS64_EF_R14           14
0871 #define VKI_MIPS64_EF_R15           15
0872 #define VKI_MIPS64_EF_R16           16
0873 #define VKI_MIPS64_EF_R17           17
0874 #define VKI_MIPS64_EF_R18           18
0875 #define VKI_MIPS64_EF_R19           19
0876 #define VKI_MIPS64_EF_R20           20
0877 #define VKI_MIPS64_EF_R21           21
0878 #define VKI_MIPS64_EF_R22           22
0879 #define VKI_MIPS64_EF_R23           23
0880 #define VKI_MIPS64_EF_R24           24
0881 #define VKI_MIPS64_EF_R25           25
0882 #define VKI_MIPS64_EF_R26           26
0883 #define VKI_MIPS64_EF_R27           27
0884 #define VKI_MIPS64_EF_R28           28
0885 #define VKI_MIPS64_EF_R29           29
0886 #define VKI_MIPS64_EF_R30           30
0887 #define VKI_MIPS64_EF_R31           31
0888 #define VKI_MIPS64_EF_LO            32
0889 #define VKI_MIPS64_EF_HI            33
0890 #define VKI_MIPS64_EF_CP0_EPC       34
0891 #define VKI_MIPS64_EF_CP0_BADVADDR  35
0892 #define VKI_MIPS64_EF_CP0_STATUS    36
0893 #define VKI_MIPS64_EF_CP0_CAUSE     37
0894 
0895 //----------------------------------------------------------------------
0896 // From linux-2.6.35.9/include/asm-i386/ptrace.h
0897 //----------------------------------------------------------------------
0898 
0899 #define VKI_PTRACE_GETREGS            12
0900 #define VKI_PTRACE_SETREGS            13
0901 #define VKI_PTRACE_GETFPREGS          14
0902 #define VKI_PTRACE_SETFPREGS          15
0903 #define VKI_PTRACE_GETFPXREGS         18
0904 #define VKI_PTRACE_SETFPXREGS         19
0905 
0906 /* Calls to trace a 64bit program from a 32bit program.  */
0907 #define VKI_PTRACE_PEEKTEXT_3264    0xc0
0908 #define VKI_PTRACE_PEEKDATA_3264    0xc1
0909 #define VKI_PTRACE_POKETEXT_3264    0xc2
0910 #define VKI_PTRACE_POKEDATA_3264    0xc3
0911 #define VKI_PTRACE_GET_THREAD_AREA_3264     0xc4s
0912 
0913 //----------------------------------------------------------------------
0914 // From linux-2.6.35.9/include/asm-generic/siginfo.h
0915 //----------------------------------------------------------------------
0916 
0917 #define HAVE_ARCH_SIGINFO_T
0918 typedef union vki_sigval {
0919         int sival_int;
0920         void __user *sival_ptr;
0921 } vki_sigval_t;
0922 
0923 #ifndef __VKI_ARCH_SI_PREAMBLE_SIZE
0924 #if defined(VGABI_64)
0925  #define __VKI_ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
0926 #elif defined(VGABI_N32)
0927 #define __VKI_ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
0928 #else
0929 #error unknown mips64 abi
0930 #endif
0931 #endif
0932 
0933 #define VKI_SI_MAX_SIZE 128
0934 
0935 #ifndef VKI_SI_PAD_SIZE
0936 #define VKI_SI_PAD_SIZE ((VKI_SI_MAX_SIZE - __VKI_ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
0937 #endif
0938 
0939 #ifndef __VKI_ARCH_SI_UID_T
0940 #define __VKI_ARCH_SI_UID_T vki_uid_t
0941 #endif
0942 
0943 #ifndef __VKI_ARCH_SI_BAND_T
0944 #define __VKI_ARCH_SI_BAND_T long
0945 #endif
0946 
0947 typedef struct vki_siginfo {
0948         int si_signo;
0949         int si_code;
0950         int si_errno;
0951         int __pad0[VKI_SI_MAX_SIZE / sizeof(int) - VKI_SI_PAD_SIZE - 3];
0952 
0953         union {
0954                 int _pad[VKI_SI_PAD_SIZE];
0955 
0956                 /* kill() */
0957                 struct {
0958                         vki_pid_t _pid;             /* sender's pid */
0959                         __VKI_ARCH_SI_UID_T _uid;   /* sender's uid */
0960                 } _kill;
0961 
0962                 /* POSIX.1b timers */
0963                 struct {
0964                         vki_timer_t _tid;           /* timer id */
0965                         int _overrun;           /* overrun count */
0966                         char _pad[sizeof( __VKI_ARCH_SI_UID_T) - sizeof(int)];
0967                         vki_sigval_t _sigval;       /* same as below */
0968                         int _sys_private;       /* not to be passed to user */
0969                 } _timer;
0970 
0971                 /* POSIX.1b signals */
0972                 struct {
0973                         vki_pid_t _pid;             /* sender's pid */
0974                         __VKI_ARCH_SI_UID_T _uid;   /* sender's uid */
0975                         vki_sigval_t _sigval;
0976                 } _rt;
0977 
0978                 /* SIGCHLD */
0979                 struct {
0980                         vki_pid_t _pid;             /* which child */
0981                         __VKI_ARCH_SI_UID_T _uid;   /* sender's uid */
0982                         int _status;            /* exit code */
0983                         vki_clock_t _utime;
0984                         vki_clock_t _stime;
0985                 } _sigchld;
0986 
0987                 /* IRIX SIGCHLD */
0988                 struct {
0989                         vki_pid_t _pid;             /* which child */
0990                         vki_clock_t _utime;
0991                         int _status;            /* exit code */
0992                         vki_clock_t _stime;
0993                 } _irix_sigchld;
0994 
0995                 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
0996                 struct {
0997                         void __user *_addr; /* faulting insn/memory ref. */
0998 #ifdef __ARCH_SI_TRAPNO
0999                         int _trapno;    /* TRAP # which caused the signal */
1000 #endif
1001                 } _sigfault;
1002 
1003                 /* SIGPOLL, SIGXFSZ (To do ...)  */
1004                 struct {
1005                         __VKI_ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */
1006                         int _fd;
1007                 } _sigpoll;
1008         } _sifields;
1009 } vki_siginfo_t;
1010 
1011 //----------------------------------------------------------------------
1012 // From linux-2.6.35.5/include/asm/break.h
1013 //----------------------------------------------------------------------
1014 #define VKI_BRK_OVERFLOW 6  /* Overflow check */
1015 #define VKI_BRK_DIVZERO  7  /* Divide by zero check */
1016 
1017 //----------------------------------------------------------------------
1018 // From linux-3.6.35.5/arch/mips/include/socket.h
1019 //----------------------------------------------------------------------
1020 enum vki_sock_type {
1021         VKI_SOCK_STREAM = 2,
1022         // [[others omitted]]
1023 };
1024 #define ARCH_HAS_SOCKET_TYPES 1
1025 
1026 //----------------------------------------------------------------------
1027 // From linux-3.13.0/include/asm/errno.h
1028 //----------------------------------------------------------------------
1029 
1030 #define VKI_ENOSYS       89  /* Function not implemented */
1031 #define VKI_EOVERFLOW    79  /* Value too large for defined data type */
1032 
1033 //----------------------------------------------------------------------
1034 // From linux-3.7.0/arch/mips/include/uapi/asm/errno.h
1035 //----------------------------------------------------------------------
1036 
1037 #define VKI_EOPNOTSUPP   122 /* Operation not supported on transport
1038                                 endpoint */
1039 
1040 #endif // __VKI_MIPS64_LINUX_H
1041 
1042 /*--------------------------------------------------------------------*/
1043 /*--- end                                       vki-mips64-linux.h ---*/
1044 /*--------------------------------------------------------------------*/