13622634bSMarkus Armbruster #ifndef MIPS64_TARGET_SYSCALL_H 23622634bSMarkus Armbruster #define MIPS64_TARGET_SYSCALL_H 3540635baSths 4540635baSths /* this struct defines the way the registers are stored on the 5540635baSths stack during a system call. */ 6540635baSths 7540635baSths struct target_pt_regs { 8540635baSths /* Saved main processor registers. */ 9597e2cecSRichard Henderson target_ulong regs[32]; 10540635baSths 11540635baSths /* Saved special registers. */ 12597e2cecSRichard Henderson target_ulong cp0_status; 13597e2cecSRichard Henderson target_ulong lo; 14597e2cecSRichard Henderson target_ulong hi; 15597e2cecSRichard Henderson target_ulong cp0_badvaddr; 16597e2cecSRichard Henderson target_ulong cp0_cause; 17597e2cecSRichard Henderson target_ulong cp0_epc; 18540635baSths }; 19540635baSths 20540635baSths /* Target errno definitions taken from asm-mips/errno.h */ 21540635baSths #undef TARGET_ENOMSG 22540635baSths #define TARGET_ENOMSG 35 /* Identifier removed */ 23540635baSths #undef TARGET_EIDRM 24540635baSths #define TARGET_EIDRM 36 /* Identifier removed */ 25540635baSths #undef TARGET_ECHRNG 26540635baSths #define TARGET_ECHRNG 37 /* Channel number out of range */ 27540635baSths #undef TARGET_EL2NSYNC 28540635baSths #define TARGET_EL2NSYNC 38 /* Level 2 not synchronized */ 29540635baSths #undef TARGET_EL3HLT 30540635baSths #define TARGET_EL3HLT 39 /* Level 3 halted */ 31540635baSths #undef TARGET_EL3RST 32540635baSths #define TARGET_EL3RST 40 /* Level 3 reset */ 33540635baSths #undef TARGET_ELNRNG 34540635baSths #define TARGET_ELNRNG 41 /* Link number out of range */ 35540635baSths #undef TARGET_EUNATCH 36540635baSths #define TARGET_EUNATCH 42 /* Protocol driver not attached */ 37540635baSths #undef TARGET_ENOCSI 38540635baSths #define TARGET_ENOCSI 43 /* No CSI structure available */ 39540635baSths #undef TARGET_EL2HLT 40540635baSths #define TARGET_EL2HLT 44 /* Level 2 halted */ 41540635baSths #undef TARGET_EDEADLK 42540635baSths #define TARGET_EDEADLK 45 /* Resource deadlock would occur */ 43540635baSths #undef TARGET_ENOLCK 44540635baSths #define TARGET_ENOLCK 46 /* No record locks available */ 45540635baSths #undef TARGET_EBADE 46540635baSths #define TARGET_EBADE 50 /* Invalid exchange */ 47540635baSths #undef TARGET_EBADR 48540635baSths #define TARGET_EBADR 51 /* Invalid request descriptor */ 49540635baSths #undef TARGET_EXFULL 50540635baSths #define TARGET_EXFULL 52 /* TARGET_Exchange full */ 51540635baSths #undef TARGET_ENOANO 52540635baSths #define TARGET_ENOANO 53 /* No anode */ 53540635baSths #undef TARGET_EBADRQC 54540635baSths #define TARGET_EBADRQC 54 /* Invalid request code */ 55540635baSths #undef TARGET_EBADSLT 56540635baSths #define TARGET_EBADSLT 55 /* Invalid slot */ 57540635baSths #undef TARGET_EDEADLOCK 58540635baSths #define TARGET_EDEADLOCK 56 /* File locking deadlock error */ 59540635baSths #undef TARGET_EBFONT 60540635baSths #define TARGET_EBFONT 59 /* Bad font file format */ 61540635baSths #undef TARGET_ENOSTR 62540635baSths #define TARGET_ENOSTR 60 /* Device not a stream */ 63540635baSths #undef TARGET_ENODATA 64540635baSths #define TARGET_ENODATA 61 /* No data available */ 65540635baSths #undef TARGET_ETIME 66540635baSths #define TARGET_ETIME 62 /* Timer expired */ 67540635baSths #undef TARGET_ENOSR 68540635baSths #define TARGET_ENOSR 63 /* Out of streams resources */ 69540635baSths #undef TARGET_ENONET 70540635baSths #define TARGET_ENONET 64 /* Machine is not on the network */ 71540635baSths #undef TARGET_ENOPKG 72540635baSths #define TARGET_ENOPKG 65 /* Package not installed */ 73540635baSths #undef TARGET_EREMOTE 74540635baSths #define TARGET_EREMOTE 66 /* Object is remote */ 75540635baSths #undef TARGET_ENOLINK 76540635baSths #define TARGET_ENOLINK 67 /* Link has been severed */ 77540635baSths #undef TARGET_EADV 78540635baSths #define TARGET_EADV 68 /* Advertise error */ 79540635baSths #undef TARGET_ESRMNT 80540635baSths #define TARGET_ESRMNT 69 /* Srmount error */ 81540635baSths #undef TARGET_ECOMM 82540635baSths #define TARGET_ECOMM 70 /* Communication error on send */ 83540635baSths #undef TARGET_EPROTO 84540635baSths #define TARGET_EPROTO 71 /* Protocol error */ 85540635baSths #undef TARGET_EDOTDOT 86540635baSths #define TARGET_EDOTDOT 73 /* RFS specific error */ 87540635baSths #undef TARGET_EMULTIHOP 88540635baSths #define TARGET_EMULTIHOP 74 /* Multihop attempted */ 89540635baSths #undef TARGET_EBADMSG 90540635baSths #define TARGET_EBADMSG 77 /* Not a data message */ 91540635baSths #undef TARGET_ENAMETOOLONG 92540635baSths #define TARGET_ENAMETOOLONG 78 /* File name too long */ 93540635baSths #undef TARGET_EOVERFLOW 94540635baSths #define TARGET_EOVERFLOW 79 /* Value too large for defined data type */ 95540635baSths #undef TARGET_ENOTUNIQ 96540635baSths #define TARGET_ENOTUNIQ 80 /* Name not unique on network */ 97540635baSths #undef TARGET_EBADFD 98540635baSths #define TARGET_EBADFD 81 /* File descriptor in bad state */ 99540635baSths #undef TARGET_EREMCHG 100540635baSths #define TARGET_EREMCHG 82 /* Remote address changed */ 101540635baSths #undef TARGET_ELIBACC 102540635baSths #define TARGET_ELIBACC 83 /* Can not access a needed shared library */ 103540635baSths #undef TARGET_ELIBBAD 104540635baSths #define TARGET_ELIBBAD 84 /* Accessing a corrupted shared library */ 105540635baSths #undef TARGET_ELIBSCN 106540635baSths #define TARGET_ELIBSCN 85 /* .lib section in a.out corrupted */ 107540635baSths #undef TARGET_ELIBMAX 108540635baSths #define TARGET_ELIBMAX 86 /* Attempting to link in too many shared libraries */ 109540635baSths #undef TARGET_ELIBEXEC 110540635baSths #define TARGET_ELIBEXEC 87 /* Cannot exec a shared library directly */ 111540635baSths #undef TARGET_EILSEQ 112540635baSths #define TARGET_EILSEQ 88 /* Illegal byte sequence */ 113540635baSths #undef TARGET_ENOSYS 114540635baSths #define TARGET_ENOSYS 89 /* Function not implemented */ 115540635baSths #undef TARGET_ELOOP 116540635baSths #define TARGET_ELOOP 90 /* Too many symbolic links encountered */ 117540635baSths #undef TARGET_ERESTART 118540635baSths #define TARGET_ERESTART 91 /* Interrupted system call should be restarted */ 119540635baSths #undef TARGET_ESTRPIPE 120540635baSths #define TARGET_ESTRPIPE 92 /* Streams pipe error */ 121540635baSths #undef TARGET_ENOTEMPTY 122540635baSths #define TARGET_ENOTEMPTY 93 /* Directory not empty */ 123540635baSths #undef TARGET_EUSERS 124540635baSths #define TARGET_EUSERS 94 /* Too many users */ 125540635baSths #undef TARGET_ENOTSOCK 126540635baSths #define TARGET_ENOTSOCK 95 /* Socket operation on non-socket */ 127540635baSths #undef TARGET_EDESTADDRREQ 128540635baSths #define TARGET_EDESTADDRREQ 96 /* Destination address required */ 129540635baSths #undef TARGET_EMSGSIZE 130540635baSths #define TARGET_EMSGSIZE 97 /* Message too long */ 131540635baSths #undef TARGET_EPROTOTYPE 132540635baSths #define TARGET_EPROTOTYPE 98 /* Protocol wrong type for socket */ 133540635baSths #undef TARGET_ENOPROTOOPT 134540635baSths #define TARGET_ENOPROTOOPT 99 /* Protocol not available */ 135540635baSths #undef TARGET_EPROTONOSUPPORT 136540635baSths #define TARGET_EPROTONOSUPPORT 120 /* Protocol not supported */ 137540635baSths #undef TARGET_ESOCKTNOSUPPORT 138540635baSths #define TARGET_ESOCKTNOSUPPORT 121 /* Socket type not supported */ 139540635baSths #undef TARGET_EOPNOTSUPP 140540635baSths #define TARGET_EOPNOTSUPP 122 /* Operation not supported on transport endpoint */ 141540635baSths #undef TARGET_EPFNOSUPPORT 142540635baSths #define TARGET_EPFNOSUPPORT 123 /* Protocol family not supported */ 143540635baSths #undef TARGET_EAFNOSUPPORT 144540635baSths #define TARGET_EAFNOSUPPORT 124 /* Address family not supported by protocol */ 145540635baSths #undef TARGET_EADDRINUSE 146540635baSths #define TARGET_EADDRINUSE 125 /* Address already in use */ 147540635baSths #undef TARGET_EADDRNOTAVAIL 148540635baSths #define TARGET_EADDRNOTAVAIL 126 /* Cannot assign requested address */ 149540635baSths #undef TARGET_ENETDOWN 150540635baSths #define TARGET_ENETDOWN 127 /* Network is down */ 151540635baSths #undef TARGET_ENETUNREACH 152540635baSths #define TARGET_ENETUNREACH 128 /* Network is unreachable */ 153540635baSths #undef TARGET_ENETRESET 154540635baSths #define TARGET_ENETRESET 129 /* Network dropped connection because of reset */ 155540635baSths #undef TARGET_ECONNABORTED 156540635baSths #define TARGET_ECONNABORTED 130 /* Software caused connection abort */ 157540635baSths #undef TARGET_ECONNRESET 158540635baSths #define TARGET_ECONNRESET 131 /* Connection reset by peer */ 159540635baSths #undef TARGET_ENOBUFS 160540635baSths #define TARGET_ENOBUFS 132 /* No buffer space available */ 161540635baSths #undef TARGET_EISCONN 162540635baSths #define TARGET_EISCONN 133 /* Transport endpoint is already connected */ 163540635baSths #undef TARGET_ENOTCONN 164540635baSths #define TARGET_ENOTCONN 134 /* Transport endpoint is not connected */ 165540635baSths #undef TARGET_EUCLEAN 166540635baSths #define TARGET_EUCLEAN 135 /* Structure needs cleaning */ 167540635baSths #undef TARGET_ENOTNAM 168540635baSths #define TARGET_ENOTNAM 137 /* Not a XENIX named type file */ 169540635baSths #undef TARGET_ENAVAIL 170540635baSths #define TARGET_ENAVAIL 138 /* No XENIX semaphores available */ 171540635baSths #undef TARGET_EISNAM 172540635baSths #define TARGET_EISNAM 139 /* Is a named type file */ 173540635baSths #undef TARGET_EREMOTEIO 174540635baSths #define TARGET_EREMOTEIO 140 /* Remote I/O error */ 175540635baSths #undef TARGET_EINIT 176540635baSths #define TARGET_EINIT 141 /* Reserved */ 177540635baSths #undef TARGET_EREMDEV 178540635baSths #define TARGET_EREMDEV 142 /* TARGET_Error 142 */ 179540635baSths #undef TARGET_ESHUTDOWN 180540635baSths #define TARGET_ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */ 181540635baSths #undef TARGET_ETOOMANYREFS 182540635baSths #define TARGET_ETOOMANYREFS 144 /* Too many references: cannot splice */ 183540635baSths #undef TARGET_ETIMEDOUT 184540635baSths #define TARGET_ETIMEDOUT 145 /* Connection timed out */ 185540635baSths #undef TARGET_ECONNREFUSED 186540635baSths #define TARGET_ECONNREFUSED 146 /* Connection refused */ 187540635baSths #undef TARGET_EHOSTDOWN 188540635baSths #define TARGET_EHOSTDOWN 147 /* Host is down */ 189540635baSths #undef TARGET_EHOSTUNREACH 190540635baSths #define TARGET_EHOSTUNREACH 148 /* No route to host */ 191540635baSths #undef TARGET_EALREADY 192540635baSths #define TARGET_EALREADY 149 /* Operation already in progress */ 193540635baSths #undef TARGET_EINPROGRESS 194540635baSths #define TARGET_EINPROGRESS 150 /* Operation now in progress */ 195540635baSths #undef TARGET_ESTALE 196540635baSths #define TARGET_ESTALE 151 /* Stale NFS file handle */ 197540635baSths #undef TARGET_ECANCELED 198540635baSths #define TARGET_ECANCELED 158 /* AIO operation canceled */ 199540635baSths /* 200540635baSths * These error are Linux extensions. 201540635baSths */ 202540635baSths #undef TARGET_ENOMEDIUM 203540635baSths #define TARGET_ENOMEDIUM 159 /* No medium found */ 204540635baSths #undef TARGET_EMEDIUMTYPE 205540635baSths #define TARGET_EMEDIUMTYPE 160 /* Wrong medium type */ 206540635baSths #undef TARGET_ENOKEY 207540635baSths #define TARGET_ENOKEY 161 /* Required key not available */ 208540635baSths #undef TARGET_EKEYEXPIRED 209540635baSths #define TARGET_EKEYEXPIRED 162 /* Key has expired */ 210540635baSths #undef TARGET_EKEYREVOKED 211540635baSths #define TARGET_EKEYREVOKED 163 /* Key has been revoked */ 212540635baSths #undef TARGET_EKEYREJECTED 213540635baSths #define TARGET_EKEYREJECTED 164 /* Key was rejected by service */ 214540635baSths 215540635baSths /* for robust mutexes */ 216540635baSths #undef TARGET_EOWNERDEAD 217540635baSths #define TARGET_EOWNERDEAD 165 /* Owner died */ 218540635baSths #undef TARGET_ENOTRECOVERABLE 219540635baSths #define TARGET_ENOTRECOVERABLE 166 /* State not recoverable */ 220540635baSths 221540635baSths 222540635baSths #define UNAME_MACHINE "mips64" 223cbc14e6fSRiku Voipio #define UNAME_MINIMUM_RELEASE "2.6.32" 2244ce6243dSPeter Maydell 2254ce6243dSPeter Maydell #define TARGET_CLONE_BACKWARDS 2260903c8beSTom Musta #define TARGET_MINSIGSTKSZ 2048 2276f6a4032STom Musta #define TARGET_MLOCKALL_MCL_CURRENT 1 2286f6a4032STom Musta #define TARGET_MLOCKALL_MCL_FUTURE 2 229460c579fSLluís Vilanova 230*ee8e7614SPeter Maydell #define TARGET_FORCE_SHMLBA 231*ee8e7614SPeter Maydell 232*ee8e7614SPeter Maydell static inline abi_ulong target_shmlba(CPUMIPSState *env) 233*ee8e7614SPeter Maydell { 234*ee8e7614SPeter Maydell return 0x40000; 235*ee8e7614SPeter Maydell } 236*ee8e7614SPeter Maydell 2373622634bSMarkus Armbruster #endif /* MIPS64_TARGET_SYSCALL_H */ 238