File indexing completed on 2025-01-18 10:13:24
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 #ifndef __VKI_MIPS64_LINUX_H
0027 #define __VKI_MIPS64_LINUX_H
0028
0029 #include <config.h>
0030
0031
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
0040
0041
0042 #define VKI_ICACHE (1<<0)
0043 #define VKI_DCACHE (1<<1)
0044 #define VKI_BCACHE (VKI_ICACHE | VKI_DCACHE)
0045
0046
0047
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
0078
0079
0080
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
0089
0090
0091 #define VKI_SHMLBA 0x40000
0092
0093
0094
0095
0096
0097 #define VKI_MINSIGSTKSZ 2048
0098
0099 #define VKI_SIG_BLOCK 1
0100 #define VKI_SIG_UNBLOCK 2
0101 #define VKI_SIG_SETMASK 3
0102
0103
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)
0111 #define VKI_SIG_IGN ((__vki_sighandler_t)1)
0112 #define VKI_SIG_ERR ((__vki_sighandler_t)-1)
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;
0119
0120 typedef struct {
0121 unsigned long sig[_VKI_NSIG_WORDS];
0122 } vki_sigset_t;
0123
0124 #define VKI_SIGHUP 1
0125 #define VKI_SIGINT 2
0126 #define VKI_SIGQUIT 3
0127 #define VKI_SIGILL 4
0128 #define VKI_SIGTRAP 5
0129 #define VKI_SIGIOT 6
0130 #define VKI_SIGABRT VKI_SIGIOT
0131 #define VKI_SIGEMT 7
0132 #define VKI_SIGFPE 8
0133 #define VKI_SIGKILL 9
0134 #define VKI_SIGBUS 10
0135 #define VKI_SIGSEGV 11
0136 #define VKI_SIGSYS 12
0137 #define VKI_SIGPIPE 13
0138 #define VKI_SIGALRM 14
0139 #define VKI_SIGTERM 15
0140 #define VKI_SIGUSR1 16
0141 #define VKI_SIGUSR2 17
0142 #define VKI_SIGCHLD 18
0143 #define VKI_SIGCLD VKI_SIGCHLD
0144 #define VKI_SIGPWR 19
0145 #define VKI_SIGWINCH 20
0146 #define VKI_SIGURG 21
0147 #define VKI_SIGIO 22
0148 #define VKI_SIGPOLL VKI_SIGIO
0149 #define VKI_SIGSTOP 23
0150 #define VKI_SIGTSTP 24
0151 #define VKI_SIGCONT 25
0152 #define VKI_SIGTTIN 26
0153 #define VKI_SIGTTOU 27
0154 #define VKI_SIGVTALRM 28
0155 #define VKI_SIGPROF 29
0156 #define VKI_SIGXCPU 30
0157 #define VKI_SIGXFSZ 31
0158
0159
0160 #define VKI_SIGRTMIN 32
0161
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
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
0183
0184
0185
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
0201 unsigned int sa_flags;
0202 __vki_sighandler_t ksa_handler;
0203 vki_sigset_t sa_mask;
0204 __vki_sigrestore_t sa_restorer;
0205 };
0206
0207
0208
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
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
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;
0249
0250
0251 unsigned long _fxsr_env[6];
0252 unsigned long mxcsr;
0253 unsigned long reserved;
0254 struct _vki_fpxreg _fxsr_st[8];
0255 struct _vki_xmmreg _xmm[8];
0256 unsigned long padding[56];
0257 };
0258
0259
0260
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
0282
0283
0284 #define VKI_PROT_NONE 0x0
0285 #define VKI_PROT_READ 0x1
0286 #define VKI_PROT_WRITE 0x2
0287 #define VKI_PROT_EXEC 0x4
0288 #define VKI_PROT_GROWSDOWN 0x01000000
0289
0290 #define VKI_PROT_GROWSUP 0x02000000
0291
0292
0293 #define VKI_MAP_SHARED 0x001
0294 #define VKI_MAP_PRIVATE 0x002
0295
0296 #define VKI_MAP_FIXED 0x010
0297
0298 #define VKI_MAP_NORESERVE 0x0400
0299
0300
0301 #define VKI_MAP_NORESERVE 0x0400
0302 #define VKI_MAP_ANONYMOUS 0x0800
0303 #define VKI_MAP_GROWSDOWN 0x1000
0304 #define VKI_MAP_DENYWRITE 0x2000
0305 #define VKI_MAP_EXECUTABLE 0x4000
0306 #define VKI_MAP_LOCKED 0x8000
0307 #define VKI_MAP_POPULATE 0x10000
0308 #define VKI_MAP_NONBLOCK 0x20000
0309
0310
0311
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
0320 #define VKI_O_EXCL 0x0400
0321
0322 #define VKI_O_TRUNC 0x0200
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
0331 #define VKI_F_GETFD 1
0332 #define VKI_F_SETFD 2
0333 #define VKI_F_GETFL 3
0334 #define VKI_F_SETFL 4
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
0341 #define VKI_F_GETOWN 23
0342 #define VKI_F_SETSIG 10
0343 #define VKI_F_GETSIG 11
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
0353 #define VKI_F_SETLK64 34
0354 #define VKI_F_SETLKW64 35
0355
0356
0357 #define VKI_FD_CLOEXEC 1
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
0368
0369
0370 #define VKI_RLIMIT_DATA 2
0371 #define VKI_RLIMIT_STACK 3
0372 #define VKI_RLIMIT_CORE 4
0373 #define VKI_RLIMIT_NOFILE 5
0374
0375
0376
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
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
0393 #define VKI_SIOCGSTAMPNS 0x8907
0394
0395
0396
0397
0398
0399
0400
0401 struct vki_stat {
0402 unsigned int st_dev;
0403 unsigned int st_pad0[3];
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];
0419
0420 #if defined(VGABI_N32)
0421 long long st_size;
0422 #else
0423 long st_size;
0424 #endif
0425
0426
0427
0428
0429
0430 unsigned int st_atime;
0431 unsigned int st_atime_nsec;
0432
0433 unsigned int st_mtime;
0434 unsigned int st_mtime_nsec;
0435
0436 unsigned int st_ctime;
0437 unsigned int st_ctime_nsec;
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];
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];
0459
0460 long long st_size;
0461
0462
0463
0464
0465
0466 unsigned long st_atime;
0467 unsigned long st_atime_nsec;
0468
0469 unsigned long st_mtime;
0470 unsigned long st_mtime_nsec;
0471
0472 unsigned long st_ctime;
0473 unsigned long st_ctime_nsec;
0474
0475 unsigned long st_blksize;
0476 unsigned long st_pad2;
0477
0478 long long st_blocks;
0479 };
0480
0481
0482
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
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;
0515 unsigned short c_oflag;
0516 unsigned short c_cflag;
0517 unsigned short c_lflag;
0518 char c_line;
0519 unsigned char c_cc[NCCS];
0520 };
0521
0522
0523
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;
0532 vki_tcflag_t c_oflag;
0533 vki_tcflag_t c_cflag;
0534 vki_tcflag_t c_lflag;
0535 vki_cc_t c_line;
0536 vki_cc_t c_cc[NCCS];
0537 };
0538
0539
0540
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
0569 extern unsigned int __VKI_invalid_size_argument_for_IOC;
0570
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
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
0587
0588
0589 #define VKI_TCGETA 0x5401
0590 #define VKI_TCSETA 0x5402
0591
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
0605 #define VKI_TIOCNXCL 0x740e
0606 #define VKI_TIOCOUTQ 0x7472
0607 #define VKI_TIOCSTI 0x5472
0608 #define VKI_TIOCMGET 0x741d
0609 #define VKI_TIOCMBIS 0x741b
0610 #define VKI_TIOCMBIC 0x741c
0611 #define VKI_TIOCMSET 0x741a
0612 #define VKI_TIOCPKT 0x5470
0613 #define VKI_TIOCPKT_DATA 0x00
0614 #define VKI_TIOCPKT_FLUSHREAD 0x01
0615 #define VKI_TIOCPKT_FLUSHWRITE 0x02
0616 #define VKI_TIOCPKT_STOP 0x04
0617 #define VKI_TIOCPKT_START 0x08
0618 #define VKI_TIOCPKT_NOSTOP 0x10
0619 #define VKI_TIOCPKT_DOSTOP 0x20
0620
0621
0622 #define VKI_TIOCSWINSZ _VKI_IOW('t', 103, struct vki_winsize)
0623
0624 #define VKI_TIOCGWINSZ _VKI_IOR('t', 104, struct vki_winsize)
0625 #define VKI_TIOCNOTTY 0x5471
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
0636 #define VKI_TIOCSLTC 0x7475
0637 #define VKI_TIOCSPGRP _VKI_IOW('t', 118, int)
0638 #define VKI_TIOCGPGRP _VKI_IOR('t', 119, int)
0639 #define VKI_TIOCCONS _VKI_IOW('t', 120, int)
0640
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
0648
0649 #define VKI_TIOCSBRK 0x5427
0650 #define VKI_TIOCCBRK 0x5428
0651 #define VKI_TIOCGSID 0x7416
0652 #define VKI_TIOCGPTN _VKI_IOR('T',0x30, unsigned int)
0653
0654 #define VKI_TIOCSPTLCK _VKI_IOW('T',0x31, int)
0655
0656
0657 #define VKI_TIOCSCTTY 0x5480
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
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
0670 #define VKI_TIOCSERGETLSR 0x548e
0671 #define VKI_TIOCSERGETMULTI 0x548f
0672 #define VKI_TIOCSERSETMULTI 0x5490
0673 #define VKI_TIOCMIWAIT 0x5491
0674
0675 #define VKI_TIOCGICOUNT 0x5492
0676
0677 #define VKI_TIOCGHAYESESP 0x5493
0678 #define VKI_TIOCSHAYESESP 0x5494
0679
0680
0681
0682
0683
0684
0685 #define VKI_POLLIN 0x0001
0686
0687 struct vki_pollfd {
0688 int fd;
0689 short events;
0690 short revents;
0691 };
0692
0693
0694
0695
0696 #define VKI_ELF_NGREG 45
0697 #define VKI_ELF_NFPREG 33
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
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;
0718 };
0719
0720 typedef char vki_modify_ldt_t;
0721
0722
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
0740
0741
0742 struct vki_semid64_ds {
0743 struct vki_ipc64_perm sem_perm;
0744 __vki_kernel_time_t sem_otime;
0745 __vki_kernel_time_t sem_ctime;
0746 unsigned long sem_nsems;
0747 unsigned long __unused1;
0748 unsigned long __unused2;
0749 };
0750
0751
0752
0753
0754
0755 struct vki_msqid64_ds {
0756 struct vki_ipc64_perm msg_perm;
0757 __vki_kernel_time_t msg_stime;
0758 __vki_kernel_time_t msg_rtime;
0759 __vki_kernel_time_t msg_ctime;
0760 unsigned long msg_cbytes;
0761 unsigned long msg_qnum;
0762 unsigned long msg_qbytes;
0763 __vki_kernel_pid_t msg_lspid;
0764 __vki_kernel_pid_t msg_lrpid;
0765 unsigned long __unused4;
0766 unsigned long __unused5;
0767 };
0768
0769
0770
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
0793
0794
0795 struct vki_shmid64_ds {
0796 struct vki_ipc64_perm shm_perm;
0797 vki_size_t shm_segsz;
0798 __vki_kernel_time_t shm_atime;
0799 __vki_kernel_time_t shm_dtime;
0800 __vki_kernel_time_t shm_ctime;
0801 __vki_kernel_pid_t shm_cpid;
0802 __vki_kernel_pid_t shm_lpid;
0803 unsigned long shm_nattch;
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
0822
0823
0824 struct vki_pt_regs {
0825 #ifdef CONFIG_32BIT
0826
0827 unsigned long pad0[6];
0828 #endif
0829
0830
0831 unsigned long regs[32];
0832
0833
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
0846 #ifdef CONFIG_CPU_CAVIUM_OCTEON
0847 unsigned long long mpl[3];
0848 unsigned long long mtp[3];
0849 #endif
0850 } __attribute__ ((aligned (8)));
0851
0852
0853
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
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
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
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
0957 struct {
0958 vki_pid_t _pid;
0959 __VKI_ARCH_SI_UID_T _uid;
0960 } _kill;
0961
0962
0963 struct {
0964 vki_timer_t _tid;
0965 int _overrun;
0966 char _pad[sizeof( __VKI_ARCH_SI_UID_T) - sizeof(int)];
0967 vki_sigval_t _sigval;
0968 int _sys_private;
0969 } _timer;
0970
0971
0972 struct {
0973 vki_pid_t _pid;
0974 __VKI_ARCH_SI_UID_T _uid;
0975 vki_sigval_t _sigval;
0976 } _rt;
0977
0978
0979 struct {
0980 vki_pid_t _pid;
0981 __VKI_ARCH_SI_UID_T _uid;
0982 int _status;
0983 vki_clock_t _utime;
0984 vki_clock_t _stime;
0985 } _sigchld;
0986
0987
0988 struct {
0989 vki_pid_t _pid;
0990 vki_clock_t _utime;
0991 int _status;
0992 vki_clock_t _stime;
0993 } _irix_sigchld;
0994
0995
0996 struct {
0997 void __user *_addr;
0998 #ifdef __ARCH_SI_TRAPNO
0999 int _trapno;
1000 #endif
1001 } _sigfault;
1002
1003
1004 struct {
1005 __VKI_ARCH_SI_BAND_T _band;
1006 int _fd;
1007 } _sigpoll;
1008 } _sifields;
1009 } vki_siginfo_t;
1010
1011
1012
1013
1014 #define VKI_BRK_OVERFLOW 6
1015 #define VKI_BRK_DIVZERO 7
1016
1017
1018
1019
1020 enum vki_sock_type {
1021 VKI_SOCK_STREAM = 2,
1022
1023 };
1024 #define ARCH_HAS_SOCKET_TYPES 1
1025
1026
1027
1028
1029
1030 #define VKI_ENOSYS 89
1031 #define VKI_EOVERFLOW 79
1032
1033
1034
1035
1036
1037 #define VKI_EOPNOTSUPP 122
1038
1039
1040 #endif
1041
1042
1043
1044