File indexing completed on 2025-01-18 10:13:23
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
0027
0028 #ifndef __VKI_MIPS32_LINUX_H
0029 #define __VKI_MIPS32_LINUX_H
0030
0031 #include <config.h>
0032
0033
0034 #if defined (_MIPSEL)
0035 #define VKI_LITTLE_ENDIAN 1
0036 #elif defined (_MIPSEB)
0037 #define VKI_BIG_ENDIAN 1
0038 #endif
0039
0040
0041
0042
0043
0044
0045 typedef __signed__ char __vki_s8;
0046 typedef unsigned char __vki_u8;
0047
0048 typedef __signed__ short __vki_s16;
0049 typedef unsigned short __vki_u16;
0050
0051 typedef __signed__ int __vki_s32;
0052 typedef unsigned int __vki_u32;
0053
0054 typedef __signed char vki_s8;
0055 typedef unsigned char vki_u8;
0056
0057 typedef __signed short vki_s16;
0058 typedef unsigned short vki_u16;
0059
0060 typedef __signed int vki_s32;
0061 typedef unsigned int vki_u32;
0062
0063 typedef __signed__ long long __vki_s64;
0064 typedef unsigned long long __vki_u64;
0065
0066
0067
0068
0069
0070
0071
0072 extern UWord VKI_PAGE_SHIFT;
0073 extern UWord VKI_PAGE_SIZE;
0074 #define VKI_PAGE_MASK (~(VKI_PAGE_SIZE-1))
0075 #define VKI_MAX_PAGE_SHIFT 16
0076 #define VKI_MAX_PAGE_SIZE (1UL << VKI_MAX_PAGE_SHIFT)
0077
0078
0079
0080
0081
0082 #define VKI_SHMLBA 0x40000
0083
0084
0085
0086
0087
0088 #define VKI_MINSIGSTKSZ 2048
0089
0090 #define VKI_SIG_BLOCK 1
0091 #define VKI_SIG_UNBLOCK 2
0092 #define VKI_SIG_SETMASK 3
0093
0094
0095 typedef void __vki_signalfn_t(int);
0096 typedef __vki_signalfn_t __user *__vki_sighandler_t;
0097
0098 typedef void __vki_restorefn_t(void);
0099 typedef __vki_restorefn_t __user *__vki_sigrestore_t;
0100
0101 #define VKI_SIG_DFL ((__vki_sighandler_t)0)
0102 #define VKI_SIG_IGN ((__vki_sighandler_t)1)
0103
0104 #define _VKI_NSIG 128
0105 #define _VKI_NSIG_BPW 32
0106 #define _VKI_NSIG_WORDS (_VKI_NSIG / _VKI_NSIG_BPW)
0107
0108 typedef unsigned long vki_old_sigset_t;
0109
0110 typedef struct {
0111 unsigned long sig[_VKI_NSIG_WORDS];
0112 } vki_sigset_t;
0113
0114 #define VKI_SIGHUP 1
0115 #define VKI_SIGINT 2
0116 #define VKI_SIGQUIT 3
0117 #define VKI_SIGILL 4
0118 #define VKI_SIGTRAP 5
0119 #define VKI_SIGIOT 6
0120 #define VKI_SIGABRT VKI_SIGIOT
0121 #define VKI_SIGEMT 7
0122 #define VKI_SIGFPE 8
0123 #define VKI_SIGKILL 9
0124 #define VKI_SIGBUS 10
0125 #define VKI_SIGSEGV 11
0126 #define VKI_SIGSYS 12
0127 #define VKI_SIGPIPE 13
0128 #define VKI_SIGALRM 14
0129 #define VKI_SIGTERM 15
0130 #define VKI_SIGUSR1 16
0131 #define VKI_SIGUSR2 17
0132 #define VKI_SIGCHLD 18
0133 #define VKI_SIGCLD VKI_SIGCHLD
0134 #define VKI_SIGPWR 19
0135 #define VKI_SIGWINCH 20
0136 #define VKI_SIGURG 21
0137 #define VKI_SIGIO 22
0138 #define VKI_SIGPOLL VKI_SIGIO
0139 #define VKI_SIGSTOP 23
0140 #define VKI_SIGTSTP 24
0141 #define VKI_SIGCONT 25
0142 #define VKI_SIGTTIN 26
0143 #define VKI_SIGTTOU 27
0144 #define VKI_SIGVTALRM 28
0145 #define VKI_SIGPROF 29
0146 #define VKI_SIGXCPU 30
0147 #define VKI_SIGXFSZ 31
0148
0149
0150 #define VKI_SIGRTMIN 32
0151
0152 #define VKI_SIGRTMAX _VKI_NSIG
0153
0154 #define VKI_SA_ONSTACK 0x08000000
0155 #define VKI_SA_RESETHAND 0x80000000
0156 #define VKI_SA_RESTART 0x10000000
0157 #define VKI_SA_SIGINFO 0x00000008
0158 #define VKI_SA_NODEFER 0x40000000
0159 #define VKI_SA_NOCLDWAIT 0x00010000
0160 #define VKI_SA_NOCLDSTOP 0x00000001
0161
0162 #define VKI_SA_NOMASK VKI_SA_NODEFER
0163 #define VKI_SA_ONESHOT VKI_SA_RESETHAND
0164
0165
0166 #define VKI_SA_RESTORER 0x04000000
0167
0168 #define VKI_SS_ONSTACK 1
0169 #define VKI_SS_DISABLE 2
0170
0171 struct vki_old_sigaction {
0172
0173
0174
0175
0176 unsigned long sa_flags;
0177 __vki_sighandler_t ksa_handler;
0178 vki_old_sigset_t sa_mask;
0179 __vki_sigrestore_t sa_restorer;
0180 };
0181
0182 struct vki_sigaction {
0183 unsigned int sa_flags;
0184 __vki_sighandler_t sa_handler;
0185 vki_sigset_t sa_mask;
0186 };
0187
0188
0189 struct vki_sigaction_base {
0190
0191 unsigned long sa_flags;
0192 __vki_sighandler_t ksa_handler;
0193
0194 vki_sigset_t sa_mask;
0195 __vki_sigrestore_t sa_restorer;
0196 };
0197
0198
0199
0200 typedef struct vki_sigaction_base vki_sigaction_toK_t;
0201 typedef struct vki_sigaction_base vki_sigaction_fromK_t;
0202
0203 typedef struct vki_sigaltstack {
0204 void __user *ss_sp;
0205 vki_size_t ss_size;
0206 int ss_flags;
0207
0208 } vki_stack_t;
0209
0210
0211
0212
0213
0214
0215 struct _vki_fpreg {
0216 unsigned short significand[4];
0217 unsigned short exponent;
0218 };
0219
0220 struct _vki_fpxreg {
0221 unsigned short significand[4];
0222 unsigned short exponent;
0223 unsigned short padding[3];
0224 };
0225
0226 struct _vki_xmmreg {
0227 unsigned long element[4];
0228 };
0229
0230 struct _vki_fpstate {
0231
0232 unsigned long cw;
0233 unsigned long sw;
0234 unsigned long tag;
0235 unsigned long ipoff;
0236 unsigned long cssel;
0237 unsigned long dataoff;
0238 unsigned long datasel;
0239 struct _vki_fpreg _st[8];
0240 unsigned short status;
0241 unsigned short magic;
0242
0243
0244 unsigned long _fxsr_env[6];
0245 unsigned long mxcsr;
0246 unsigned long reserved;
0247 struct _vki_fpxreg _fxsr_st[8];
0248 struct _vki_xmmreg _xmm[8];
0249 unsigned long padding[56];
0250 };
0251
0252
0253
0254
0255
0256 struct vki_sigcontext {
0257 unsigned int sc_regmask;
0258 unsigned int sc_status;
0259 unsigned long long sc_pc;
0260 unsigned long long sc_regs[32];
0261 unsigned long long sc_fpregs[32];
0262 unsigned int sc_acx;
0263 unsigned int sc_fpc_csr;
0264 unsigned int sc_fpc_eir;
0265 unsigned int sc_used_math;
0266 unsigned int sc_dsp;
0267 unsigned long long sc_mdhi;
0268 unsigned long long sc_mdlo;
0269 unsigned long sc_hi1;
0270 unsigned long sc_lo1;
0271 unsigned long sc_hi2;
0272 unsigned long sc_lo2;
0273 unsigned long sc_hi3;
0274 unsigned long sc_lo3;
0275 };
0276
0277
0278
0279
0280
0281 #define VKI_PROT_NONE 0x0
0282 #define VKI_PROT_READ 0x1
0283 #define VKI_PROT_WRITE 0x2
0284 #define VKI_PROT_EXEC 0x4
0285 #define VKI_PROT_GROWSDOWN 0x01000000
0286 #define VKI_PROT_GROWSUP 0x02000000
0287
0288 #define VKI_MAP_SHARED 0x001
0289 #define VKI_MAP_PRIVATE 0x002
0290 #define VKI_MAP_FIXED 0x010
0291
0292 #define VKI_MAP_NORESERVE 0x0400
0293
0294
0295 #define VKI_MAP_NORESERVE 0x0400
0296 #define VKI_MAP_ANONYMOUS 0x0800
0297 #define VKI_MAP_GROWSDOWN 0x1000
0298 #define VKI_MAP_DENYWRITE 0x2000
0299 #define VKI_MAP_EXECUTABLE 0x4000
0300 #define VKI_MAP_LOCKED 0x8000
0301 #define VKI_MAP_POPULATE 0x10000
0302 #define VKI_MAP_NONBLOCK 0x20000
0303
0304
0305
0306
0307
0308
0309 #define VKI_O_ACCMODE 03
0310 #define VKI_O_RDONLY 00
0311 #define VKI_O_WRONLY 01
0312 #define VKI_O_RDWR 02
0313
0314 #define VKI_O_CREAT 0x0100
0315 #define VKI_O_EXCL 0x0400
0316
0317 #define VKI_O_TRUNC 0x0200
0318
0319 #define VKI_O_APPEND 0x0008
0320 #define VKI_O_NONBLOCK 0x0080
0321 #define VKI_O_LARGEFILE 0x2000
0322
0323 #define VKI_AT_FDCWD -100
0324
0325 #define VKI_F_DUPFD 0
0326 #define VKI_F_GETFD 1
0327 #define VKI_F_SETFD 2
0328 #define VKI_F_GETFL 3
0329 #define VKI_F_SETFL 4
0330
0331 #define VKI_F_GETLK 14
0332 #define VKI_F_SETLK 6
0333 #define VKI_F_SETLKW 7
0334
0335 #define VKI_F_SETOWN 24
0336 #define VKI_F_GETOWN 23
0337 #define VKI_F_SETSIG 10
0338 #define VKI_F_GETSIG 11
0339
0340 #define VKI_F_SETOWN_EX 15
0341 #define VKI_F_GETOWN_EX 16
0342
0343 #define VKI_F_OFD_GETLK 36
0344 #define VKI_F_OFD_SETLK 37
0345 #define VKI_F_OFD_SETLKW 38
0346
0347 #define VKI_F_GETLK64 33
0348 #define VKI_F_SETLK64 34
0349 #define VKI_F_SETLKW64 35
0350
0351
0352 #define VKI_FD_CLOEXEC 1
0353
0354 #define VKI_F_LINUX_SPECIFIC_BASE 1024
0355
0356 struct vki_f_owner_ex {
0357 int type;
0358 __vki_kernel_pid_t pid;
0359 };
0360
0361
0362
0363
0364
0365 #define VKI_RLIMIT_DATA 2
0366 #define VKI_RLIMIT_STACK 3
0367 #define VKI_RLIMIT_CORE 4
0368 #define VKI_RLIMIT_NOFILE 5
0369 #define VKI_RLIM_INFINITY 0x7fffffffUL
0370
0371
0372
0373
0374
0375 #define VKI_SOL_SOCKET 0xffff
0376
0377 #define VKI_SO_TYPE 0x1008
0378
0379 #define VKI_SO_ATTACH_FILTER 26
0380
0381
0382
0383
0384
0385 #define VKI_SIOCATMARK _VKI_IOR('s', 7, int)
0386 #define VKI_SIOCSPGRP _VKI_IOW('s', 8, vki_pid_t)
0387 #define VKI_SIOCGPGRP _VKI_IOR('s', 9, vki_pid_t)
0388 #define VKI_SIOCGSTAMP 0x8906
0389 #define VKI_SIOCGSTAMPNS 0x8907
0390
0391
0392
0393
0394
0395 struct vki_stat {
0396 unsigned st_dev;
0397 long st_pad1[3];
0398 unsigned long st_ino;
0399 unsigned int st_mode;
0400 unsigned long st_nlink;
0401 unsigned int st_uid;
0402 unsigned int st_gid;
0403 unsigned st_rdev;
0404 long st_pad2[2];
0405 long st_size;
0406 long st_pad3;
0407
0408
0409
0410
0411 long st_atime;
0412 long st_atime_nsec;
0413 long st_mtime;
0414 long st_mtime_nsec;
0415 long st_ctime;
0416 long st_ctime_nsec;
0417 long st_blksize;
0418 long st_blocks;
0419 long st_pad4[14];
0420 };
0421
0422
0423
0424
0425
0426
0427
0428 struct vki_stat64 {
0429 unsigned long st_dev;
0430 unsigned long st_pad0[3];
0431
0432 unsigned long long st_ino;
0433
0434 unsigned int st_mode;
0435 unsigned long st_nlink;
0436
0437 unsigned int st_uid;
0438 unsigned int st_gid;
0439
0440 unsigned long st_rdev;
0441 unsigned long st_pad1[3];
0442
0443 long long st_size;
0444
0445
0446
0447
0448
0449 long st_atime;
0450 unsigned long st_atime_nsec;
0451
0452 long st_mtime;
0453 unsigned long st_mtime_nsec;
0454
0455 long st_ctime;
0456 unsigned long st_ctime_nsec;
0457
0458 unsigned long st_blksize;
0459 unsigned long st_pad2;
0460
0461 long long st_blocks;
0462 };
0463
0464
0465
0466
0467
0468 struct vki_statfs {
0469 long f_type;
0470 long f_bsize;
0471 long f_frsize;
0472 long f_blocks;
0473 long f_bfree;
0474 long f_files;
0475 long f_ffree;
0476 long f_bavail;
0477
0478
0479 __vki_kernel_fsid_t f_fsid;
0480 long f_namelen;
0481 long f_spare[6];
0482 };
0483
0484
0485
0486
0487
0488 struct vki_winsize {
0489 unsigned short ws_row;
0490 unsigned short ws_col;
0491 unsigned short ws_xpixel;
0492 unsigned short ws_ypixel;
0493 };
0494
0495 #define NCC 8
0496 #define NCCS 23
0497 struct vki_termio {
0498 unsigned short c_iflag;
0499 unsigned short c_oflag;
0500 unsigned short c_cflag;
0501 unsigned short c_lflag;
0502 char c_line;
0503 unsigned char c_cc[NCCS];
0504 };
0505
0506
0507
0508
0509
0510
0511 typedef unsigned char vki_cc_t;
0512 typedef unsigned long vki_speed_t;
0513 typedef unsigned long vki_tcflag_t;
0514
0515 struct vki_termios {
0516 vki_tcflag_t c_iflag;
0517 vki_tcflag_t c_oflag;
0518 vki_tcflag_t c_cflag;
0519 vki_tcflag_t c_lflag;
0520 vki_cc_t c_line;
0521 vki_cc_t c_cc[NCCS];
0522 };
0523
0524
0525
0526
0527
0528 #define _VKI_IOC_NRBITS 8
0529 #define _VKI_IOC_TYPEBITS 8
0530 #define _VKI_IOC_SIZEBITS 13
0531 #define _VKI_IOC_DIRBITS 3
0532
0533 #define _VKI_IOC_NRMASK ((1 << _VKI_IOC_NRBITS)-1)
0534 #define _VKI_IOC_TYPEMASK ((1 << _VKI_IOC_TYPEBITS)-1)
0535 #define _VKI_IOC_SIZEMASK ((1 << _VKI_IOC_SIZEBITS)-1)
0536 #define _VKI_IOC_DIRMASK ((1 << _VKI_IOC_DIRBITS)-1)
0537
0538 #define _VKI_IOC_NRSHIFT 0
0539 #define _VKI_IOC_TYPESHIFT (_VKI_IOC_NRSHIFT+_VKI_IOC_NRBITS)
0540 #define _VKI_IOC_SIZESHIFT (_VKI_IOC_TYPESHIFT+_VKI_IOC_TYPEBITS)
0541 #define _VKI_IOC_DIRSHIFT (_VKI_IOC_SIZESHIFT+_VKI_IOC_SIZEBITS)
0542
0543 #define _VKI_IOC_NONE 1U
0544 #define _VKI_IOC_READ 2U
0545 #define _VKI_IOC_WRITE 4U
0546
0547 #define _VKI_IOC(dir,type,nr,size) \
0548 (((dir) << _VKI_IOC_DIRSHIFT) | \
0549 ((type) << _VKI_IOC_TYPESHIFT) | \
0550 ((nr) << _VKI_IOC_NRSHIFT) | \
0551 ((size) << _VKI_IOC_SIZESHIFT))
0552
0553
0554 extern unsigned int __VKI_invalid_size_argument_for_IOC;
0555
0556 #define _VKI_IO(type,nr) _VKI_IOC(_VKI_IOC_NONE,(type),(nr),0)
0557 #define _VKI_IOR(type,nr,size) _VKI_IOC(_VKI_IOC_READ,(type),(nr),(_VKI_IOC_TYPECHECK(size)))
0558 #define _VKI_IOW(type,nr,size) _VKI_IOC(_VKI_IOC_WRITE,(type),(nr),(_VKI_IOC_TYPECHECK(size)))
0559 #define _VKI_IOWR(type,nr,size) _VKI_IOC(_VKI_IOC_READ|_VKI_IOC_WRITE,(type),(nr),(_VKI_IOC_TYPECHECK(size)))
0560
0561
0562 #define _VKI_IOC_DIR(nr) (((nr) >> _VKI_IOC_DIRSHIFT) & _VKI_IOC_DIRMASK)
0563 #define _VKI_IOC_TYPE(nr) (((nr) >> _VKI_IOC_TYPESHIFT) & _VKI_IOC_TYPEMASK)
0564 #define _VKI_IOC_NR(nr) (((nr) >> _VKI_IOC_NRSHIFT) & _VKI_IOC_NRMASK)
0565 #define _VKI_IOC_SIZE(nr) (((nr) >> _VKI_IOC_SIZESHIFT) & _VKI_IOC_SIZEMASK)
0566
0567
0568
0569
0570
0571 #define VKI_TCGETA 0x5401
0572 #define VKI_TCSETA 0x5402
0573 #define VKI_TCSETAW 0x5403
0574 #define VKI_TCSETAF 0x5404
0575
0576 #define VKI_TCSBRK 0x5405
0577 #define VKI_TCXONC 0x5406
0578 #define VKI_TCFLSH 0x5407
0579
0580 #define VKI_TCGETS 0x540d
0581 #define VKI_TCSETS 0x540e
0582 #define VKI_TCSETSW 0x540f
0583 #define VKI_TCSETSF 0x5410
0584
0585 #define VKI_TIOCEXCL 0x740d
0586 #define VKI_TIOCNXCL 0x740e
0587 #define VKI_TIOCOUTQ 0x7472
0588 #define VKI_TIOCSTI 0x5472
0589 #define VKI_TIOCMGET 0x741d
0590 #define VKI_TIOCMBIS 0x741b
0591 #define VKI_TIOCMBIC 0x741c
0592 #define VKI_TIOCMSET 0x741a
0593 #define VKI_TIOCPKT 0x5470
0594 #define VKI_TIOCPKT_DATA 0x00
0595 #define VKI_TIOCPKT_FLUSHREAD 0x01
0596 #define VKI_TIOCPKT_FLUSHWRITE 0x02
0597 #define VKI_TIOCPKT_STOP 0x04
0598 #define VKI_TIOCPKT_START 0x08
0599 #define VKI_TIOCPKT_NOSTOP 0x10
0600 #define VKI_TIOCPKT_DOSTOP 0x20
0601
0602 #define VKI_TIOCSWINSZ _VKI_IOW('t', 103, struct vki_winsize)
0603 #define VKI_TIOCGWINSZ _VKI_IOR('t', 104, struct vki_winsize)
0604 #define VKI_TIOCNOTTY 0x5471
0605 #define VKI_TIOCSETD 0x7401
0606 #define VKI_TIOCGETD 0x7400
0607
0608 #define VKI_FIOCLEX 0x6601
0609 #define VKI_FIONCLEX 0x6602
0610 #define VKI_FIOASYNC 0x667d
0611 #define VKI_FIONBIO 0x667e
0612 #define VKI_FIOQSIZE 0x667f
0613
0614 #define VKI_TIOCGLTC 0x7474
0615 #define VKI_TIOCSLTC 0x7475
0616 #define VKI_TIOCSPGRP _VKI_IOW('t', 118, int)
0617 #define VKI_TIOCGPGRP _VKI_IOR('t', 119, int)
0618 #define VKI_TIOCCONS _VKI_IOW('t', 120, int)
0619
0620 #define VKI_FIONREAD 0x467f
0621 #define VKI_TIOCINQ FIONREAD
0622
0623 #define VKI_TIOCGETP 0x7408
0624 #define VKI_TIOCSETP 0x7409
0625 #define VKI_TIOCSETN 0x740a
0626
0627 #define VKI_TIOCSBRK 0x5427
0628 #define VKI_TIOCCBRK 0x5428
0629 #define VKI_TIOCGSID 0x7416
0630 #define VKI_TIOCGPTN _VKI_IOR('T',0x30, unsigned int)
0631 #define VKI_TIOCSPTLCK _VKI_IOW('T',0x31, int)
0632
0633
0634 #define VKI_TIOCSCTTY 0x5480
0635 #define VKI_TIOCGSOFTCAR 0x5481
0636 #define VKI_TIOCSSOFTCAR 0x5482
0637 #define VKI_TIOCLINUX 0x5483
0638 #define VKI_TIOCGSERIAL 0x5484
0639 #define VKI_TIOCSSERIAL 0x5485
0640 #define VKI_TCSBRKP 0x5486
0641 #define VKI_TIOCSERCONFIG 0x5488
0642 #define VKI_TIOCSERGWILD 0x5489
0643 #define VKI_TIOCSERSWILD 0x548a
0644 #define VKI_TIOCGLCKTRMIOS 0x548b
0645 #define VKI_TIOCSLCKTRMIOS 0x548c
0646 #define VKI_TIOCSERGSTRUCT 0x548d
0647 #define VKI_TIOCSERGETLSR 0x548e
0648 #define VKI_TIOCSERGETMULTI 0x548f
0649 #define VKI_TIOCSERSETMULTI 0x5490
0650 #define VKI_TIOCMIWAIT 0x5491
0651 #define VKI_TIOCGICOUNT 0x5492
0652 #define VKI_TIOCGHAYESESP 0x5493
0653 #define VKI_TIOCSHAYESESP 0x5494
0654
0655
0656
0657
0658
0659
0660 #define VKI_POLLIN 0x0001
0661
0662 struct vki_pollfd {
0663 int fd;
0664 short events;
0665 short revents;
0666 };
0667
0668
0669
0670
0671 struct vki_ucontext {
0672 unsigned long uc_flags;
0673 struct vki_ucontext *uc_link;
0674 vki_stack_t uc_stack;
0675 struct vki_sigcontext uc_mcontext;
0676 vki_sigset_t uc_sigmask;
0677 };
0678
0679
0680 typedef char vki_modify_ldt_t;
0681
0682
0683
0684
0685
0686 struct vki_ipc64_perm
0687 {
0688 __vki_kernel_key_t key;
0689 __vki_kernel_uid_t uid;
0690 __vki_kernel_gid_t gid;
0691 __vki_kernel_uid_t cuid;
0692 __vki_kernel_gid_t cgid;
0693 __vki_kernel_mode_t mode;
0694 unsigned short seq;
0695 unsigned short __pad1;
0696 unsigned long __unused1;
0697 unsigned long __unused2;
0698 };
0699
0700
0701
0702
0703
0704 struct vki_semid64_ds {
0705 struct vki_ipc64_perm sem_perm;
0706 __vki_kernel_time_t sem_otime;
0707 __vki_kernel_time_t sem_ctime;
0708 unsigned long sem_nsems;
0709 unsigned long __unused1;
0710 unsigned long __unused2;
0711 };
0712
0713
0714
0715
0716
0717
0718 struct vki_msqid64_ds {
0719 struct vki_ipc64_perm msg_perm;
0720 __vki_kernel_time_t msg_stime;
0721 unsigned long __unused1;
0722 __vki_kernel_time_t msg_rtime;
0723 unsigned long __unused2;
0724 __vki_kernel_time_t msg_ctime;
0725 unsigned long __unused3;
0726 unsigned long msg_cbytes;
0727 unsigned long msg_qnum;
0728 unsigned long msg_qbytes;
0729 __vki_kernel_pid_t msg_lspid;
0730 __vki_kernel_pid_t msg_lrpid;
0731 unsigned long __unused4;
0732 unsigned long __unused5;
0733 };
0734
0735
0736
0737
0738
0739 struct vki_ipc_kludge {
0740 struct vki_msgbuf __user *msgp;
0741 long msgtyp;
0742 };
0743
0744 #define VKI_SEMOP 1
0745 #define VKI_SEMGET 2
0746 #define VKI_SEMCTL 3
0747 #define VKI_SEMTIMEDOP 4
0748 #define VKI_MSGSND 11
0749 #define VKI_MSGRCV 12
0750 #define VKI_MSGGET 13
0751 #define VKI_MSGCTL 14
0752 #define VKI_SHMAT 21
0753 #define VKI_SHMDT 22
0754 #define VKI_SHMGET 23
0755 #define VKI_SHMCTL 24
0756
0757
0758
0759
0760
0761 struct vki_shmid64_ds {
0762 struct vki_ipc64_perm shm_perm;
0763 vki_size_t shm_segsz;
0764 __vki_kernel_time_t shm_atime;
0765 __vki_kernel_time_t shm_dtime;
0766 __vki_kernel_time_t shm_ctime;
0767 __vki_kernel_pid_t shm_cpid;
0768 __vki_kernel_pid_t shm_lpid;
0769 unsigned long shm_nattch;
0770 unsigned long __unused1;
0771 unsigned long __unused2;
0772 };
0773
0774 struct vki_shminfo64 {
0775 unsigned long shmmax;
0776 unsigned long shmmin;
0777 unsigned long shmmni;
0778 unsigned long shmseg;
0779 unsigned long shmall;
0780 unsigned long __unused1;
0781 unsigned long __unused2;
0782 unsigned long __unused3;
0783 unsigned long __unused4;
0784 };
0785
0786
0787
0788
0789 struct vki_pt_regs {
0790 #ifdef CONFIG_32BIT
0791
0792 unsigned long pad0[6];
0793 #endif
0794
0795 unsigned long regs[32];
0796
0797
0798 unsigned long cp0_status;
0799 unsigned long hi;
0800 unsigned long lo;
0801 #ifdef CONFIG_CPU_HAS_SMARTMIPS
0802 unsigned long acx;
0803 #endif
0804 unsigned long cp0_badvaddr;
0805 unsigned long cp0_cause;
0806 unsigned long cp0_epc;
0807 #ifdef CONFIG_MIPS_MT_SMTC
0808 unsigned long cp0_tcstatus;
0809 #endif
0810 #ifdef CONFIG_CPU_CAVIUM_OCTEON
0811 unsigned long long mpl[3];
0812 unsigned long long mtp[3];
0813 #endif
0814 } __attribute__ ((aligned (8)));
0815
0816 #define VKI_PTRACE_GETREGS 12
0817 #define VKI_PTRACE_SETREGS 13
0818 #define VKI_PTRACE_GETFPREGS 14
0819 #define VKI_PTRACE_SETFPREGS 15
0820
0821
0822
0823 #define VKI_MIPS32_EF_R0 6
0824 #define VKI_MIPS32_EF_R1 7
0825 #define VKI_MIPS32_EF_R2 8
0826 #define VKI_MIPS32_EF_R3 9
0827 #define VKI_MIPS32_EF_R4 10
0828 #define VKI_MIPS32_EF_R5 11
0829 #define VKI_MIPS32_EF_R6 12
0830 #define VKI_MIPS32_EF_R7 13
0831 #define VKI_MIPS32_EF_R8 14
0832 #define VKI_MIPS32_EF_R9 15
0833 #define VKI_MIPS32_EF_R10 16
0834 #define VKI_MIPS32_EF_R11 17
0835 #define VKI_MIPS32_EF_R12 18
0836 #define VKI_MIPS32_EF_R13 19
0837 #define VKI_MIPS32_EF_R14 20
0838 #define VKI_MIPS32_EF_R15 21
0839 #define VKI_MIPS32_EF_R16 22
0840 #define VKI_MIPS32_EF_R17 23
0841 #define VKI_MIPS32_EF_R18 24
0842 #define VKI_MIPS32_EF_R19 25
0843 #define VKI_MIPS32_EF_R20 26
0844 #define VKI_MIPS32_EF_R21 27
0845 #define VKI_MIPS32_EF_R22 28
0846 #define VKI_MIPS32_EF_R23 29
0847 #define VKI_MIPS32_EF_R24 30
0848 #define VKI_MIPS32_EF_R25 31
0849 #define VKI_MIPS32_EF_R26 32
0850 #define VKI_MIPS32_EF_R27 33
0851 #define VKI_MIPS32_EF_R28 34
0852 #define VKI_MIPS32_EF_R29 35
0853 #define VKI_MIPS32_EF_R30 36
0854 #define VKI_MIPS32_EF_R31 37
0855 #define VKI_MIPS32_EF_LO 38
0856 #define VKI_MIPS32_EF_HI 39
0857 #define VKI_MIPS32_EF_CP0_EPC 40
0858 #define VKI_MIPS32_EF_CP0_BADVADDR 41
0859 #define VKI_MIPS32_EF_CP0_STATUS 42
0860 #define VKI_MIPS32_EF_CP0_CAUSE 43
0861 #define VKI_MIPS32_EF_UNUSED0 44
0862
0863
0864
0865
0866 typedef unsigned long vki_elf_greg_t;
0867
0868 #define VKI_ELF_NGREG 45
0869 #define VKI_ELF_NFPREG 33
0870
0871 typedef vki_elf_greg_t vki_elf_gregset_t[VKI_ELF_NGREG];
0872
0873 typedef double vki_elf_fpreg_t;
0874 typedef vki_elf_fpreg_t vki_elf_fpregset_t[VKI_ELF_NFPREG];
0875
0876 typedef struct vki_user_fxsr_struct vki_elf_fpxregset_t;
0877
0878 #define VKI_AT_SYSINFO 32
0879
0880
0881
0882 #define HAVE_ARCH_SIGINFO_T
0883
0884 typedef union vki_sigval {
0885 int sival_int;
0886 void __user *sival_ptr;
0887 } vki_sigval_t;
0888
0889 #ifndef __VKI_ARCH_SI_PREAMBLE_SIZE
0890 #define __VKI_ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
0891 #endif
0892
0893 #define VKI_SI_MAX_SIZE 128
0894
0895 #ifndef VKI_SI_PAD_SIZE
0896 #define VKI_SI_PAD_SIZE ((VKI_SI_MAX_SIZE - __VKI_ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
0897 #endif
0898
0899 #ifndef __VKI_ARCH_SI_UID_T
0900 #define __VKI_ARCH_SI_UID_T vki_uid_t
0901 #endif
0902
0903 #ifndef __VKI_ARCH_SI_BAND_T
0904 #define __VKI_ARCH_SI_BAND_T long
0905 #endif
0906
0907 typedef struct vki_siginfo {
0908 int si_signo;
0909 int si_code;
0910 int si_errno;
0911 int __pad0[VKI_SI_MAX_SIZE / sizeof(int) - VKI_SI_PAD_SIZE - 3];
0912
0913 union {
0914 int _pad[VKI_SI_PAD_SIZE];
0915
0916
0917 struct {
0918 vki_pid_t _pid;
0919 __VKI_ARCH_SI_UID_T _uid;
0920 } _kill;
0921
0922
0923 struct {
0924 vki_timer_t _tid;
0925 int _overrun;
0926 char _pad[sizeof( __VKI_ARCH_SI_UID_T) - sizeof(int)];
0927 vki_sigval_t _sigval;
0928 int _sys_private;
0929 } _timer;
0930
0931
0932 struct {
0933 vki_pid_t _pid;
0934 __VKI_ARCH_SI_UID_T _uid;
0935 vki_sigval_t _sigval;
0936 } _rt;
0937
0938
0939 struct {
0940 vki_pid_t _pid;
0941 __VKI_ARCH_SI_UID_T _uid;
0942 int _status;
0943 vki_clock_t _utime;
0944 vki_clock_t _stime;
0945 } _sigchld;
0946
0947
0948 struct {
0949 vki_pid_t _pid;
0950 vki_clock_t _utime;
0951 int _status;
0952 vki_clock_t _stime;
0953 } _irix_sigchld;
0954
0955
0956 struct {
0957 void __user *_addr;
0958 #ifdef __ARCH_SI_TRAPNO
0959 int _trapno;
0960 #endif
0961 } _sigfault;
0962
0963
0964 struct {
0965 __VKI_ARCH_SI_BAND_T _band;
0966 int _fd;
0967 } _sigpoll;
0968 } _sifields;
0969 } vki_siginfo_t;
0970
0971
0972
0973
0974 #define VKI_BRK_OVERFLOW 6
0975 #define VKI_BRK_DIVZERO 7
0976
0977
0978
0979
0980 enum vki_sock_type {
0981 VKI_SOCK_STREAM = 2,
0982
0983 };
0984 #define ARCH_HAS_SOCKET_TYPES 1
0985
0986
0987
0988
0989
0990 #define VKI_ELIBBAD 84
0991 #define VKI_EOPNOTSUPP 122
0992
0993
0994
0995
0996
0997
0998 #define VKI_ENOSYS 89
0999 #define VKI_EOVERFLOW 79
1000
1001
1002
1003
1004
1005 #define VKI_EF_MIPS_FP64 0x00000200
1006
1007
1008
1009
1010
1011 #define VKI_MIPS_ABI_FP_UNKNOWN (-1)
1012 #define VKI_MIPS_ABI_FP_ANY 0
1013 #define VKI_MIPS_ABI_FP_DOUBLE 1
1014 #define VKI_MIPS_ABI_FP_SINGLE 2
1015 #define VKI_MIPS_ABI_FP_SOFT 3
1016 #define VKI_MIPS_ABI_FP_OLD_64 4
1017 #define VKI_MIPS_ABI_FP_XX 5
1018 #define VKI_MIPS_ABI_FP_64 6
1019 #define VKI_MIPS_ABI_FP_64A 7
1020
1021 struct vki_arch_elf_state {
1022 int fp_abi;
1023 int interp_fp_abi;
1024 int overall_fp_mode;
1025 };
1026
1027 #define VKI_INIT_ARCH_ELF_STATE { \
1028 .fp_abi = VKI_MIPS_ABI_FP_UNKNOWN, \
1029 .interp_fp_abi = VKI_MIPS_ABI_FP_UNKNOWN, \
1030 .overall_fp_mode = -1, \
1031 }
1032
1033 struct vki_mips_elf_abiflags_v0 {
1034 vki_u16 version;
1035 vki_u8 isa_level;
1036 vki_u8 isa_rev;
1037
1038 vki_u8 gpr_size;
1039 vki_u8 cpr1_size;
1040 vki_u8 cpr2_size;
1041 vki_u8 fp_abi;
1042 vki_u32 isa_ext;
1043 vki_u32 ases;
1044 vki_u32 flags1;
1045 vki_u32 flags2;
1046 };
1047
1048 #define VKI_PT_MIPS_ABIFLAGS 0x70000003
1049
1050
1051
1052
1053
1054 enum {
1055 VKI_FP_FRE,
1056 VKI_FP_FR0,
1057 VKI_FP_FR1,
1058 };
1059
1060 #endif
1061
1062
1063
1064