cerion | 85665ca | 2005-06-20 15:51:07 +0000 | [diff] [blame^] | 1 | |
| 2 | /*--------------------------------------------------------------------*/ |
| 3 | /*--- PPC32/Linux-specific kernel interface. ---*/ |
| 4 | /*--- ppc32-linux/vki-ppc32-linux.h ---*/ |
| 5 | /*--------------------------------------------------------------------*/ |
| 6 | |
| 7 | /* |
| 8 | This file is part of Valgrind, a dynamic binary instrumentation |
| 9 | framework. |
| 10 | |
| 11 | Copyright (C) 2005 Julian Seward |
| 12 | jseward@acm.org |
| 13 | |
| 14 | This program is free software; you can redistribute it and/or |
| 15 | modify it under the terms of the GNU General Public License as |
| 16 | published by the Free Software Foundation; either version 2 of the |
| 17 | License, or (at your option) any later version. |
| 18 | |
| 19 | This program is distributed in the hope that it will be useful, but |
| 20 | WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 22 | General Public License for more details. |
| 23 | |
| 24 | You should have received a copy of the GNU General Public License |
| 25 | along with this program; if not, write to the Free Software |
| 26 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
| 27 | 02111-1307, USA. |
| 28 | |
| 29 | The GNU General Public License is contained in the file COPYING. |
| 30 | */ |
| 31 | |
| 32 | #ifndef __PPC32_LINUX_VKI_ARCH_H |
| 33 | #define __PPC32_LINUX_VKI_ARCH_H |
| 34 | |
| 35 | // ppc32 is big-endian. |
| 36 | #define VKI_BIG_ENDIAN 1 |
| 37 | |
| 38 | //---------------------------------------------------------------------- |
| 39 | // From linux-2.6.9/include/asm-ppc/types.h |
| 40 | //---------------------------------------------------------------------- |
| 41 | |
| 42 | typedef unsigned char __vki_u8; |
| 43 | |
| 44 | typedef __signed__ short __vki_s16; |
| 45 | typedef unsigned short __vki_u16; |
| 46 | |
| 47 | typedef unsigned int __vki_u32; |
| 48 | |
| 49 | typedef __signed__ long long __vki_s64; |
| 50 | typedef unsigned long long __vki_u64; |
| 51 | |
| 52 | typedef unsigned short vki_u16; |
| 53 | |
| 54 | typedef unsigned int vki_u32; |
| 55 | |
| 56 | typedef struct { |
| 57 | __vki_u32 u[4]; |
| 58 | } __vki_vector128; |
| 59 | |
| 60 | //---------------------------------------------------------------------- |
| 61 | // From linux-2.6.9/include/asm-ppc/page.h |
| 62 | //---------------------------------------------------------------------- |
| 63 | |
| 64 | /* PAGE_SHIFT determines the page size */ |
| 65 | #define VKI_PAGE_SHIFT 12 |
| 66 | #define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT) |
| 67 | |
| 68 | //---------------------------------------------------------------------- |
| 69 | // From linux-2.6.9/include/asm-ppc/signal.h |
| 70 | //---------------------------------------------------------------------- |
| 71 | |
| 72 | #define VKI_MINSIGSTKSZ 2048 |
| 73 | |
| 74 | #define VKI_SIG_BLOCK 0 /* for blocking signals */ |
| 75 | #define VKI_SIG_UNBLOCK 1 /* for unblocking signals */ |
| 76 | #define VKI_SIG_SETMASK 2 /* for setting the signal mask */ |
| 77 | |
| 78 | /* Type of a signal handler. */ |
| 79 | typedef void __vki_signalfn_t(int); |
| 80 | typedef __vki_signalfn_t __user *__vki_sighandler_t; |
| 81 | |
| 82 | typedef void __vki_restorefn_t(void); |
| 83 | typedef __vki_restorefn_t __user *__vki_sigrestore_t; |
| 84 | |
| 85 | #define VKI_SIG_DFL ((__vki_sighandler_t)0) /* default signal handling */ |
| 86 | #define VKI_SIG_IGN ((__vki_sighandler_t)1) /* ignore signal */ |
| 87 | |
| 88 | #define _VKI_NSIG 64 |
| 89 | #define _VKI_NSIG_BPW 32 |
| 90 | #define _VKI_NSIG_WORDS (_VKI_NSIG / _VKI_NSIG_BPW) |
| 91 | |
| 92 | typedef unsigned long vki_old_sigset_t; /* at least 32 bits */ |
| 93 | |
| 94 | typedef struct { |
| 95 | unsigned long sig[_VKI_NSIG_WORDS]; |
| 96 | } vki_sigset_t; |
| 97 | |
| 98 | #define VKI_SIGHUP 1 |
| 99 | #define VKI_SIGINT 2 |
| 100 | #define VKI_SIGQUIT 3 |
| 101 | #define VKI_SIGILL 4 |
| 102 | #define VKI_SIGTRAP 5 |
| 103 | #define VKI_SIGABRT 6 |
| 104 | //#define VKI_SIGIOT 6 |
| 105 | #define VKI_SIGBUS 7 |
| 106 | #define VKI_SIGFPE 8 |
| 107 | #define VKI_SIGKILL 9 |
| 108 | #define VKI_SIGUSR1 10 |
| 109 | #define VKI_SIGSEGV 11 |
| 110 | #define VKI_SIGUSR2 12 |
| 111 | #define VKI_SIGPIPE 13 |
| 112 | #define VKI_SIGALRM 14 |
| 113 | #define VKI_SIGTERM 15 |
| 114 | #define VKI_SIGSTKFLT 16 |
| 115 | #define VKI_SIGCHLD 17 |
| 116 | #define VKI_SIGCONT 18 |
| 117 | #define VKI_SIGSTOP 19 |
| 118 | #define VKI_SIGTSTP 20 |
| 119 | #define VKI_SIGTTIN 21 |
| 120 | #define VKI_SIGTTOU 22 |
| 121 | #define VKI_SIGURG 23 |
| 122 | #define VKI_SIGXCPU 24 |
| 123 | #define VKI_SIGXFSZ 25 |
| 124 | #define VKI_SIGVTALRM 26 |
| 125 | #define VKI_SIGPROF 27 |
| 126 | #define VKI_SIGWINCH 28 |
| 127 | #define VKI_SIGIO 29 |
| 128 | #define VKI_SIGPWR 30 |
| 129 | #define VKI_SIGSYS 31 |
| 130 | #define VKI_SIGUNUSED 31 |
| 131 | |
| 132 | /* These should not be considered constants from userland. */ |
| 133 | #define VKI_SIGRTMIN 32 |
| 134 | // [[This was (_NSIG-1) in 2.4.X... not sure if it matters.]] |
| 135 | #define VKI_SIGRTMAX _VKI_NSIG |
| 136 | |
| 137 | #define VKI_SA_NOCLDSTOP 0x00000001 |
| 138 | #define VKI_SA_NOCLDWAIT 0x00000002 |
| 139 | #define VKI_SA_SIGINFO 0x00000004 |
| 140 | #define VKI_SA_ONSTACK 0x08000000 |
| 141 | #define VKI_SA_RESTART 0x10000000 |
| 142 | #define VKI_SA_NODEFER 0x40000000 |
| 143 | #define VKI_SA_RESETHAND 0x80000000 |
| 144 | |
| 145 | #define VKI_SA_NOMASK VKI_SA_NODEFER |
| 146 | #define VKI_SA_ONESHOT VKI_SA_RESETHAND |
| 147 | //#define VKI_SA_INTERRUPT 0x20000000 /* dummy -- ignored */ |
| 148 | |
| 149 | #define VKI_SA_RESTORER 0x04000000 |
| 150 | |
| 151 | #define VKI_SS_ONSTACK 1 |
| 152 | #define VKI_SS_DISABLE 2 |
| 153 | |
| 154 | //.. struct vki_old_sigaction { |
| 155 | //.. // [[Nb: a 'k' prefix is added to "sa_handler" because |
| 156 | //.. // bits/sigaction.h (which gets dragged in somehow via signal.h) |
| 157 | //.. // #defines it as something else. Since that is done for glibc's |
| 158 | //.. // purposes, which we don't care about here, we use our own name.]] |
| 159 | //.. __vki_sighandler_t ksa_handler; |
| 160 | //.. vki_old_sigset_t sa_mask; |
| 161 | //.. unsigned long sa_flags; |
| 162 | //.. __vki_sigrestore_t sa_restorer; |
| 163 | //.. }; |
| 164 | |
| 165 | struct vki_sigaction { |
| 166 | // [[See comment about extra 'k' above]] |
| 167 | __vki_sighandler_t ksa_handler; |
| 168 | unsigned long sa_flags; |
| 169 | __vki_sigrestore_t sa_restorer; |
| 170 | vki_sigset_t sa_mask; /* mask last for extensibility */ |
| 171 | }; |
| 172 | |
| 173 | typedef struct vki_sigaltstack { |
| 174 | void __user *ss_sp; |
| 175 | int ss_flags; |
| 176 | vki_size_t ss_size; |
| 177 | } vki_stack_t; |
| 178 | |
| 179 | |
| 180 | //---------------------------------------------------------------------- |
| 181 | // From linux-2.6.9/include/asm-ppc/ptrace.h |
| 182 | //---------------------------------------------------------------------- |
| 183 | |
| 184 | struct vki_pt_regs { |
| 185 | unsigned long gpr[32]; |
| 186 | unsigned long nip; |
| 187 | unsigned long msr; |
| 188 | unsigned long orig_gpr3; /* Used for restarting system calls */ |
| 189 | unsigned long ctr; |
| 190 | unsigned long link; |
| 191 | unsigned long xer; |
| 192 | unsigned long ccr; |
| 193 | unsigned long mq; /* 601 only (not used at present) */ |
| 194 | /* Used on APUS to hold IPL value. */ |
| 195 | unsigned long trap; /* Reason for being here */ |
| 196 | /* N.B. for critical exceptions on 4xx, the dar and dsisr |
| 197 | fields are overloaded to hold srr0 and srr1. */ |
| 198 | unsigned long dar; /* Fault registers */ |
| 199 | unsigned long dsisr; /* on 4xx/Book-E used for ESR */ |
| 200 | unsigned long result; /* Result of a system call */ |
| 201 | }; |
| 202 | |
| 203 | #define vki_user_regs_struct vki_pt_regs |
| 204 | |
| 205 | #define VKI_PT_R0 0 |
| 206 | #define VKI_PT_NIP 32 |
| 207 | #define VKI_PT_MSR 33 |
| 208 | #define VKI_PT_ORIG_R3 34 |
| 209 | #define VKI_PT_CTR 35 |
| 210 | #define VKI_PT_LNK 36 |
| 211 | #define VKI_PT_XER 37 |
| 212 | #define VKI_PT_CCR 38 |
| 213 | #define VKI_PT_MQ 39 |
| 214 | #define VKI_PT_TRAP 40 |
| 215 | #define VKI_PT_DAR 41 |
| 216 | #define VKI_PT_DSISR 42 |
| 217 | #define VKI_PT_RESULT 43 |
| 218 | |
| 219 | //---------------------------------------------------------------------- |
| 220 | // From linux-2.6.9/include/asm-ppc/sigcontext.h |
| 221 | //---------------------------------------------------------------------- |
| 222 | |
| 223 | struct vki_sigcontext { |
| 224 | unsigned long _unused[4]; |
| 225 | int signal; |
| 226 | unsigned long handler; |
| 227 | unsigned long oldmask; |
| 228 | struct vki_pt_regs *regs; |
| 229 | }; |
| 230 | |
| 231 | //---------------------------------------------------------------------- |
| 232 | // From linux-2.6.9/include/asm-ppc/mman.h |
| 233 | //---------------------------------------------------------------------- |
| 234 | |
| 235 | #define VKI_PROT_NONE 0x0 /* No page permissions */ |
| 236 | #define VKI_PROT_READ 0x1 /* page can be read */ |
| 237 | #define VKI_PROT_WRITE 0x2 /* page can be written */ |
| 238 | #define VKI_PROT_EXEC 0x4 /* page can be executed */ |
| 239 | |
| 240 | #define VKI_MAP_SHARED 0x01 /* Share changes */ |
| 241 | #define VKI_MAP_PRIVATE 0x02 /* Changes are private */ |
| 242 | //#define VKI_MAP_TYPE 0x0f /* Mask for type of mapping */ |
| 243 | #define VKI_MAP_FIXED 0x10 /* Interpret addr exactly */ |
| 244 | #define VKI_MAP_ANONYMOUS 0x20 /* don't use a file */ |
| 245 | #define VKI_MAP_NORESERVE 0x40 /* don't reserve swap pages */ |
| 246 | |
| 247 | //---------------------------------------------------------------------- |
| 248 | // From linux-2.6.9/include/asm-ppc/fcntl.h |
| 249 | //---------------------------------------------------------------------- |
| 250 | |
| 251 | #define VKI_O_RDONLY 00 |
| 252 | #define VKI_O_WRONLY 01 |
| 253 | #define VKI_O_RDWR 02 |
| 254 | #define VKI_O_CREAT 0100 /* not fcntl */ |
| 255 | #define VKI_O_EXCL 0200 /* not fcntl */ |
| 256 | #define VKI_O_TRUNC 01000 /* not fcntl */ |
| 257 | #define VKI_O_APPEND 02000 |
| 258 | #define VKI_O_NONBLOCK 04000 |
| 259 | |
| 260 | #define VKI_F_DUPFD 0 /* dup */ |
| 261 | #define VKI_F_GETFD 1 /* get close_on_exec */ |
| 262 | #define VKI_F_SETFD 2 /* set/clear close_on_exec */ |
| 263 | #define VKI_F_GETFL 3 /* get file->f_flags */ |
| 264 | #define VKI_F_SETFL 4 /* set file->f_flags */ |
| 265 | #define VKI_F_GETLK 5 |
| 266 | #define VKI_F_SETLK 6 |
| 267 | #define VKI_F_SETLKW 7 |
| 268 | |
| 269 | #define VKI_F_SETOWN 8 /* for sockets. */ |
| 270 | #define VKI_F_GETOWN 9 /* for sockets. */ |
| 271 | #define VKI_F_SETSIG 10 /* for sockets. */ |
| 272 | #define VKI_F_GETSIG 11 /* for sockets. */ |
| 273 | |
| 274 | #define VKI_F_GETLK64 12 /* using 'struct flock64' */ |
| 275 | #define VKI_F_SETLK64 13 |
| 276 | #define VKI_F_SETLKW64 14 |
| 277 | |
| 278 | /* for F_[GET|SET]FL */ |
| 279 | #define VKI_FD_CLOEXEC 1 /* actually anything with low bit set goes */ |
| 280 | |
| 281 | #define VKI_F_LINUX_SPECIFIC_BASE 1024 |
| 282 | |
| 283 | //---------------------------------------------------------------------- |
| 284 | // From linux-2.6.9/include/asm-ppc/resource.h |
| 285 | //---------------------------------------------------------------------- |
| 286 | |
| 287 | #define VKI_RLIMIT_DATA 2 /* max data size */ |
| 288 | #define VKI_RLIMIT_STACK 3 /* max stack size */ |
| 289 | #define VKI_RLIMIT_CORE 4 /* max core file size */ |
| 290 | #define VKI_RLIMIT_NOFILE 7 /* max number of open files */ |
| 291 | |
| 292 | //---------------------------------------------------------------------- |
| 293 | // From linux-2.6.9/include/asm-ppc/socket.h |
| 294 | //---------------------------------------------------------------------- |
| 295 | |
| 296 | #define VKI_SOL_SOCKET 1 |
| 297 | #define VKI_SO_TYPE 3 |
| 298 | |
| 299 | #define VKI_SIOCSPGRP 0x8902 |
| 300 | #define VKI_SIOCGPGRP 0x8904 |
| 301 | #define VKI_SIOCGSTAMP 0x8906 /* Get stamp */ |
| 302 | |
| 303 | //---------------------------------------------------------------------- |
| 304 | // From linux-2.6.9/include/asm-ppc/stat.h |
| 305 | //---------------------------------------------------------------------- |
| 306 | |
| 307 | //.. #define VKI_S_IFMT 00170000 |
| 308 | //.. #define VKI_S_IFSOCK 0140000 |
| 309 | //.. #define VKI_S_IFLNK 0120000 |
| 310 | //.. #define VKI_S_IFREG 0100000 |
| 311 | //.. #define VKI_S_IFBLK 0060000 |
| 312 | //.. #define VKI_S_IFDIR 0040000 |
| 313 | //.. #define VKI_S_IFCHR 0020000 |
| 314 | //.. #define VKI_S_IFIFO 0010000 |
| 315 | //.. #define VKI_S_ISUID 0004000 |
| 316 | //.. #define VKI_S_ISGID 0002000 |
| 317 | //.. #define VKI_S_ISVTX 0001000 |
| 318 | //.. |
| 319 | //.. #define VKI_S_ISLNK(m) (((m) & VKI_S_IFMT) == VKI_S_IFLNK) |
| 320 | //.. #define VKI_S_ISREG(m) (((m) & VKI_S_IFMT) == VKI_S_IFREG) |
| 321 | //.. #define VKI_S_ISDIR(m) (((m) & VKI_S_IFMT) == VKI_S_IFDIR) |
| 322 | //.. #define VKI_S_ISCHR(m) (((m) & VKI_S_IFMT) == VKI_S_IFCHR) |
| 323 | //.. #define VKI_S_ISBLK(m) (((m) & VKI_S_IFMT) == VKI_S_IFBLK) |
| 324 | //.. #define VKI_S_ISFIFO(m) (((m) & VKI_S_IFMT) == VKI_S_IFIFO) |
| 325 | //.. #define VKI_S_ISSOCK(m) (((m) & VKI_S_IFMT) == VKI_S_IFSOCK) |
| 326 | |
| 327 | struct vki_stat { |
| 328 | unsigned st_dev; |
| 329 | unsigned long st_ino; |
| 330 | unsigned int st_mode; |
| 331 | unsigned short st_nlink; |
| 332 | unsigned int st_uid; |
| 333 | unsigned int st_gid; |
| 334 | unsigned st_rdev; |
| 335 | long st_size; |
| 336 | unsigned long st_blksize; |
| 337 | unsigned long st_blocks; |
| 338 | unsigned long st_atime; |
| 339 | unsigned long st_atime_nsec; |
| 340 | unsigned long st_mtime; |
| 341 | unsigned long st_mtime_nsec; |
| 342 | unsigned long st_ctime; |
| 343 | unsigned long st_ctime_nsec; |
| 344 | unsigned long __unused4; |
| 345 | unsigned long __unused5; |
| 346 | }; |
| 347 | |
| 348 | struct vki_stat64 { |
| 349 | unsigned long st_dev; |
| 350 | unsigned long st_ino; |
| 351 | unsigned long st_rdev; |
| 352 | long st_size; |
| 353 | unsigned long st_blocks; |
| 354 | |
| 355 | unsigned int st_mode; |
| 356 | unsigned int st_uid; |
| 357 | unsigned int st_gid; |
| 358 | unsigned int st_blksize; |
| 359 | unsigned int st_nlink; |
| 360 | unsigned int __pad0; |
| 361 | |
| 362 | unsigned long st_atime; |
| 363 | unsigned long st_atime_nsec; |
| 364 | unsigned long st_mtime; |
| 365 | unsigned long st_mtime_nsec; |
| 366 | unsigned long st_ctime; |
| 367 | unsigned long st_ctime_nsec; |
| 368 | long __unused[3]; |
| 369 | }; |
| 370 | |
| 371 | //---------------------------------------------------------------------- |
| 372 | // From linux-2.6.9/include/asm-ppc/statfs.h |
| 373 | //---------------------------------------------------------------------- |
| 374 | |
| 375 | // [[Nb: asm-ppc/statfs.h just #include asm-generic/statfs.h directly]] |
| 376 | struct vki_statfs { |
| 377 | __vki_u32 f_type; |
| 378 | __vki_u32 f_bsize; |
| 379 | __vki_u32 f_blocks; |
| 380 | __vki_u32 f_bfree; |
| 381 | __vki_u32 f_bavail; |
| 382 | __vki_u32 f_files; |
| 383 | __vki_u32 f_ffree; |
| 384 | __vki_kernel_fsid_t f_fsid; |
| 385 | __vki_u32 f_namelen; |
| 386 | __vki_u32 f_frsize; |
| 387 | __vki_u32 f_spare[5]; |
| 388 | }; |
| 389 | |
| 390 | //---------------------------------------------------------------------- |
| 391 | // From linux-2.6.9/include/asm-ppc/termios.h |
| 392 | //---------------------------------------------------------------------- |
| 393 | |
| 394 | struct vki_winsize { |
| 395 | unsigned short ws_row; |
| 396 | unsigned short ws_col; |
| 397 | unsigned short ws_xpixel; |
| 398 | unsigned short ws_ypixel; |
| 399 | }; |
| 400 | |
| 401 | #define NCC 10 |
| 402 | struct vki_termio { |
| 403 | unsigned short c_iflag; /* input mode flags */ |
| 404 | unsigned short c_oflag; /* output mode flags */ |
| 405 | unsigned short c_cflag; /* control mode flags */ |
| 406 | unsigned short c_lflag; /* local mode flags */ |
| 407 | unsigned char c_line; /* line discipline */ |
| 408 | unsigned char c_cc[NCC]; /* control characters */ |
| 409 | }; |
| 410 | |
| 411 | //---------------------------------------------------------------------- |
| 412 | // From linux-2.6.9/include/asm-ppc/termbits.h |
| 413 | //---------------------------------------------------------------------- |
| 414 | |
| 415 | typedef unsigned char vki_cc_t; |
| 416 | typedef unsigned int vki_speed_t; |
| 417 | typedef unsigned int vki_tcflag_t; |
| 418 | |
| 419 | #define NCCS 19 |
| 420 | struct vki_termios { |
| 421 | vki_tcflag_t c_iflag; /* input mode flags */ |
| 422 | vki_tcflag_t c_oflag; /* output mode flags */ |
| 423 | vki_tcflag_t c_cflag; /* control mode flags */ |
| 424 | vki_tcflag_t c_lflag; /* local mode flags */ |
| 425 | vki_cc_t c_cc[NCCS]; /* control characters */ |
| 426 | vki_cc_t c_line; /* line discipline (== c_cc[19]) */ |
| 427 | vki_speed_t c_ispeed; /* input speed */ |
| 428 | vki_speed_t c_ospeed; /* output speed */ |
| 429 | }; |
| 430 | |
| 431 | //---------------------------------------------------------------------- |
| 432 | // From linux-2.6.9/include/asm-ppc/ioctl.h |
| 433 | //---------------------------------------------------------------------- |
| 434 | |
| 435 | #define _VKI_IOC_NRBITS 8 |
| 436 | #define _VKI_IOC_TYPEBITS 8 |
| 437 | #define _VKI_IOC_SIZEBITS 13 |
| 438 | #define _VKI_IOC_DIRBITS 3 |
| 439 | |
| 440 | #define _VKI_IOC_NRMASK ((1 << _VKI_IOC_NRBITS)-1) |
| 441 | #define _VKI_IOC_TYPEMASK ((1 << _VKI_IOC_TYPEBITS)-1) |
| 442 | #define _VKI_IOC_SIZEMASK ((1 << _VKI_IOC_SIZEBITS)-1) |
| 443 | #define _VKI_IOC_DIRMASK ((1 << _VKI_IOC_DIRBITS)-1) |
| 444 | |
| 445 | #define _VKI_IOC_NRSHIFT 0 |
| 446 | #define _VKI_IOC_TYPESHIFT (_VKI_IOC_NRSHIFT+_VKI_IOC_NRBITS) |
| 447 | #define _VKI_IOC_SIZESHIFT (_VKI_IOC_TYPESHIFT+_VKI_IOC_TYPEBITS) |
| 448 | #define _VKI_IOC_DIRSHIFT (_VKI_IOC_SIZESHIFT+_VKI_IOC_SIZEBITS) |
| 449 | |
| 450 | #define _VKI_IOC_NONE 1U |
| 451 | #define _VKI_IOC_READ 2U |
| 452 | #define _VKI_IOC_WRITE 4U |
| 453 | |
| 454 | #define _VKI_IOC(dir,type,nr,size) \ |
| 455 | (((dir) << _VKI_IOC_DIRSHIFT) | \ |
| 456 | ((type) << _VKI_IOC_TYPESHIFT) | \ |
| 457 | ((nr) << _VKI_IOC_NRSHIFT) | \ |
| 458 | ((size) << _VKI_IOC_SIZESHIFT)) |
| 459 | |
| 460 | /* provoke compile error for invalid uses of size argument */ |
| 461 | extern unsigned int __VKI_invalid_size_argument_for_IOC; |
| 462 | #define _VKI_IOC_TYPECHECK(t) \ |
| 463 | ((sizeof(t) == sizeof(t[1]) && \ |
| 464 | sizeof(t) < (1 << _VKI_IOC_SIZEBITS)) ? \ |
| 465 | sizeof(t) : __VKI_invalid_size_argument_for_IOC) |
| 466 | |
| 467 | /* used to create numbers */ |
| 468 | #define _VKI_IO(type,nr) _VKI_IOC(_VKI_IOC_NONE,(type),(nr),0) |
| 469 | #define _VKI_IOR(type,nr,size) _VKI_IOC(_VKI_IOC_READ,(type),(nr),(_VKI_IOC_TYPECHECK(size))) |
| 470 | #define _VKI_IOW(type,nr,size) _VKI_IOC(_VKI_IOC_WRITE,(type),(nr),(_VKI_IOC_TYPECHECK(size))) |
| 471 | #define _VKI_IOWR(type,nr,size) _VKI_IOC(_VKI_IOC_READ|_VKI_IOC_WRITE,(type),(nr),(_VKI_IOC_TYPECHECK(size))) |
| 472 | |
| 473 | /* used to decode them.. */ |
| 474 | #define _VKI_IOC_DIR(nr) (((nr) >> _VKI_IOC_DIRSHIFT) & _VKI_IOC_DIRMASK) |
| 475 | //.. #define _VKI_IOC_TYPE(nr) (((nr) >> _VKI_IOC_TYPESHIFT) & _VKI_IOC_TYPEMASK) |
| 476 | //.. #define _VKI_IOC_NR(nr) (((nr) >> _VKI_IOC_NRSHIFT) & _VKI_IOC_NRMASK) |
| 477 | #define _VKI_IOC_SIZE(nr) (((nr) >> _VKI_IOC_SIZESHIFT) & _VKI_IOC_SIZEMASK) |
| 478 | |
| 479 | //---------------------------------------------------------------------- |
| 480 | // From linux-2.6.9/include/asm-ppc/ioctls.h |
| 481 | //---------------------------------------------------------------------- |
| 482 | |
| 483 | //#define VKI_FIOCLEX _VKI_IO('f', 1) |
| 484 | //#define VKI_FIONCLEX _VKI_IO('f', 2) |
| 485 | #define VKI_FIOASYNC _VKI_IOW('f', 125, int) |
| 486 | #define VKI_FIONBIO _VKI_IOW('f', 126, int) |
| 487 | #define VKI_FIONREAD _VKI_IOR('f', 127, int) |
| 488 | //#define VKI_TIOCINQ VKI_FIONREAD |
| 489 | //#define VKI_FIOQSIZE _VKI_IOR('f', 128, vki_loff_t) |
| 490 | |
| 491 | //#define VKI_TIOCGETP _VKI_IOR('t', 8, struct vki_sgttyb) |
| 492 | //#define VKI_TIOCSETP _VKI_IOW('t', 9, struct vki_sgttyb) |
| 493 | //#define VKI_TIOCSETN _VKI_IOW('t', 10, struct vki_sgttyb) /* TIOCSETP wo flush */ |
| 494 | |
| 495 | //#define VKI_TIOCSETC _VKI_IOW('t', 17, struct vki_tchars) |
| 496 | //#define VKI_TIOCGETC _VKI_IOR('t', 18, struct vki_tchars) |
| 497 | #define VKI_TCGETS _VKI_IOR('t', 19, struct vki_termios) |
| 498 | #define VKI_TCSETS _VKI_IOW('t', 20, struct vki_termios) |
| 499 | #define VKI_TCSETSW _VKI_IOW('t', 21, struct vki_termios) |
| 500 | #define VKI_TCSETSF _VKI_IOW('t', 22, struct vki_termios) |
| 501 | |
| 502 | #define VKI_TCGETA _VKI_IOR('t', 23, struct vki_termio) |
| 503 | #define VKI_TCSETA _VKI_IOW('t', 24, struct vki_termio) |
| 504 | #define VKI_TCSETAW _VKI_IOW('t', 25, struct vki_termio) |
| 505 | #define VKI_TCSETAF _VKI_IOW('t', 28, struct vki_termio) |
| 506 | |
| 507 | #define VKI_TCSBRK _VKI_IO('t', 29) |
| 508 | #define VKI_TCXONC _VKI_IO('t', 30) |
| 509 | #define VKI_TCFLSH _VKI_IO('t', 31) |
| 510 | |
| 511 | #define VKI_TIOCSWINSZ _VKI_IOW('t', 103, struct vki_winsize) |
| 512 | #define VKI_TIOCGWINSZ _VKI_IOR('t', 104, struct vki_winsize) |
| 513 | //#define VKI_TIOCSTART _VKI_IO('t', 110) /* start output, like ^Q */ |
| 514 | //#define VKI_TIOCSTOP _VKI_IO('t', 111) /* stop output, like ^S */ |
| 515 | #define VKI_TIOCOUTQ _VKI_IOR('t', 115, int) /* output queue size */ |
| 516 | |
| 517 | //#define VKI_TIOCGLTC _VKI_IOR('t', 116, struct vki_ltchars) |
| 518 | //#define VKI_TIOCSLTC _VKI_IOW('t', 117, struct vki_ltchars) |
| 519 | #define VKI_TIOCSPGRP _VKI_IOW('t', 118, int) |
| 520 | #define VKI_TIOCGPGRP _VKI_IOR('t', 119, int) |
| 521 | |
| 522 | //#define VKI_TIOCEXCL 0x540C |
| 523 | //#define VKI_TIOCNXCL 0x540D |
| 524 | #define VKI_TIOCSCTTY 0x540E |
| 525 | |
| 526 | //#define VKI_TIOCSTI 0x5412 |
| 527 | //#define VKI_TIOCMGET 0x5415 |
| 528 | #define VKI_TIOCMBIS 0x5416 |
| 529 | #define VKI_TIOCMBIC 0x5417 |
| 530 | #define VKI_TIOCMSET 0x5418 |
| 531 | //# define VKI_TIOCM_LE 0x001 |
| 532 | //# define VKI_TIOCM_DTR 0x002 |
| 533 | //# define VKI_TIOCM_RTS 0x004 |
| 534 | //# define VKI_TIOCM_ST 0x008 |
| 535 | //# define VKI_TIOCM_SR 0x010 |
| 536 | //# define VKI_TIOCM_CTS 0x020 |
| 537 | //# define VKI_TIOCM_CAR 0x040 |
| 538 | //# define VKI_TIOCM_RNG 0x080 |
| 539 | //# define VKI_TIOCM_DSR 0x100 |
| 540 | //# define VKI_TIOCM_CD VKI_TIOCM_CAR |
| 541 | //# define VKI_TIOCM_RI VKI_TIOCM_RNG |
| 542 | |
| 543 | //#define VKI_TIOCGSOFTCAR 0x5419 |
| 544 | //#define VKI_TIOCSSOFTCAR 0x541A |
| 545 | #define VKI_TIOCLINUX 0x541C |
| 546 | //#define VKI_TIOCCONS 0x541D |
| 547 | //#define VKI_TIOCGSERIAL 0x541E |
| 548 | //#define VKI_TIOCSSERIAL 0x541F |
| 549 | //#define VKI_TIOCPKT 0x5420 |
| 550 | //# define VKI_TIOCPKT_DATA 0 |
| 551 | //# define VKI_TIOCPKT_FLUSHREAD 1 |
| 552 | //# define VKI_TIOCPKT_FLUSHWRITE 2 |
| 553 | //# define VKI_TIOCPKT_STOP 4 |
| 554 | //# define VKI_TIOCPKT_START 8 |
| 555 | //# define VKI_TIOCPKT_NOSTOP 16 |
| 556 | //# define VKI_TIOCPKT_DOSTOP 32 |
| 557 | |
| 558 | //#define VKI_TIOCNOTTY 0x5422 |
| 559 | //#define VKI_TIOCSETD 0x5423 |
| 560 | //#define VKI_TIOCGETD 0x5424 |
| 561 | #define VKI_TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ |
| 562 | //#define VKI_TIOCSBRK 0x5427 /* BSD compatibility */ |
| 563 | //#define VKI_TIOCCBRK 0x5428 /* BSD compatibility */ |
| 564 | //#define VKI_TIOCGSID 0x5429 /* Return the session ID of FD */ |
| 565 | #define VKI_TIOCGPTN _VKI_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
| 566 | #define VKI_TIOCSPTLCK _VKI_IOW('T',0x31, int) /* Lock/unlock Pty */ |
| 567 | |
| 568 | //#define VKI_TIOCSERCONFIG 0x5453 |
| 569 | //#define VKI_TIOCSERGWILD 0x5454 |
| 570 | //#define VKI_TIOCSERSWILD 0x5455 |
| 571 | //#define VKI_TIOCGLCKTRMIOS 0x5456 |
| 572 | //#define VKI_TIOCSLCKTRMIOS 0x5457 |
| 573 | //#define VKI_TIOCSERGSTRUCT 0x5458 /* For debugging only */ |
| 574 | //#define VKI_TIOCSERGETLSR 0x5459 /* Get line status register */ |
| 575 | // /* ioctl (fd, VKI_TIOCSERGETLSR, &result) where result may be as below */ |
| 576 | //# define VKI_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
| 577 | //#define VKI_TIOCSERGETMULTI 0x545A /* Get multiport config */ |
| 578 | //#define VKI_TIOCSERSETMULTI 0x545B /* Set multiport config */ |
| 579 | |
| 580 | //#define VKI_TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ |
| 581 | //#define VKI_TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ |
| 582 | |
| 583 | //---------------------------------------------------------------------- |
| 584 | // From linux-2.6.9/include/asm-ppc/poll.h |
| 585 | //---------------------------------------------------------------------- |
| 586 | |
| 587 | //.. /* These are specified by iBCS2 */ |
| 588 | //.. #define VKI_POLLIN 0x0001 |
| 589 | |
| 590 | struct vki_pollfd { |
| 591 | int fd; |
| 592 | short events; |
| 593 | short revents; |
| 594 | }; |
| 595 | |
| 596 | //.. //---------------------------------------------------------------------- |
| 597 | //.. // From linux-2.6.8.1/include/asm-i386/user.h |
| 598 | //.. //---------------------------------------------------------------------- |
| 599 | //.. |
| 600 | //.. struct vki_user_i387_struct { |
| 601 | //.. long cwd; |
| 602 | //.. long swd; |
| 603 | //.. long twd; |
| 604 | //.. long fip; |
| 605 | //.. long fcs; |
| 606 | //.. long foo; |
| 607 | //.. long fos; |
| 608 | //.. long st_space[20]; /* 8*10 bytes for each FP-reg = 80 bytes */ |
| 609 | //.. }; |
| 610 | //.. |
| 611 | //.. struct vki_user_fxsr_struct { |
| 612 | //.. unsigned short cwd; |
| 613 | //.. unsigned short swd; |
| 614 | //.. unsigned short twd; |
| 615 | //.. unsigned short fop; |
| 616 | //.. long fip; |
| 617 | //.. long fcs; |
| 618 | //.. long foo; |
| 619 | //.. long fos; |
| 620 | //.. long mxcsr; |
| 621 | //.. long reserved; |
| 622 | //.. long st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */ |
| 623 | //.. long xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */ |
| 624 | //.. long padding[56]; |
| 625 | //.. }; |
| 626 | //.. |
| 627 | //.. /* |
| 628 | //.. * This is the old layout of "struct pt_regs", and |
| 629 | //.. * is still the layout used by user mode (the new |
| 630 | //.. * pt_regs doesn't have all registers as the kernel |
| 631 | //.. * doesn't use the extra segment registers) |
| 632 | //.. */ |
| 633 | //.. struct vki_user_regs_struct { |
| 634 | //.. long ebx, ecx, edx, esi, edi, ebp, eax; |
| 635 | //.. unsigned short ds, __ds, es, __es; |
| 636 | //.. unsigned short fs, __fs, gs, __gs; |
| 637 | //.. long orig_eax, eip; |
| 638 | //.. unsigned short cs, __cs; |
| 639 | //.. long eflags, esp; |
| 640 | //.. unsigned short ss, __ss; |
| 641 | //.. }; |
| 642 | |
| 643 | //---------------------------------------------------------------------- |
| 644 | // From linux-2.6.9/include/asm-ppc/elf.h |
| 645 | //---------------------------------------------------------------------- |
| 646 | |
| 647 | #define VKI_ELF_NGREG 48 /* includes nip, msr, lr, etc. */ |
| 648 | #define VKI_ELF_NFPREG 33 /* includes fpscr */ |
| 649 | #define VKI_ELF_NVRREG 33 /* includes vscr */ |
| 650 | |
| 651 | /* General registers */ |
| 652 | typedef unsigned long vki_elf_greg_t; |
| 653 | typedef vki_elf_greg_t vki_elf_gregset_t[VKI_ELF_NGREG]; |
| 654 | |
| 655 | /* Floating point registers */ |
| 656 | typedef double vki_elf_fpreg_t; |
| 657 | typedef vki_elf_fpreg_t vki_elf_fpregset_t[VKI_ELF_NFPREG]; |
| 658 | |
| 659 | /* Altivec registers */ |
| 660 | typedef __vki_vector128 vki_elf_vrreg_t; |
| 661 | typedef vki_elf_vrreg_t vki_elf_vrregset_t[VKI_ELF_NVRREG]; |
| 662 | |
| 663 | #define VKI_AT_DCACHEBSIZE 19 |
| 664 | #define VKI_AT_ICACHEBSIZE 20 |
| 665 | #define VKI_AT_UCACHEBSIZE 21 |
| 666 | /* A special ignored type value for PPC, for glibc compatibility. */ |
| 667 | #define VKI_AT_IGNOREPPC 22 |
| 668 | |
| 669 | /* CAB: Do we want these? */ |
| 670 | //#define VKI_AT_SYSINFO 32 |
| 671 | //#define VKI_AT_SYSINFO_EHDR 33 |
| 672 | |
| 673 | //---------------------------------------------------------------------- |
| 674 | // From linux-2.6.9/include/asm-ppc/ucontext.h |
| 675 | //---------------------------------------------------------------------- |
| 676 | |
| 677 | struct vki_mcontext { |
| 678 | vki_elf_gregset_t mc_gregs; |
| 679 | vki_elf_fpregset_t mc_fregs; |
| 680 | unsigned long mc_pad[2]; |
| 681 | vki_elf_vrregset_t mc_vregs __attribute__((__aligned__(16))); |
| 682 | }; |
| 683 | |
| 684 | struct vki_ucontext { |
| 685 | unsigned long uc_flags; |
| 686 | struct vki_ucontext __user *uc_link; |
| 687 | vki_stack_t uc_stack; |
| 688 | int uc_pad[7]; |
| 689 | struct vki_mcontext __user *uc_regs; /* points to uc_mcontext field */ |
| 690 | vki_sigset_t uc_sigmask; |
| 691 | /* glibc has 1024-bit signal masks, ours are 64-bit */ |
| 692 | int uc_maskext[30]; |
| 693 | int uc_pad2[3]; |
| 694 | struct vki_mcontext uc_mcontext; |
| 695 | }; |
| 696 | |
| 697 | //.. //---------------------------------------------------------------------- |
| 698 | //.. // From linux-2.6.8.1/include/asm-i386/segment.h |
| 699 | //.. //---------------------------------------------------------------------- |
| 700 | //.. |
| 701 | //.. #define VKI_GDT_ENTRY_TLS_ENTRIES 3 |
| 702 | //.. #define VKI_GDT_ENTRY_TLS_MIN 6 |
| 703 | //.. #define VKI_GDT_ENTRY_TLS_MAX (VKI_GDT_ENTRY_TLS_MIN + VKI_GDT_ENTRY_TLS_ENTRIES - 1) |
| 704 | |
| 705 | //---------------------------------------------------------------------- |
| 706 | // From linux-2.6.9/include/asm-ppc/ldt.h |
| 707 | //---------------------------------------------------------------------- |
| 708 | |
| 709 | //.. /* [[Nb: This is the structure passed to the modify_ldt syscall. Just so as |
| 710 | //.. to confuse and annoy everyone, this is _not_ the same as an |
| 711 | //.. VgLdtEntry and has to be translated into such. The logic for doing |
| 712 | //.. so, in vg_ldt.c, is copied from the kernel sources.]] */ |
| 713 | //.. struct vki_user_desc { |
| 714 | //.. unsigned int entry_number; |
| 715 | //.. unsigned long base_addr; |
| 716 | //.. unsigned int limit; |
| 717 | //.. unsigned int seg_32bit:1; |
| 718 | //.. unsigned int contents:2; |
| 719 | //.. unsigned int read_exec_only:1; |
| 720 | //.. unsigned int limit_in_pages:1; |
| 721 | //.. unsigned int seg_not_present:1; |
| 722 | //.. unsigned int useable:1; |
| 723 | //.. // [[Nb: this field is not in the kernel sources, but it has always |
| 724 | //.. // been in the Valgrind sources so I will keep it there in case it's |
| 725 | //.. // important... this is an x86-defined data structure so who |
| 726 | //.. // knows; maybe it's important to set this field to zero at some |
| 727 | //.. // point. --njn]] |
| 728 | //.. unsigned int reserved:25; |
| 729 | //.. }; |
| 730 | //.. |
| 731 | //.. // [[Nb: for our convenience within Valgrind, use a more specific name]] |
| 732 | //.. typedef struct vki_user_desc vki_modify_ldt_t; |
| 733 | |
| 734 | // CAB: TODO |
| 735 | typedef void vki_modify_ldt_t; |
| 736 | |
| 737 | |
| 738 | //---------------------------------------------------------------------- |
| 739 | // From linux-2.6.9/include/asm-ppc/ipcbuf.h |
| 740 | //---------------------------------------------------------------------- |
| 741 | |
| 742 | struct vki_ipc64_perm |
| 743 | { |
| 744 | __vki_kernel_key_t key; |
| 745 | __vki_kernel_uid_t uid; |
| 746 | __vki_kernel_gid_t gid; |
| 747 | __vki_kernel_uid_t cuid; |
| 748 | __vki_kernel_gid_t cgid; |
| 749 | __vki_kernel_mode_t mode; |
| 750 | unsigned long seq; |
| 751 | unsigned int __pad2; |
| 752 | unsigned long long __unused1; |
| 753 | unsigned long long __unused2; |
| 754 | }; |
| 755 | |
| 756 | //---------------------------------------------------------------------- |
| 757 | // From linux-2.6.9/include/asm-ppc/sembuf.h |
| 758 | //---------------------------------------------------------------------- |
| 759 | |
| 760 | struct vki_semid64_ds { |
| 761 | struct vki_ipc64_perm sem_perm; /* permissions .. see ipc.h */ |
| 762 | unsigned int __unused1; |
| 763 | __vki_kernel_time_t sem_otime; /* last semop time */ |
| 764 | unsigned int __unused2; |
| 765 | __vki_kernel_time_t sem_ctime; /* last change time */ |
| 766 | unsigned long sem_nsems; /* no. of semaphores in array */ |
| 767 | unsigned long __unused3; |
| 768 | unsigned long __unused4; |
| 769 | }; |
| 770 | |
| 771 | //---------------------------------------------------------------------- |
| 772 | // From linux-2.6.9/include/asm-ppc/msgbuf.h |
| 773 | //---------------------------------------------------------------------- |
| 774 | |
| 775 | struct vki_msqid64_ds { |
| 776 | struct vki_ipc64_perm msg_perm; |
| 777 | unsigned int __unused1; |
| 778 | __vki_kernel_time_t msg_stime; /* last msgsnd time */ |
| 779 | unsigned int __unused2; |
| 780 | __vki_kernel_time_t msg_rtime; /* last msgrcv time */ |
| 781 | unsigned int __unused3; |
| 782 | __vki_kernel_time_t msg_ctime; /* last change time */ |
| 783 | unsigned long msg_cbytes; /* current number of bytes on queue */ |
| 784 | unsigned long msg_qnum; /* number of messages in queue */ |
| 785 | unsigned long msg_qbytes; /* max number of bytes on queue */ |
| 786 | __vki_kernel_pid_t msg_lspid; /* pid of last msgsnd */ |
| 787 | __vki_kernel_pid_t msg_lrpid; /* last receive pid */ |
| 788 | unsigned long __unused4; |
| 789 | unsigned long __unused5; |
| 790 | }; |
| 791 | |
| 792 | //.. //---------------------------------------------------------------------- |
| 793 | //.. // From linux-2.6.8.1/include/asm-i386/ipc.h |
| 794 | //.. //---------------------------------------------------------------------- |
| 795 | //.. |
| 796 | //.. struct vki_ipc_kludge { |
| 797 | //.. struct vki_msgbuf __user *msgp; |
| 798 | //.. long msgtyp; |
| 799 | //.. }; |
| 800 | //.. |
| 801 | //.. #define VKI_SEMOP 1 |
| 802 | //.. #define VKI_SEMGET 2 |
| 803 | //.. #define VKI_SEMCTL 3 |
| 804 | //.. #define VKI_SEMTIMEDOP 4 |
| 805 | //.. #define VKI_MSGSND 11 |
| 806 | //.. #define VKI_MSGRCV 12 |
| 807 | //.. #define VKI_MSGGET 13 |
| 808 | //.. #define VKI_MSGCTL 14 |
| 809 | //.. #define VKI_SHMAT 21 |
| 810 | //.. #define VKI_SHMDT 22 |
| 811 | //.. #define VKI_SHMGET 23 |
| 812 | //.. #define VKI_SHMCTL 24 |
| 813 | |
| 814 | //---------------------------------------------------------------------- |
| 815 | // From linux-2.6.9/include/asm-ppc/shmbuf.h |
| 816 | //---------------------------------------------------------------------- |
| 817 | |
| 818 | struct vki_shmid64_ds { |
| 819 | struct vki_ipc64_perm shm_perm; /* operation perms */ |
| 820 | unsigned int __unused1; |
| 821 | __vki_kernel_time_t shm_atime; /* last attach time */ |
| 822 | unsigned int __unused2; |
| 823 | __vki_kernel_time_t shm_dtime; /* last detach time */ |
| 824 | unsigned int __unused3; |
| 825 | __vki_kernel_time_t shm_ctime; /* last change time */ |
| 826 | unsigned int __unused4; |
| 827 | vki_size_t shm_segsz; /* size of segment (bytes) */ |
| 828 | __vki_kernel_pid_t shm_cpid; /* pid of creator */ |
| 829 | __vki_kernel_pid_t shm_lpid; /* pid of last operator */ |
| 830 | unsigned long shm_nattch; /* no. of current attaches */ |
| 831 | unsigned long __unused5; |
| 832 | unsigned long __unused6; |
| 833 | }; |
| 834 | |
| 835 | struct vki_shminfo64 { |
| 836 | unsigned long shmmax; |
| 837 | unsigned long shmmin; |
| 838 | unsigned long shmmni; |
| 839 | unsigned long shmseg; |
| 840 | unsigned long shmall; |
| 841 | unsigned long __unused1; |
| 842 | unsigned long __unused2; |
| 843 | unsigned long __unused3; |
| 844 | unsigned long __unused4; |
| 845 | }; |
| 846 | |
| 847 | //.. //---------------------------------------------------------------------- |
| 848 | //.. // DRM ioctls |
| 849 | //.. //---------------------------------------------------------------------- |
| 850 | //.. |
| 851 | //.. // jrs 20050207: where did all this stuff come from? Is it really |
| 852 | //.. // i386 specific, or should it go into the linux-generic category? |
| 853 | //.. //struct vki_drm_buf_pub { |
| 854 | //.. // Int idx; /**< Index into the master buffer list */ |
| 855 | //.. // Int total; /**< Buffer size */ |
| 856 | //.. // Int used; /**< Amount of buffer in use (for DMA) */ |
| 857 | //.. // void __user *address; /**< Address of buffer */ |
| 858 | //.. //}; |
| 859 | //.. // |
| 860 | //.. //struct vki_drm_buf_map { |
| 861 | //.. // Int count; /**< Length of the buffer list */ |
| 862 | //.. // void __user *virtual; /**< Mmap'd area in user-virtual */ |
| 863 | //.. // struct vki_drm_buf_pub __user *list; /**< Buffer information */ |
| 864 | //.. //}; |
| 865 | //.. // |
| 866 | //.. ///* We need to pay attention to this, because it mmaps memory */ |
| 867 | //.. //#define VKI_DRM_IOCTL_MAP_BUFS _VKI_IOWR('d', 0x19, struct vki_drm_buf_map) |
| 868 | |
| 869 | //.. //---------------------------------------------------------------------- |
| 870 | //.. // From linux-2.6.9/include/asm-i386/ptrace.h |
| 871 | //.. //---------------------------------------------------------------------- |
| 872 | //.. |
| 873 | //.. #define VKI_PTRACE_GETREGS 12 |
| 874 | //.. #define VKI_PTRACE_SETREGS 13 |
| 875 | //.. #define VKI_PTRACE_GETFPREGS 14 |
| 876 | //.. #define VKI_PTRACE_SETFPREGS 15 |
| 877 | //.. #define VKI_PTRACE_GETFPXREGS 18 |
| 878 | //.. #define VKI_PTRACE_SETFPXREGS 19 |
| 879 | |
| 880 | //---------------------------------------------------------------------- |
| 881 | // And that's it! |
| 882 | //---------------------------------------------------------------------- |
| 883 | |
| 884 | #endif // __PPC32_LINUX_VKI_ARCH_H |
| 885 | |
| 886 | /*--------------------------------------------------------------------*/ |
| 887 | /*--- end ---*/ |
| 888 | /*--------------------------------------------------------------------*/ |