1 ============================================================================= 2 Purpose of this file 3 ============================================================================= 4 In late 2004 Nick and Julian spent a little time working on the beginnings of 5 an ARM port. IIRC it was compiling, but we never got it running at all, or if 6 we did, it didn't get very far. Most of the required 7 arch/platform-specific functions were still empty stubs. 8 9 Since then, the code structure has changed a lot. In particular, the $ARCH and 10 $PLATFORM directories have gone, and everything has been broken into much 11 more well-defined modules. The ARM code wasn't being kept up with these 12 changes, so it has bit-rotted badly. So now I'm pulling it all out. But 13 there is some useful knowledge in the ARM code, and the vki*.h files are 14 fully done. So I'm putting all the useful stuff in this file in case anyone 15 tries porting to ARM again in the future. 16 17 -- njn, Jul 2, 2005 18 19 ============================================================================= 20 General 21 ============================================================================= 22 You'll need to : 23 - Update Makefile.am files when you add back in the vki*.h files in include/ 24 and coregrind/. 25 - Also the valgrind.spec.in file 26 - Add lots of missing cases in lots of places requiring 27 arch-/platform-specific code. Compile errors should tell you where. 28 29 ============================================================================= 30 configure.in 31 ============================================================================= 32 You'll need to: 33 - Add appropriate arm/ test subdirs to memcheck/tests/, none/tests/, 34 cachegrind/tests/. 35 - Add arm to VG_ARCH_ALL and arm-linux to VG_PLATFORM_ALL 36 - Add it to the $VG_ARCH/$VG_PLATFORM case statements in configure.in 37 - Here's the case for the ${host_cpu} case statement: 38 39 arm*) 40 AC_MSG_RESULT([ok (${host_cpu})]) 41 VG_ARCH="arm" 42 KICKSTART_BASE="0xb0000000" 43 ARCH_CORE_AM_CFLAGS="-fomit-frame-pointer @PREFERRED_STACK_BOUNDARY@" 44 ARCH_TOOL_AM_CFLAGS="-fomit-frame-pointer @PREFERRED_STACK_BOUNDARY@" 45 ARCH_CORE_AM_CCASFLAGS="" 46 ;; 47 48 ============================================================================= 49 From cachegrind/cg-arm.c 50 ============================================================================= 51 void VG_(configure_caches)(cache_t* I1c, cache_t* D1c, cache_t* L2c, 52 Bool all_caches_clo_defined) 53 { 54 // XXX: I1 and D1 are vaguely plausible, although they could really be 55 // anything. However, most (all?) ARMs don't have an L2 cache. But 56 // Cachegrind assumes the presence of an L2 cache... so we just copy the 57 // x86 defaults. Urk. 58 *I1c = (cache_t) { 4096, 2, 32 }; 59 *D1c = (cache_t) { 4096, 2, 32 }; 60 *L2c = (cache_t) { 262144, 8, 64 }; 61 } 62 63 ============================================================================= 64 From m_syswrap/syswrap-arm-linux.c 65 ============================================================================= 66 67 /* --------------------------------------------------------------------- 68 The ARM/Linux syscall table 69 ------------------------------------------------------------------ */ 70 71 // Macros for adding ARM/Linux-specific wrappers to the syscall table. Note 72 // that ARM syscall numbers start at __NR_SYSCALL_BASE. 73 #define PLAX_(const, name) \ 74 SYS_WRAPPER_ENTRY_X_(arm_linux, const - __NR_SYSCALL_BASE, name) 75 #define PLAXY(const, name) \ 76 SYS_WRAPPER_ENTRY_XY(arm_linux, const - __NR_SYSCALL_BASE, name) 77 78 // This table maps from __NR_xxx syscall numbers (from 79 // linux/include/asm-arm/unistd.h) to the appropriate PRE/POST sys_foo() 80 // wrappers on ARM (as per sys_call_table in linux/arch/arm/kernel/entry.S). 81 // 82 // XXX: look at the x86-linux one to see how to do it. 83 84 const struct SyscallTableEntry ML_(syscall_table)[] = { 85 // (restart_syscall) // 0 86 GENX_(__NR_exit, sys_exit), // 1 87 LINX_(__NR_mount, sys_mount), // 21 88 PLAX_(__NR_syscall, sys_syscall), // 113 89 PLAXY(__NR_ipc, sys_ipc), // 117 90 PLAX_(__NR_clone, sys_clone), // 120 91 }; 92 93 const UInt ML_(syscall_table_size) = 94 sizeof(ML_(syscall_table)) / sizeof(ML_(syscall_table)[0]); 95 96 ============================================================================= 97 From m_scheduler/scheduler.c 98 ============================================================================= 99 #elif defined(VGA_arm) 100 # define VG_CLREQ_ARGS guest_R0 101 # define VG_CLREQ_RET guest_R0 102 103 ============================================================================= 104 From include/pub_tool_machine.h 105 ============================================================================= 106 #elif defined(VGA_arm) 107 # define VG_MIN_INSTR_SZB 4 108 # define VG_MAX_INSTR_SZB 4 109 # define VG_STACK_REDZONE_SZB 0 110 111 ============================================================================= 112 From include/pub_tool_basics.h 113 ============================================================================= 114 #elif defined(VGA_arm) 115 # define VG_REGPARM(n) /* */ 116 117 ============================================================================= 118 From coregrind/pub_core_machine.h 119 ============================================================================= 120 #elif defined(VGA_arm) 121 # define VG_ELF_ENDIANNESS ELFDATA2LSB 122 # define VG_ELF_MACHINE EM_ARM 123 # define VG_ELF_CLASS ELFCLASS32 124 125 #elif defined(VGA_arm) 126 // XXX: Not sure, but I think: 127 // r11 = frame pointer 128 // r12 = "implicit parameter" (neither caller-save, nor callee-save) 129 // r13 = stack pointer 130 // r14 = link register 131 // r15 = program counter 132 # define VG_INSTR_PTR guest_R15 133 # define VG_STACK_PTR guest_R13 134 # define VG_FRAME_PTR guest_R11 135 136 ============================================================================= 137 From coregrind/pub_core_threadstate.h 138 ============================================================================= 139 #elif defined(VGA_arm) 140 typedef VexGuestARMState VexGuestArchState; 141 142 ============================================================================= 143 From coregrind/vki_unistd.h 144 ============================================================================= 145 #elif defined(VGP_arm_linux) 146 # include "vki_unistd-arm-linux.h" 147 148 ============================================================================= 149 From coregrind/m_signals.c 150 ============================================================================= 151 #elif defined(VGP_arm_linux) 152 # define VG_UCONTEXT_INSTR_PTR(uc) ((uc)->uc_mcontext.arm_pc) 153 # define VG_UCONTEXT_STACK_PTR(uc) ((uc)->uc_mcontext.arm_sp) 154 # define VG_UCONTEXT_FRAME_PTR(uc) ((uc)->uc_mcontext.arm_fp) 155 # define VG_UCONTEXT_SYSCALL_NUM(uc) ((uc)->uc_mcontext.arm_r0) 156 # error VG_UCONTEXT_SYSCALL_RET undefined for ARM/Linux 157 158 ============================================================================= 159 From tests/arch_test.c 160 ============================================================================= 161 - You'll need to add "arm" to all_archs[]. 162 163 #ifdef __arm__ 164 static Bool go(char* cpu) 165 { 166 if ( strcmp( cpu, "arm" ) == 0 ) 167 return True; 168 else 169 return False; 170 } 171 #endif // __arm__ 172 173 ============================================================================= 174 All of include/vki_posixtypes-arm-linux.h 175 ============================================================================= 176 177 /*--------------------------------------------------------------------*/ 178 /*--- ARM/Linux-specific kernel interface: posix types. ---*/ 179 /*--- vki_posixtypes-arm-linux.h ---*/ 180 /*--------------------------------------------------------------------*/ 181 182 /* 183 This file is part of Valgrind, a dynamic binary instrumentation 184 framework. 185 186 Copyright (C) 2000-2005 Julian Seward 187 jseward (a] acm.org 188 189 This program is free software; you can redistribute it and/or 190 modify it under the terms of the GNU General Public License as 191 published by the Free Software Foundation; either version 2 of the 192 License, or (at your option) any later version. 193 194 This program is distributed in the hope that it will be useful, but 195 WITHOUT ANY WARRANTY; without even the implied warranty of 196 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 197 General Public License for more details. 198 199 You should have received a copy of the GNU General Public License 200 along with this program; if not, write to the Free Software 201 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 202 02111-1307, USA. 203 204 The GNU General Public License is contained in the file COPYING. 205 */ 206 207 #ifndef __VKI_POSIXTYPES_ARM_LINUX_H 208 #define __VKI_POSIXTYPES_ARM_LINUX_H 209 210 //---------------------------------------------------------------------- 211 // From linux-2.6.8.1/include/asm-i386/posix_types.h 212 //---------------------------------------------------------------------- 213 214 typedef unsigned short __vki_kernel_mode_t; 215 typedef long __vki_kernel_off_t; 216 typedef int __vki_kernel_pid_t; 217 typedef unsigned short __vki_kernel_ipc_pid_t; 218 typedef unsigned short __vki_kernel_uid_t; 219 typedef unsigned short __vki_kernel_gid_t; 220 typedef unsigned int __vki_kernel_size_t; 221 typedef long __vki_kernel_time_t; 222 typedef long __vki_kernel_suseconds_t; 223 typedef long __vki_kernel_clock_t; 224 typedef int __vki_kernel_timer_t; 225 typedef int __vki_kernel_clockid_t; 226 typedef char * __vki_kernel_caddr_t; 227 typedef unsigned int __vki_kernel_uid32_t; 228 typedef unsigned int __vki_kernel_gid32_t; 229 230 typedef unsigned short __vki_kernel_old_uid_t; 231 typedef unsigned short __vki_kernel_old_gid_t; 232 233 typedef long long __vki_kernel_loff_t; 234 235 typedef struct { 236 int val[2]; 237 } __vki_kernel_fsid_t; 238 239 #endif // __VKI_POSIXTYPES_ARM_LINUX_H 240 241 /*--------------------------------------------------------------------*/ 242 /*--- end ---*/ 243 /*--------------------------------------------------------------------*/ 244 245 ============================================================================= 246 All of include/vki-arm-linux.h 247 ============================================================================= 248 249 /*--------------------------------------------------------------------*/ 250 /*--- ARM/Linux-specific kernel interface. vki-arm-linux.h ---*/ 251 /*--------------------------------------------------------------------*/ 252 253 /* 254 This file is part of Valgrind, a dynamic binary instrumentation 255 framework. 256 257 Copyright (C) 2000-2005 Julian Seward 258 jseward (a] acm.org 259 260 This program is free software; you can redistribute it and/or 261 modify it under the terms of the GNU General Public License as 262 published by the Free Software Foundation; either version 2 of the 263 License, or (at your option) any later version. 264 265 This program is distributed in the hope that it will be useful, but 266 WITHOUT ANY WARRANTY; without even the implied warranty of 267 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 268 General Public License for more details. 269 270 You should have received a copy of the GNU General Public License 271 along with this program; if not, write to the Free Software 272 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 273 02111-1307, USA. 274 275 The GNU General Public License is contained in the file COPYING. 276 */ 277 278 #ifndef __VKI_ARM_LINUX_H 279 #define __VKI_ARM_LINUX_H 280 281 // ARM can be big or little endian; we're only supporting little endian. 282 #define VKI_LITTLE_ENDIAN 1 283 284 //---------------------------------------------------------------------- 285 // From linux-2.6.9/include/asm-arm/types.h 286 //---------------------------------------------------------------------- 287 288 typedef unsigned char __vki_u8; 289 290 typedef __signed__ short __vki_s16; 291 typedef unsigned short __vki_u16; 292 293 typedef unsigned int __vki_u32; 294 295 typedef __signed__ long long __vki_s64; 296 typedef unsigned long long __vki_u64; 297 298 typedef unsigned short vki_u16; 299 300 typedef unsigned int vki_u32; 301 302 //---------------------------------------------------------------------- 303 // From linux-2.6.9/include/asm-arm/page.h 304 //---------------------------------------------------------------------- 305 306 #define VKI_PAGE_SHIFT 12 307 #define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT) 308 309 //---------------------------------------------------------------------- 310 // From linux-2.6.9/include/asm-arm/signal.h 311 //---------------------------------------------------------------------- 312 313 #define _VKI_NSIG 64 314 #define _VKI_NSIG_BPW 32 315 #define _VKI_NSIG_WORDS (_VKI_NSIG / _VKI_NSIG_BPW) 316 317 typedef unsigned long vki_old_sigset_t; /* at least 32 bits */ 318 319 typedef struct { 320 unsigned long sig[_VKI_NSIG_WORDS]; 321 } vki_sigset_t; 322 323 #define VKI_SIGHUP 1 324 #define VKI_SIGINT 2 325 #define VKI_SIGQUIT 3 326 #define VKI_SIGILL 4 327 #define VKI_SIGTRAP 5 328 #define VKI_SIGABRT 6 329 //#define VKI_SIGIOT 6 330 #define VKI_SIGBUS 7 331 #define VKI_SIGFPE 8 332 #define VKI_SIGKILL 9 333 #define VKI_SIGUSR1 10 334 #define VKI_SIGSEGV 11 335 #define VKI_SIGUSR2 12 336 #define VKI_SIGPIPE 13 337 #define VKI_SIGALRM 14 338 #define VKI_SIGTERM 15 339 #define VKI_SIGSTKFLT 16 340 #define VKI_SIGCHLD 17 341 #define VKI_SIGCONT 18 342 #define VKI_SIGSTOP 19 343 #define VKI_SIGTSTP 20 344 #define VKI_SIGTTIN 21 345 #define VKI_SIGTTOU 22 346 #define VKI_SIGURG 23 347 #define VKI_SIGXCPU 24 348 #define VKI_SIGXFSZ 25 349 #define VKI_SIGVTALRM 26 350 #define VKI_SIGPROF 27 351 #define VKI_SIGWINCH 28 352 #define VKI_SIGIO 29 353 #define VKI_SIGPWR 30 354 #define VKI_SIGSYS 31 355 #define VKI_SIGUNUSED 31 356 357 /* These should not be considered constants from userland. */ 358 #define VKI_SIGRTMIN 32 359 #define VKI_SIGRTMAX _VKI_NSIG 360 361 #define VKI_SIGSWI 32 362 363 #define VKI_SA_NOCLDSTOP 0x00000001 364 #define VKI_SA_NOCLDWAIT 0x00000002 365 #define VKI_SA_SIGINFO 0x00000004 366 //#define VKI_SA_THIRTYTWO 0x02000000 367 #define VKI_SA_RESTORER 0x04000000 368 #define VKI_SA_ONSTACK 0x08000000 369 #define VKI_SA_RESTART 0x10000000 370 #define VKI_SA_NODEFER 0x40000000 371 #define VKI_SA_RESETHAND 0x80000000 372 373 #define VKI_SA_NOMASK VKI_SA_NODEFER 374 #define VKI_SA_ONESHOT VKI_SA_RESETHAND 375 //#define VKI_SA_INTERRUPT 0x20000000 /* dummy -- ignored */ 376 377 378 #define VKI_SS_ONSTACK 1 379 #define VKI_SS_DISABLE 2 380 381 #define VKI_MINSIGSTKSZ 2048 382 383 #define VKI_SIG_BLOCK 0 /* for blocking signals */ 384 #define VKI_SIG_UNBLOCK 1 /* for unblocking signals */ 385 #define VKI_SIG_SETMASK 2 /* for setting the signal mask */ 386 387 /* Type of a signal handler. */ 388 typedef void __vki_signalfn_t(int); 389 typedef __vki_signalfn_t __user *__vki_sighandler_t; 390 391 typedef void __vki_restorefn_t(void); 392 typedef __vki_restorefn_t __user *__vki_sigrestore_t; 393 394 #define VKI_SIG_DFL ((__vki_sighandler_t)0) /* default signal handling */ 395 #define VKI_SIG_IGN ((__vki_sighandler_t)1) /* ignore signal */ 396 397 struct vki_old_sigaction { 398 // [[Nb: a 'k' prefix is added to "sa_handler" because 399 // bits/sigaction.h (which gets dragged in somehow via signal.h) 400 // #defines it as something else. Since that is done for glibc's 401 // purposes, which we don't care about here, we use our own name.]] 402 __vki_sighandler_t ksa_handler; 403 vki_old_sigset_t sa_mask; 404 unsigned long sa_flags; 405 __vki_sigrestore_t sa_restorer; 406 }; 407 408 struct vki_sigaction { 409 // [[See comment about extra 'k' above]] 410 __vki_sighandler_t ksa_handler; 411 unsigned long sa_flags; 412 __vki_sigrestore_t sa_restorer; 413 vki_sigset_t sa_mask; /* mask last for extensibility */ 414 }; 415 416 typedef struct vki_sigaltstack { 417 void __user *ss_sp; 418 int ss_flags; 419 vki_size_t ss_size; 420 } vki_stack_t; 421 422 //---------------------------------------------------------------------- 423 // From linux-2.6.9/include/asm-arm/sigcontext.h 424 //---------------------------------------------------------------------- 425 426 struct vki_sigcontext { 427 unsigned long trap_no; 428 unsigned long error_code; 429 unsigned long oldmask; 430 unsigned long arm_r0; 431 unsigned long arm_r1; 432 unsigned long arm_r2; 433 unsigned long arm_r3; 434 unsigned long arm_r4; 435 unsigned long arm_r5; 436 unsigned long arm_r6; 437 unsigned long arm_r7; 438 unsigned long arm_r8; 439 unsigned long arm_r9; 440 unsigned long arm_r10; 441 unsigned long arm_fp; 442 unsigned long arm_ip; 443 unsigned long arm_sp; 444 unsigned long arm_lr; 445 unsigned long arm_pc; 446 unsigned long arm_cpsr; 447 unsigned long fault_address; 448 }; 449 450 //---------------------------------------------------------------------- 451 // From linux-2.6.9/include/asm-arm/mman.h 452 //---------------------------------------------------------------------- 453 454 #define VKI_PROT_READ 0x1 /* page can be read */ 455 #define VKI_PROT_WRITE 0x2 /* page can be written */ 456 #define VKI_PROT_EXEC 0x4 /* page can be executed */ 457 //#define VKI_PROT_SEM 0x8 /* page may be used for atomic ops */ 458 //#define VKI_PROT_NONE 0x0 /* page can not be accessed */ 459 460 #define VKI_MAP_SHARED 0x01 /* Share changes */ 461 #define VKI_MAP_PRIVATE 0x02 /* Changes are private */ 462 #define VKI_MAP_TYPE 0x0f /* Mask for type of mapping */ 463 #define VKI_MAP_FIXED 0x10 /* Interpret addr exactly */ 464 #define VKI_MAP_ANONYMOUS 0x20 /* don't use a file */ 465 466 //---------------------------------------------------------------------- 467 // From linux-2.6.9/include/asm-arm/fcntl.h 468 //---------------------------------------------------------------------- 469 470 #define VKI_O_RDONLY 00 471 #define VKI_O_WRONLY 01 472 #define VKI_O_CREAT 0100 /* not fcntl */ 473 #define VKI_O_EXCL 0200 /* not fcntl */ 474 #define VKI_O_TRUNC 01000 /* not fcntl */ 475 #define VKI_O_NONBLOCK 04000 476 477 #define VKI_F_DUPFD 0 /* dup */ 478 #define VKI_F_GETFD 1 /* get close_on_exec */ 479 #define VKI_F_SETFD 2 /* set/clear close_on_exec */ 480 #define VKI_F_GETFL 3 /* get file->f_flags */ 481 #define VKI_F_SETFL 4 /* set file->f_flags */ 482 #define VKI_F_GETLK 5 483 #define VKI_F_SETLK 6 484 #define VKI_F_SETLKW 7 485 486 #define VKI_F_SETOWN 8 /* for sockets. */ 487 #define VKI_F_GETOWN 9 /* for sockets. */ 488 #define VKI_F_SETSIG 10 /* for sockets. */ 489 #define VKI_F_GETSIG 11 /* for sockets. */ 490 491 #define VKI_F_GETLK64 12 /* using 'struct flock64' */ 492 #define VKI_F_SETLK64 13 493 #define VKI_F_SETLKW64 14 494 495 /* for F_[GET|SET]FL */ 496 #define VKI_FD_CLOEXEC 1 /* actually anything with low bit set goes */ 497 498 #define VKI_F_LINUX_SPECIFIC_BASE 1024 499 500 //---------------------------------------------------------------------- 501 // From linux-2.6.9/include/asm-arm/resource.h 502 //---------------------------------------------------------------------- 503 504 #define VKI_RLIMIT_DATA 2 /* max data size */ 505 #define VKI_RLIMIT_STACK 3 /* max stack size */ 506 #define VKI_RLIMIT_CORE 4 /* max core file size */ 507 #define VKI_RLIMIT_NOFILE 7 /* max number of open files */ 508 509 //---------------------------------------------------------------------- 510 // From linux-2.6.9/include/asm-arm/socket.h 511 //---------------------------------------------------------------------- 512 513 #define VKI_SOL_SOCKET 1 514 515 #define VKI_SO_TYPE 3 516 517 //---------------------------------------------------------------------- 518 // From linux-2.6.9/include/asm-arm/sockios.h 519 //---------------------------------------------------------------------- 520 521 #define VKI_SIOCSPGRP 0x8902 522 #define VKI_SIOCGPGRP 0x8904 523 #define VKI_SIOCGSTAMP 0x8906 /* Get stamp */ 524 525 //---------------------------------------------------------------------- 526 // From linux-2.6.9/include/asm-arm/stat.h 527 //---------------------------------------------------------------------- 528 529 // [[Nb: resolved some #ifdefs by assuming __ARMEB__ is false, ie. that 530 // we're not big-endian.]] 531 struct vki_stat { 532 unsigned long st_dev; 533 unsigned long st_ino; 534 unsigned short st_mode; 535 unsigned short st_nlink; 536 unsigned short st_uid; 537 unsigned short st_gid; 538 unsigned long st_rdev; 539 unsigned long st_size; 540 unsigned long st_blksize; 541 unsigned long st_blocks; 542 unsigned long st_atime; 543 unsigned long st_atime_nsec; 544 unsigned long st_mtime; 545 unsigned long st_mtime_nsec; 546 unsigned long st_ctime; 547 unsigned long st_ctime_nsec; 548 unsigned long __unused4; 549 unsigned long __unused5; 550 }; 551 552 struct vki_stat64 { 553 unsigned long long st_dev; 554 unsigned char __pad0[4]; 555 556 #define STAT64_HAS_BROKEN_ST_INO 1 557 unsigned long __st_ino; 558 unsigned int st_mode; 559 unsigned int st_nlink; 560 561 unsigned long st_uid; 562 unsigned long st_gid; 563 564 unsigned long long st_rdev; 565 unsigned char __pad3[4]; 566 567 long long st_size; 568 unsigned long st_blksize; 569 570 unsigned long st_blocks; /* Number 512-byte blocks allocated. */ 571 unsigned long __pad4; /* Future possible st_blocks hi bits */ 572 573 unsigned long st_atime; 574 unsigned long st_atime_nsec; 575 576 unsigned long st_mtime; 577 unsigned long st_mtime_nsec; 578 579 unsigned long st_ctime; 580 unsigned long st_ctime_nsec; 581 582 unsigned long long st_ino; 583 }; 584 585 //---------------------------------------------------------------------- 586 // From linux-2.6.9/include/asm-arm/statfs.h 587 //---------------------------------------------------------------------- 588 589 // [[Nb: asm-arm/statfs.h just #include asm-generic/statfs.h directly]] 590 struct vki_statfs { 591 __vki_u32 f_type; 592 __vki_u32 f_bsize; 593 __vki_u32 f_blocks; 594 __vki_u32 f_bfree; 595 __vki_u32 f_bavail; 596 __vki_u32 f_files; 597 __vki_u32 f_ffree; 598 __vki_kernel_fsid_t f_fsid; 599 __vki_u32 f_namelen; 600 __vki_u32 f_frsize; 601 __vki_u32 f_spare[5]; 602 }; 603 604 //---------------------------------------------------------------------- 605 // From linux-2.6.9/include/asm-arm/termios.h 606 //---------------------------------------------------------------------- 607 608 struct vki_winsize { 609 unsigned short ws_row; 610 unsigned short ws_col; 611 unsigned short ws_xpixel; 612 unsigned short ws_ypixel; 613 }; 614 615 #define VKI_NCC 8 616 struct vki_termio { 617 unsigned short c_iflag; /* input mode flags */ 618 unsigned short c_oflag; /* output mode flags */ 619 unsigned short c_cflag; /* control mode flags */ 620 unsigned short c_lflag; /* local mode flags */ 621 unsigned char c_line; /* line discipline */ 622 unsigned char c_cc[VKI_NCC]; /* control characters */ 623 }; 624 625 //---------------------------------------------------------------------- 626 // From linux-2.6.9/include/asm-arm/termbits.h 627 //---------------------------------------------------------------------- 628 629 typedef unsigned char vki_cc_t; 630 typedef unsigned int vki_tcflag_t; 631 632 #define VKI_NCCS 19 633 struct vki_termios { 634 vki_tcflag_t c_iflag; /* input mode flags */ 635 vki_tcflag_t c_oflag; /* output mode flags */ 636 vki_tcflag_t c_cflag; /* control mode flags */ 637 vki_tcflag_t c_lflag; /* local mode flags */ 638 vki_cc_t c_line; /* line discipline */ 639 vki_cc_t c_cc[VKI_NCCS]; /* control characters */ 640 }; 641 642 //---------------------------------------------------------------------- 643 // From linux-2.6.9/include/asm-arm/ioctl.h 644 //---------------------------------------------------------------------- 645 646 #define _VKI_IOC_NRBITS 8 647 #define _VKI_IOC_TYPEBITS 8 648 #define _VKI_IOC_SIZEBITS 14 649 #define _VKI_IOC_DIRBITS 2 650 651 #define _VKI_IOC_SIZEMASK ((1 << _VKI_IOC_SIZEBITS)-1) 652 #define _VKI_IOC_DIRMASK ((1 << _VKI_IOC_DIRBITS)-1) 653 654 #define _VKI_IOC_NRSHIFT 0 655 #define _VKI_IOC_TYPESHIFT (_VKI_IOC_NRSHIFT+_VKI_IOC_NRBITS) 656 #define _VKI_IOC_SIZESHIFT (_VKI_IOC_TYPESHIFT+_VKI_IOC_TYPEBITS) 657 #define _VKI_IOC_DIRSHIFT (_VKI_IOC_SIZESHIFT+_VKI_IOC_SIZEBITS) 658 659 #define _VKI_IOC_NONE 0U 660 #define _VKI_IOC_WRITE 1U 661 #define _VKI_IOC_READ 2U 662 663 #define _VKI_IOC(dir,type,nr,size) \ 664 (((dir) << _VKI_IOC_DIRSHIFT) | \ 665 ((type) << _VKI_IOC_TYPESHIFT) | \ 666 ((nr) << _VKI_IOC_NRSHIFT) | \ 667 ((size) << _VKI_IOC_SIZESHIFT)) 668 669 /* used to create numbers */ 670 #define _VKI_IO(type,nr) _VKI_IOC(_VKI_IOC_NONE,(type),(nr),0) 671 #define _VKI_IOR(type,nr,size) _VKI_IOC(_VKI_IOC_READ,(type),(nr),sizeof(size)) 672 #define _VKI_IOW(type,nr,size) _VKI_IOC(_VKI_IOC_WRITE,(type),(nr),sizeof(size)) 673 #define _VKI_IOWR(type,nr,size) _VKI_IOC(_VKI_IOC_READ|_VKI_IOC_WRITE,(type),(nr),sizeof(size)) 674 675 /* used to decode ioctl numbers.. */ 676 #define _VKI_IOC_DIR(nr) (((nr) >> _VKI_IOC_DIRSHIFT) & _VKI_IOC_DIRMASK) 677 #define _VKI_IOC_SIZE(nr) (((nr) >> _VKI_IOC_SIZESHIFT) & _VKI_IOC_SIZEMASK) 678 679 //---------------------------------------------------------------------- 680 // From linux-2.6.9/include/asm-arm/ioctls.h 681 //---------------------------------------------------------------------- 682 683 #define VKI_TCGETS 0x5401 684 #define VKI_TCSETS 0x5402 685 #define VKI_TCSETSW 0x5403 686 #define VKI_TCSETSF 0x5404 687 #define VKI_TCGETA 0x5405 688 #define VKI_TCSETA 0x5406 689 #define VKI_TCSETAW 0x5407 690 #define VKI_TCSETAF 0x5408 691 #define VKI_TCSBRK 0x5409 692 #define VKI_TCXONC 0x540A 693 #define VKI_TCFLSH 0x540B 694 #define VKI_TIOCSCTTY 0x540E 695 #define VKI_TIOCGPGRP 0x540F 696 #define VKI_TIOCSPGRP 0x5410 697 #define VKI_TIOCOUTQ 0x5411 698 #define VKI_TIOCGWINSZ 0x5413 699 #define VKI_TIOCSWINSZ 0x5414 700 #define VKI_TIOCMBIS 0x5416 701 #define VKI_TIOCMBIC 0x5417 702 #define VKI_TIOCMSET 0x5418 703 #define VKI_FIONREAD 0x541B 704 #define VKI_TIOCLINUX 0x541C 705 #define VKI_FIONBIO 0x5421 706 #define VKI_TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ 707 #define VKI_TIOCGPTN _VKI_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ 708 #define VKI_TIOCSPTLCK _VKI_IOW('T',0x31, int) /* Lock/unlock Pty */ 709 710 #define VKI_FIOASYNC 0x5452 711 712 //---------------------------------------------------------------------- 713 // From linux-2.6.9/include/asm-arm/poll.h 714 //---------------------------------------------------------------------- 715 716 #define VKI_POLLIN 0x0001 717 718 struct vki_pollfd { 719 int fd; 720 short events; 721 short revents; 722 }; 723 724 //---------------------------------------------------------------------- 725 // From linux-2.6.9/include/asm-arm/user.h 726 //---------------------------------------------------------------------- 727 728 // XXX: For x86, had here: 729 // struct vki_user_i387_struct 730 // struct vki_user_fxsr_struct 731 // struct vki_user_regs_struct 732 733 //---------------------------------------------------------------------- 734 // From linux-2.6.9/include/asm-arm/ptrace.h 735 //---------------------------------------------------------------------- 736 737 struct vki_pt_regs { 738 long uregs[18]; 739 }; 740 741 //---------------------------------------------------------------------- 742 // From linux-2.6.9/include/asm-arm/elf.h 743 //---------------------------------------------------------------------- 744 745 typedef unsigned long vki_elf_greg_t; 746 747 #define VKI_ELF_NGREG (sizeof (struct vki_pt_regs) / sizeof(vki_elf_greg_t)) 748 typedef vki_elf_greg_t vki_elf_gregset_t[VKI_ELF_NGREG]; 749 750 //---------------------------------------------------------------------- 751 // From linux-2.6.9/include/asm-arm/ucontext.h 752 //---------------------------------------------------------------------- 753 754 struct vki_ucontext { 755 unsigned long uc_flags; 756 struct vki_ucontext *uc_link; 757 vki_stack_t uc_stack; 758 struct vki_sigcontext uc_mcontext; 759 vki_sigset_t uc_sigmask; /* mask last for extensibility */ 760 }; 761 762 //---------------------------------------------------------------------- 763 // From linux-2.6.9/include/asm-arm/ipcbuf.h 764 //---------------------------------------------------------------------- 765 766 struct vki_ipc64_perm 767 { 768 __vki_kernel_key_t key; 769 __vki_kernel_uid32_t uid; 770 __vki_kernel_gid32_t gid; 771 __vki_kernel_uid32_t cuid; 772 __vki_kernel_gid32_t cgid; 773 __vki_kernel_mode_t mode; 774 unsigned short __pad1; 775 unsigned short seq; 776 unsigned short __pad2; 777 unsigned long __unused1; 778 unsigned long __unused2; 779 }; 780 781 //---------------------------------------------------------------------- 782 // From linux-2.6.9/include/asm-arm/sembuf.h 783 //---------------------------------------------------------------------- 784 785 struct vki_semid64_ds { 786 struct vki_ipc64_perm sem_perm; /* permissions .. see ipc.h */ 787 __vki_kernel_time_t sem_otime; /* last semop time */ 788 unsigned long __unused1; 789 __vki_kernel_time_t sem_ctime; /* last change time */ 790 unsigned long __unused2; 791 unsigned long sem_nsems; /* no. of semaphores in array */ 792 unsigned long __unused3; 793 unsigned long __unused4; 794 }; 795 796 797 //---------------------------------------------------------------------- 798 // From linux-2.6.9/include/asm-arm/msgbuf.h 799 //---------------------------------------------------------------------- 800 801 struct vki_msqid64_ds { 802 struct vki_ipc64_perm msg_perm; 803 __vki_kernel_time_t msg_stime; /* last msgsnd time */ 804 unsigned long __unused1; 805 __vki_kernel_time_t msg_rtime; /* last msgrcv time */ 806 unsigned long __unused2; 807 __vki_kernel_time_t msg_ctime; /* last change time */ 808 unsigned long __unused3; 809 unsigned long msg_cbytes; /* current number of bytes on queue */ 810 unsigned long msg_qnum; /* number of messages in queue */ 811 unsigned long msg_qbytes; /* max number of bytes on queue */ 812 __vki_kernel_pid_t msg_lspid; /* pid of last msgsnd */ 813 __vki_kernel_pid_t msg_lrpid; /* last receive pid */ 814 unsigned long __unused4; 815 unsigned long __unused5; 816 }; 817 818 //---------------------------------------------------------------------- 819 // From linux-2.6.9/include/asm-arm/ipc.h 820 //---------------------------------------------------------------------- 821 822 struct vki_ipc_kludge { 823 struct vki_msgbuf __user *msgp; 824 long msgtyp; 825 }; 826 827 //---------------------------------------------------------------------- 828 // From linux-2.6.9/include/asm-arm/shmbuf.h 829 //---------------------------------------------------------------------- 830 831 struct vki_shmid64_ds { 832 struct vki_ipc64_perm shm_perm; /* operation perms */ 833 vki_size_t shm_segsz; /* size of segment (bytes) */ 834 __vki_kernel_time_t shm_atime; /* last attach time */ 835 unsigned long __unused1; 836 __vki_kernel_time_t shm_dtime; /* last detach time */ 837 unsigned long __unused2; 838 __vki_kernel_time_t shm_ctime; /* last change time */ 839 unsigned long __unused3; 840 __vki_kernel_pid_t shm_cpid; /* pid of creator */ 841 __vki_kernel_pid_t shm_lpid; /* pid of last operator */ 842 unsigned long shm_nattch; /* no. of current attaches */ 843 unsigned long __unused4; 844 unsigned long __unused5; 845 }; 846 847 struct vki_shminfo64 { 848 unsigned long shmmax; 849 unsigned long shmmin; 850 unsigned long shmmni; 851 unsigned long shmseg; 852 unsigned long shmall; 853 unsigned long __unused1; 854 unsigned long __unused2; 855 unsigned long __unused3; 856 unsigned long __unused4; 857 }; 858 859 //---------------------------------------------------------------------- 860 // And that's it! 861 //---------------------------------------------------------------------- 862 863 #endif // __VKI_ARM_LINUX_H 864 865 /*--------------------------------------------------------------------*/ 866 /*--- end ---*/ 867 /*--------------------------------------------------------------------*/ 868 869 ============================================================================= 870 All of coregrind/vki_unistd-arm-linux.h 871 ============================================================================= 872 873 /* 874 This file is part of Valgrind, a dynamic binary instrumentation 875 framework. 876 877 Copyright (C) 2000-2005 Julian Seward 878 jseward (a] acm.org 879 880 This program is free software; you can redistribute it and/or 881 modify it under the terms of the GNU General Public License as 882 published by the Free Software Foundation; either version 2 of the 883 License, or (at your option) any later version. 884 885 This program is distributed in the hope that it will be useful, but 886 WITHOUT ANY WARRANTY; without even the implied warranty of 887 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 888 General Public License for more details. 889 890 You should have received a copy of the GNU General Public License 891 along with this program; if not, write to the Free Software 892 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 893 02111-1307, USA. 894 895 The GNU General Public License is contained in the file COPYING. 896 */ 897 898 #ifndef __VKI_UNISTD_ARM_LINUX_H 899 #define __VKI_UNISTD_ARM_LINUX_H 900 901 // From linux-2.6.8.1/include/asm-arm/unistd.h 902 903 // Nb: ARM Thumb has a different __NR_SYSCALL_BASE, but we don't care about 904 // that architecture. 905 #define __NR_SYSCALL_BASE 0x900000 906 907 #define __NR_restart_syscall (__NR_SYSCALL_BASE+ 0) 908 #define __NR_exit (__NR_SYSCALL_BASE+ 1) 909 #define __NR_fork (__NR_SYSCALL_BASE+ 2) 910 #define __NR_read (__NR_SYSCALL_BASE+ 3) 911 #define __NR_write (__NR_SYSCALL_BASE+ 4) 912 #define __NR_open (__NR_SYSCALL_BASE+ 5) 913 #define __NR_close (__NR_SYSCALL_BASE+ 6) 914 /* 7 was sys_waitpid */ 915 #define __NR_creat (__NR_SYSCALL_BASE+ 8) 916 #define __NR_link (__NR_SYSCALL_BASE+ 9) 917 #define __NR_unlink (__NR_SYSCALL_BASE+ 10) 918 #define __NR_execve (__NR_SYSCALL_BASE+ 11) 919 #define __NR_chdir (__NR_SYSCALL_BASE+ 12) 920 #define __NR_time (__NR_SYSCALL_BASE+ 13) 921 #define __NR_mknod (__NR_SYSCALL_BASE+ 14) 922 #define __NR_chmod (__NR_SYSCALL_BASE+ 15) 923 #define __NR_lchown (__NR_SYSCALL_BASE+ 16) 924 /* 17 was sys_break */ 925 /* 18 was sys_stat */ 926 #define __NR_lseek (__NR_SYSCALL_BASE+ 19) 927 #define __NR_getpid (__NR_SYSCALL_BASE+ 20) 928 #define __NR_mount (__NR_SYSCALL_BASE+ 21) 929 #define __NR_umount (__NR_SYSCALL_BASE+ 22) 930 #define __NR_setuid (__NR_SYSCALL_BASE+ 23) 931 #define __NR_getuid (__NR_SYSCALL_BASE+ 24) 932 #define __NR_stime (__NR_SYSCALL_BASE+ 25) 933 #define __NR_ptrace (__NR_SYSCALL_BASE+ 26) 934 #define __NR_alarm (__NR_SYSCALL_BASE+ 27) 935 /* 28 was sys_fstat */ 936 #define __NR_pause (__NR_SYSCALL_BASE+ 29) 937 #define __NR_utime (__NR_SYSCALL_BASE+ 30) 938 /* 31 was sys_stty */ 939 /* 32 was sys_gtty */ 940 #define __NR_access (__NR_SYSCALL_BASE+ 33) 941 #define __NR_nice (__NR_SYSCALL_BASE+ 34) 942 /* 35 was sys_ftime */ 943 #define __NR_sync (__NR_SYSCALL_BASE+ 36) 944 #define __NR_kill (__NR_SYSCALL_BASE+ 37) 945 #define __NR_rename (__NR_SYSCALL_BASE+ 38) 946 #define __NR_mkdir (__NR_SYSCALL_BASE+ 39) 947 #define __NR_rmdir (__NR_SYSCALL_BASE+ 40) 948 #define __NR_dup (__NR_SYSCALL_BASE+ 41) 949 #define __NR_pipe (__NR_SYSCALL_BASE+ 42) 950 #define __NR_times (__NR_SYSCALL_BASE+ 43) 951 /* 44 was sys_prof */ 952 #define __NR_brk (__NR_SYSCALL_BASE+ 45) 953 #define __NR_setgid (__NR_SYSCALL_BASE+ 46) 954 #define __NR_getgid (__NR_SYSCALL_BASE+ 47) 955 /* 48 was sys_signal */ 956 #define __NR_geteuid (__NR_SYSCALL_BASE+ 49) 957 #define __NR_getegid (__NR_SYSCALL_BASE+ 50) 958 #define __NR_acct (__NR_SYSCALL_BASE+ 51) 959 #define __NR_umount2 (__NR_SYSCALL_BASE+ 52) 960 /* 53 was sys_lock */ 961 #define __NR_ioctl (__NR_SYSCALL_BASE+ 54) 962 #define __NR_fcntl (__NR_SYSCALL_BASE+ 55) 963 /* 56 was sys_mpx */ 964 #define __NR_setpgid (__NR_SYSCALL_BASE+ 57) 965 /* 58 was sys_ulimit */ 966 /* 59 was sys_olduname */ 967 #define __NR_umask (__NR_SYSCALL_BASE+ 60) 968 #define __NR_chroot (__NR_SYSCALL_BASE+ 61) 969 #define __NR_ustat (__NR_SYSCALL_BASE+ 62) 970 #define __NR_dup2 (__NR_SYSCALL_BASE+ 63) 971 #define __NR_getppid (__NR_SYSCALL_BASE+ 64) 972 #define __NR_getpgrp (__NR_SYSCALL_BASE+ 65) 973 #define __NR_setsid (__NR_SYSCALL_BASE+ 66) 974 #define __NR_sigaction (__NR_SYSCALL_BASE+ 67) 975 /* 68 was sys_sgetmask */ 976 /* 69 was sys_ssetmask */ 977 #define __NR_setreuid (__NR_SYSCALL_BASE+ 70) 978 #define __NR_setregid (__NR_SYSCALL_BASE+ 71) 979 #define __NR_sigsuspend (__NR_SYSCALL_BASE+ 72) 980 #define __NR_sigpending (__NR_SYSCALL_BASE+ 73) 981 #define __NR_sethostname (__NR_SYSCALL_BASE+ 74) 982 #define __NR_setrlimit (__NR_SYSCALL_BASE+ 75) 983 #define __NR_getrlimit (__NR_SYSCALL_BASE+ 76) /* Back compat 2GB limited rlimit */ 984 #define __NR_getrusage (__NR_SYSCALL_BASE+ 77) 985 #define __NR_gettimeofday (__NR_SYSCALL_BASE+ 78) 986 #define __NR_settimeofday (__NR_SYSCALL_BASE+ 79) 987 #define __NR_getgroups (__NR_SYSCALL_BASE+ 80) 988 #define __NR_setgroups (__NR_SYSCALL_BASE+ 81) 989 #define __NR_select (__NR_SYSCALL_BASE+ 82) 990 #define __NR_symlink (__NR_SYSCALL_BASE+ 83) 991 /* 84 was sys_lstat */ 992 #define __NR_readlink (__NR_SYSCALL_BASE+ 85) 993 #define __NR_uselib (__NR_SYSCALL_BASE+ 86) 994 #define __NR_swapon (__NR_SYSCALL_BASE+ 87) 995 #define __NR_reboot (__NR_SYSCALL_BASE+ 88) 996 #define __NR_readdir (__NR_SYSCALL_BASE+ 89) 997 #define __NR_mmap (__NR_SYSCALL_BASE+ 90) 998 #define __NR_munmap (__NR_SYSCALL_BASE+ 91) 999 #define __NR_truncate (__NR_SYSCALL_BASE+ 92) 1000 #define __NR_ftruncate (__NR_SYSCALL_BASE+ 93) 1001 #define __NR_fchmod (__NR_SYSCALL_BASE+ 94) 1002 #define __NR_fchown (__NR_SYSCALL_BASE+ 95) 1003 #define __NR_getpriority (__NR_SYSCALL_BASE+ 96) 1004 #define __NR_setpriority (__NR_SYSCALL_BASE+ 97) 1005 /* 98 was sys_profil */ 1006 #define __NR_statfs (__NR_SYSCALL_BASE+ 99) 1007 #define __NR_fstatfs (__NR_SYSCALL_BASE+100) 1008 /* 101 was sys_ioperm */ 1009 #define __NR_socketcall (__NR_SYSCALL_BASE+102) 1010 #define __NR_syslog (__NR_SYSCALL_BASE+103) 1011 #define __NR_setitimer (__NR_SYSCALL_BASE+104) 1012 #define __NR_getitimer (__NR_SYSCALL_BASE+105) 1013 #define __NR_stat (__NR_SYSCALL_BASE+106) 1014 #define __NR_lstat (__NR_SYSCALL_BASE+107) 1015 #define __NR_fstat (__NR_SYSCALL_BASE+108) 1016 /* 109 was sys_uname */ 1017 /* 110 was sys_iopl */ 1018 #define __NR_vhangup (__NR_SYSCALL_BASE+111) 1019 /* 112 was sys_idle */ 1020 #define __NR_syscall (__NR_SYSCALL_BASE+113) /* syscall to call a syscall! */ 1021 #define __NR_wait4 (__NR_SYSCALL_BASE+114) 1022 #define __NR_swapoff (__NR_SYSCALL_BASE+115) 1023 #define __NR_sysinfo (__NR_SYSCALL_BASE+116) 1024 #define __NR_ipc (__NR_SYSCALL_BASE+117) 1025 #define __NR_fsync (__NR_SYSCALL_BASE+118) 1026 #define __NR_sigreturn (__NR_SYSCALL_BASE+119) 1027 #define __NR_clone (__NR_SYSCALL_BASE+120) 1028 #define __NR_setdomainname (__NR_SYSCALL_BASE+121) 1029 #define __NR_uname (__NR_SYSCALL_BASE+122) 1030 /* 123 was sys_modify_ldt */ 1031 #define __NR_adjtimex (__NR_SYSCALL_BASE+124) 1032 #define __NR_mprotect (__NR_SYSCALL_BASE+125) 1033 #define __NR_sigprocmask (__NR_SYSCALL_BASE+126) 1034 /* 127 was sys_create_module */ 1035 #define __NR_init_module (__NR_SYSCALL_BASE+128) 1036 #define __NR_delete_module (__NR_SYSCALL_BASE+129) 1037 /* 130 was sys_get_kernel_syms */ 1038 #define __NR_quotactl (__NR_SYSCALL_BASE+131) 1039 #define __NR_getpgid (__NR_SYSCALL_BASE+132) 1040 #define __NR_fchdir (__NR_SYSCALL_BASE+133) 1041 #define __NR_bdflush (__NR_SYSCALL_BASE+134) 1042 #define __NR_sysfs (__NR_SYSCALL_BASE+135) 1043 #define __NR_personality (__NR_SYSCALL_BASE+136) 1044 /* 137 was sys_afs_syscall */ 1045 #define __NR_setfsuid (__NR_SYSCALL_BASE+138) 1046 #define __NR_setfsgid (__NR_SYSCALL_BASE+139) 1047 #define __NR__llseek (__NR_SYSCALL_BASE+140) 1048 #define __NR_getdents (__NR_SYSCALL_BASE+141) 1049 #define __NR__newselect (__NR_SYSCALL_BASE+142) 1050 #define __NR_flock (__NR_SYSCALL_BASE+143) 1051 #define __NR_msync (__NR_SYSCALL_BASE+144) 1052 #define __NR_readv (__NR_SYSCALL_BASE+145) 1053 #define __NR_writev (__NR_SYSCALL_BASE+146) 1054 #define __NR_getsid (__NR_SYSCALL_BASE+147) 1055 #define __NR_fdatasync (__NR_SYSCALL_BASE+148) 1056 #define __NR__sysctl (__NR_SYSCALL_BASE+149) 1057 #define __NR_mlock (__NR_SYSCALL_BASE+150) 1058 #define __NR_munlock (__NR_SYSCALL_BASE+151) 1059 #define __NR_mlockall (__NR_SYSCALL_BASE+152) 1060 #define __NR_munlockall (__NR_SYSCALL_BASE+153) 1061 #define __NR_sched_setparam (__NR_SYSCALL_BASE+154) 1062 #define __NR_sched_getparam (__NR_SYSCALL_BASE+155) 1063 #define __NR_sched_setscheduler (__NR_SYSCALL_BASE+156) 1064 #define __NR_sched_getscheduler (__NR_SYSCALL_BASE+157) 1065 #define __NR_sched_yield (__NR_SYSCALL_BASE+158) 1066 #define __NR_sched_get_priority_max (__NR_SYSCALL_BASE+159) 1067 #define __NR_sched_get_priority_min (__NR_SYSCALL_BASE+160) 1068 #define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE+161) 1069 #define __NR_nanosleep (__NR_SYSCALL_BASE+162) 1070 #define __NR_mremap (__NR_SYSCALL_BASE+163) 1071 #define __NR_setresuid (__NR_SYSCALL_BASE+164) 1072 #define __NR_getresuid (__NR_SYSCALL_BASE+165) 1073 /* 166 was sys_vm86 */ 1074 /* 167 was sys_query_module */ 1075 #define __NR_poll (__NR_SYSCALL_BASE+168) 1076 #define __NR_nfsservctl (__NR_SYSCALL_BASE+169) 1077 #define __NR_setresgid (__NR_SYSCALL_BASE+170) 1078 #define __NR_getresgid (__NR_SYSCALL_BASE+171) 1079 #define __NR_prctl (__NR_SYSCALL_BASE+172) 1080 #define __NR_rt_sigreturn (__NR_SYSCALL_BASE+173) 1081 #define __NR_rt_sigaction (__NR_SYSCALL_BASE+174) 1082 #define __NR_rt_sigprocmask (__NR_SYSCALL_BASE+175) 1083 #define __NR_rt_sigpending (__NR_SYSCALL_BASE+176) 1084 #define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE+177) 1085 #define __NR_rt_sigqueueinfo (__NR_SYSCALL_BASE+178) 1086 #define __NR_rt_sigsuspend (__NR_SYSCALL_BASE+179) 1087 #define __NR_pread64 (__NR_SYSCALL_BASE+180) 1088 #define __NR_pwrite64 (__NR_SYSCALL_BASE+181) 1089 #define __NR_chown (__NR_SYSCALL_BASE+182) 1090 #define __NR_getcwd (__NR_SYSCALL_BASE+183) 1091 #define __NR_capget (__NR_SYSCALL_BASE+184) 1092 #define __NR_capset (__NR_SYSCALL_BASE+185) 1093 #define __NR_sigaltstack (__NR_SYSCALL_BASE+186) 1094 #define __NR_sendfile (__NR_SYSCALL_BASE+187) 1095 /* 188 reserved */ 1096 /* 189 reserved */ 1097 #define __NR_vfork (__NR_SYSCALL_BASE+190) 1098 #define __NR_ugetrlimit (__NR_SYSCALL_BASE+191) /* SuS compliant getrlimit */ 1099 #define __NR_mmap2 (__NR_SYSCALL_BASE+192) 1100 #define __NR_truncate64 (__NR_SYSCALL_BASE+193) 1101 #define __NR_ftruncate64 (__NR_SYSCALL_BASE+194) 1102 #define __NR_stat64 (__NR_SYSCALL_BASE+195) 1103 #define __NR_lstat64 (__NR_SYSCALL_BASE+196) 1104 #define __NR_fstat64 (__NR_SYSCALL_BASE+197) 1105 #define __NR_lchown32 (__NR_SYSCALL_BASE+198) 1106 #define __NR_getuid32 (__NR_SYSCALL_BASE+199) 1107 #define __NR_getgid32 (__NR_SYSCALL_BASE+200) 1108 #define __NR_geteuid32 (__NR_SYSCALL_BASE+201) 1109 #define __NR_getegid32 (__NR_SYSCALL_BASE+202) 1110 #define __NR_setreuid32 (__NR_SYSCALL_BASE+203) 1111 #define __NR_setregid32 (__NR_SYSCALL_BASE+204) 1112 #define __NR_getgroups32 (__NR_SYSCALL_BASE+205) 1113 #define __NR_setgroups32 (__NR_SYSCALL_BASE+206) 1114 #define __NR_fchown32 (__NR_SYSCALL_BASE+207) 1115 #define __NR_setresuid32 (__NR_SYSCALL_BASE+208) 1116 #define __NR_getresuid32 (__NR_SYSCALL_BASE+209) 1117 #define __NR_setresgid32 (__NR_SYSCALL_BASE+210) 1118 #define __NR_getresgid32 (__NR_SYSCALL_BASE+211) 1119 #define __NR_chown32 (__NR_SYSCALL_BASE+212) 1120 #define __NR_setuid32 (__NR_SYSCALL_BASE+213) 1121 #define __NR_setgid32 (__NR_SYSCALL_BASE+214) 1122 #define __NR_setfsuid32 (__NR_SYSCALL_BASE+215) 1123 #define __NR_setfsgid32 (__NR_SYSCALL_BASE+216) 1124 #define __NR_getdents64 (__NR_SYSCALL_BASE+217) 1125 #define __NR_pivot_root (__NR_SYSCALL_BASE+218) 1126 #define __NR_mincore (__NR_SYSCALL_BASE+219) 1127 #define __NR_madvise (__NR_SYSCALL_BASE+220) 1128 #define __NR_fcntl64 (__NR_SYSCALL_BASE+221) 1129 /* 222 for tux */ 1130 /* 223 is unused */ 1131 #define __NR_gettid (__NR_SYSCALL_BASE+224) 1132 #define __NR_readahead (__NR_SYSCALL_BASE+225) 1133 #define __NR_setxattr (__NR_SYSCALL_BASE+226) 1134 #define __NR_lsetxattr (__NR_SYSCALL_BASE+227) 1135 #define __NR_fsetxattr (__NR_SYSCALL_BASE+228) 1136 #define __NR_getxattr (__NR_SYSCALL_BASE+229) 1137 #define __NR_lgetxattr (__NR_SYSCALL_BASE+230) 1138 #define __NR_fgetxattr (__NR_SYSCALL_BASE+231) 1139 #define __NR_listxattr (__NR_SYSCALL_BASE+232) 1140 #define __NR_llistxattr (__NR_SYSCALL_BASE+233) 1141 #define __NR_flistxattr (__NR_SYSCALL_BASE+234) 1142 #define __NR_removexattr (__NR_SYSCALL_BASE+235) 1143 #define __NR_lremovexattr (__NR_SYSCALL_BASE+236) 1144 #define __NR_fremovexattr (__NR_SYSCALL_BASE+237) 1145 #define __NR_tkill (__NR_SYSCALL_BASE+238) 1146 #define __NR_sendfile64 (__NR_SYSCALL_BASE+239) 1147 #define __NR_futex (__NR_SYSCALL_BASE+240) 1148 #define __NR_sched_setaffinity (__NR_SYSCALL_BASE+241) 1149 #define __NR_sched_getaffinity (__NR_SYSCALL_BASE+242) 1150 #define __NR_io_setup (__NR_SYSCALL_BASE+243) 1151 #define __NR_io_destroy (__NR_SYSCALL_BASE+244) 1152 #define __NR_io_getevents (__NR_SYSCALL_BASE+245) 1153 #define __NR_io_submit (__NR_SYSCALL_BASE+246) 1154 #define __NR_io_cancel (__NR_SYSCALL_BASE+247) 1155 #define __NR_exit_group (__NR_SYSCALL_BASE+248) 1156 #define __NR_lookup_dcookie (__NR_SYSCALL_BASE+249) 1157 #define __NR_epoll_create (__NR_SYSCALL_BASE+250) 1158 #define __NR_epoll_ctl (__NR_SYSCALL_BASE+251) 1159 #define __NR_epoll_wait (__NR_SYSCALL_BASE+252) 1160 #define __NR_remap_file_pages (__NR_SYSCALL_BASE+253) 1161 /* 254 for set_thread_area */ 1162 /* 255 for get_thread_area */ 1163 /* 256 for set_tid_address */ 1164 #define __NR_timer_create (__NR_SYSCALL_BASE+257) 1165 #define __NR_timer_settime (__NR_SYSCALL_BASE+258) 1166 #define __NR_timer_gettime (__NR_SYSCALL_BASE+259) 1167 #define __NR_timer_getoverrun (__NR_SYSCALL_BASE+260) 1168 #define __NR_timer_delete (__NR_SYSCALL_BASE+261) 1169 #define __NR_clock_settime (__NR_SYSCALL_BASE+262) 1170 #define __NR_clock_gettime (__NR_SYSCALL_BASE+263) 1171 #define __NR_clock_getres (__NR_SYSCALL_BASE+264) 1172 #define __NR_clock_nanosleep (__NR_SYSCALL_BASE+265) 1173 #define __NR_statfs64 (__NR_SYSCALL_BASE+266) 1174 #define __NR_fstatfs64 (__NR_SYSCALL_BASE+267) 1175 #define __NR_tgkill (__NR_SYSCALL_BASE+268) 1176 #define __NR_utimes (__NR_SYSCALL_BASE+269) 1177 #define __NR_fadvise64_64 (__NR_SYSCALL_BASE+270) 1178 #define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271) 1179 #define __NR_pciconfig_read (__NR_SYSCALL_BASE+272) 1180 #define __NR_pciconfig_write (__NR_SYSCALL_BASE+273) 1181 1182 #endif /* __VKI_UNISTD_ARM_LINUX_H */ 1183 1184