vki-ppc64-linux.h revision 28d2e641964eb9342ff012e2314e22b2094606c0
12c48c7b0a453d32375a4df17e153011b797ef28csewardj 22c48c7b0a453d32375a4df17e153011b797ef28csewardj/*--------------------------------------------------------------------*/ 342c8355fc918c5af6182559e93f7402311530e77njn/*--- PPC64/Linux-specific kernel interface. vki-ppc64-linux.h ---*/ 42c48c7b0a453d32375a4df17e153011b797ef28csewardj/*--------------------------------------------------------------------*/ 52c48c7b0a453d32375a4df17e153011b797ef28csewardj 62c48c7b0a453d32375a4df17e153011b797ef28csewardj/* 72c48c7b0a453d32375a4df17e153011b797ef28csewardj This file is part of Valgrind, a dynamic binary instrumentation 82c48c7b0a453d32375a4df17e153011b797ef28csewardj framework. 92c48c7b0a453d32375a4df17e153011b797ef28csewardj 102c48c7b0a453d32375a4df17e153011b797ef28csewardj Copyright (C) 2005 Julian Seward 112c48c7b0a453d32375a4df17e153011b797ef28csewardj jseward@acm.org 122c48c7b0a453d32375a4df17e153011b797ef28csewardj 132c48c7b0a453d32375a4df17e153011b797ef28csewardj This program is free software; you can redistribute it and/or 142c48c7b0a453d32375a4df17e153011b797ef28csewardj modify it under the terms of the GNU General Public License as 152c48c7b0a453d32375a4df17e153011b797ef28csewardj published by the Free Software Foundation; either version 2 of the 162c48c7b0a453d32375a4df17e153011b797ef28csewardj License, or (at your option) any later version. 172c48c7b0a453d32375a4df17e153011b797ef28csewardj 182c48c7b0a453d32375a4df17e153011b797ef28csewardj This program is distributed in the hope that it will be useful, but 192c48c7b0a453d32375a4df17e153011b797ef28csewardj WITHOUT ANY WARRANTY; without even the implied warranty of 202c48c7b0a453d32375a4df17e153011b797ef28csewardj MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 212c48c7b0a453d32375a4df17e153011b797ef28csewardj General Public License for more details. 222c48c7b0a453d32375a4df17e153011b797ef28csewardj 232c48c7b0a453d32375a4df17e153011b797ef28csewardj You should have received a copy of the GNU General Public License 242c48c7b0a453d32375a4df17e153011b797ef28csewardj along with this program; if not, write to the Free Software 252c48c7b0a453d32375a4df17e153011b797ef28csewardj Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 262c48c7b0a453d32375a4df17e153011b797ef28csewardj 02111-1307, USA. 272c48c7b0a453d32375a4df17e153011b797ef28csewardj 282c48c7b0a453d32375a4df17e153011b797ef28csewardj The GNU General Public License is contained in the file COPYING. 292c48c7b0a453d32375a4df17e153011b797ef28csewardj*/ 302c48c7b0a453d32375a4df17e153011b797ef28csewardj 312c48c7b0a453d32375a4df17e153011b797ef28csewardj#ifndef __PPC64_LINUX_VKI_ARCH_H 322c48c7b0a453d32375a4df17e153011b797ef28csewardj#define __PPC64_LINUX_VKI_ARCH_H 332c48c7b0a453d32375a4df17e153011b797ef28csewardj 342c48c7b0a453d32375a4df17e153011b797ef28csewardj// ppc64 is big-endian. 352c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_BIG_ENDIAN 1 362c48c7b0a453d32375a4df17e153011b797ef28csewardj 372c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 382c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/types.h 392c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 402c48c7b0a453d32375a4df17e153011b797ef28csewardj 412c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef __signed__ char __vki_s8; 422c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef unsigned char __vki_u8; 432c48c7b0a453d32375a4df17e153011b797ef28csewardj 442c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef __signed__ short __vki_s16; 452c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef unsigned short __vki_u16; 462c48c7b0a453d32375a4df17e153011b797ef28csewardj 472c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef __signed__ int __vki_s32; 482c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef unsigned int __vki_u32; 492c48c7b0a453d32375a4df17e153011b797ef28csewardj 502c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef __signed__ long __vki_s64; 512c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef unsigned long __vki_u64; 522c48c7b0a453d32375a4df17e153011b797ef28csewardj 532c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef struct { 542c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_u32 u[4]; 552c48c7b0a453d32375a4df17e153011b797ef28csewardj} __attribute((aligned(16))) __vki_vector128; 562c48c7b0a453d32375a4df17e153011b797ef28csewardj 572c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef unsigned short vki_u16; 582c48c7b0a453d32375a4df17e153011b797ef28csewardj 592c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef unsigned int vki_u32; 602c48c7b0a453d32375a4df17e153011b797ef28csewardj 612c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 622c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/page.h 632c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 642c48c7b0a453d32375a4df17e153011b797ef28csewardj 652c48c7b0a453d32375a4df17e153011b797ef28csewardj/* PAGE_SHIFT determines the page size */ 662c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PAGE_SHIFT 12 672c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT) 682c48c7b0a453d32375a4df17e153011b797ef28csewardj 692c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 702c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/signal.h 712c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 722c48c7b0a453d32375a4df17e153011b797ef28csewardj 732c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_MINSIGSTKSZ 2048 742c48c7b0a453d32375a4df17e153011b797ef28csewardj 752c48c7b0a453d32375a4df17e153011b797ef28csewardj/* Next 9 non-blank lines asm-generic/signal.h */ 762c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIG_BLOCK 0 /* for blocking signals */ 772c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIG_UNBLOCK 1 /* for unblocking signals */ 782c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIG_SETMASK 2 /* for setting the signal mask */ 792c48c7b0a453d32375a4df17e153011b797ef28csewardj 802c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef void __vki_signalfn_t(int); 812c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef __vki_signalfn_t __user *__vki_sighandler_t; 822c48c7b0a453d32375a4df17e153011b797ef28csewardj 832c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef void __vki_restorefn_t(void); 842c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef __vki_restorefn_t __user *__vki_sigrestore_t; 852c48c7b0a453d32375a4df17e153011b797ef28csewardj 862c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIG_DFL ((__vki_sighandler_t)0) /* default signal handling */ 872c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIG_IGN ((__vki_sighandler_t)1) /* ignore signal */ 882c48c7b0a453d32375a4df17e153011b797ef28csewardj 892c48c7b0a453d32375a4df17e153011b797ef28csewardj/* Back in asm-ppc64/signal.h */ 902c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_NSIG 64 912c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_NSIG_BPW 64 922c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_NSIG_WORDS (_VKI_NSIG / _VKI_NSIG_BPW) 932c48c7b0a453d32375a4df17e153011b797ef28csewardj 942c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef unsigned long vki_old_sigset_t; /* at least 32 bits */ 952c48c7b0a453d32375a4df17e153011b797ef28csewardj 962c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef struct { 972c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long sig[_VKI_NSIG_WORDS]; 982c48c7b0a453d32375a4df17e153011b797ef28csewardj} vki_sigset_t; 992c48c7b0a453d32375a4df17e153011b797ef28csewardj 1002c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGHUP 1 1012c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGINT 2 1022c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGQUIT 3 1032c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGILL 4 1042c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGTRAP 5 1052c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGABRT 6 1062c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGIOT 6 1072c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGBUS 7 1082c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGFPE 8 1092c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGKILL 9 1102c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGUSR1 10 1112c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGSEGV 11 1122c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGUSR2 12 1132c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGPIPE 13 1142c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGALRM 14 1152c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGTERM 15 1162c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGSTKFLT 16 1172c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGCHLD 17 1182c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGCONT 18 1192c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGSTOP 19 1202c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGTSTP 20 1212c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGTTIN 21 1222c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGTTOU 22 1232c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGURG 23 1242c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGXCPU 24 1252c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGXFSZ 25 1262c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGVTALRM 26 1272c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGPROF 27 1282c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGWINCH 28 1292c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGIO 29 1302c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGPOLL VKI_SIGIO 1312c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGPWR 30 1322c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGSYS 31 1332c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGUNUSED 31 1342c48c7b0a453d32375a4df17e153011b797ef28csewardj 1352c48c7b0a453d32375a4df17e153011b797ef28csewardj/* These should not be considered constants from userland. */ 1362c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGRTMIN 32 1372c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIGRTMAX _VKI_NSIG 1382c48c7b0a453d32375a4df17e153011b797ef28csewardj 1392c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SA_NOCLDSTOP 0x00000001u 1402c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SA_NOCLDWAIT 0x00000002u 1412c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SA_SIGINFO 0x00000004u 1422c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SA_ONSTACK 0x08000000u 1432c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SA_RESTART 0x10000000u 1442c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SA_NODEFER 0x40000000u 1452c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SA_RESETHAND 0x80000000u 1462c48c7b0a453d32375a4df17e153011b797ef28csewardj 1472c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SA_NOMASK VKI_SA_NODEFER 1482c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SA_ONESHOT VKI_SA_RESETHAND 1492c48c7b0a453d32375a4df17e153011b797ef28csewardj//#define VKI_SA_INTERRUPT 0x20000000u /* dummy -- ignored */ 1502c48c7b0a453d32375a4df17e153011b797ef28csewardj 1512c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SA_RESTORER 0x04000000u 1522c48c7b0a453d32375a4df17e153011b797ef28csewardj 1532c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SS_ONSTACK 1 1542c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SS_DISABLE 2 1552c48c7b0a453d32375a4df17e153011b797ef28csewardj 1562c48c7b0a453d32375a4df17e153011b797ef28csewardj// See comments on corresponding decls in vki-x86-linux.h re ksa_handler 1572c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_old_sigaction { 1582c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_sighandler_t ksa_handler; 1592c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_old_sigset_t sa_mask; 1602c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long sa_flags; 1612c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_sigrestore_t sa_restorer; 1622c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 1632c48c7b0a453d32375a4df17e153011b797ef28csewardj 1642c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_sigaction { 1652c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_sighandler_t ksa_handler; 1662c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long sa_flags; 1672c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_sigrestore_t sa_restorer; 1682c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_sigset_t sa_mask; /* mask last for extensibility */ 1692c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 1702c48c7b0a453d32375a4df17e153011b797ef28csewardj 1712c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef struct vki_sigaltstack { 1722c48c7b0a453d32375a4df17e153011b797ef28csewardj void __user *ss_sp; 1732c48c7b0a453d32375a4df17e153011b797ef28csewardj int ss_flags; 1742c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_size_t ss_size; 1752c48c7b0a453d32375a4df17e153011b797ef28csewardj} vki_stack_t; 1762c48c7b0a453d32375a4df17e153011b797ef28csewardj 1772c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 1782c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/ptrace.h 1792c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 1802c48c7b0a453d32375a4df17e153011b797ef28csewardj 1812c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PPC_REG unsigned long 1822c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_pt_regs { 1832c48c7b0a453d32375a4df17e153011b797ef28csewardj VKI_PPC_REG gpr[32]; 1842c48c7b0a453d32375a4df17e153011b797ef28csewardj VKI_PPC_REG nip; 1852c48c7b0a453d32375a4df17e153011b797ef28csewardj VKI_PPC_REG msr; 1862c48c7b0a453d32375a4df17e153011b797ef28csewardj VKI_PPC_REG orig_gpr3; /* Used for restarting system calls */ 1872c48c7b0a453d32375a4df17e153011b797ef28csewardj VKI_PPC_REG ctr; 1882c48c7b0a453d32375a4df17e153011b797ef28csewardj VKI_PPC_REG link; 1892c48c7b0a453d32375a4df17e153011b797ef28csewardj VKI_PPC_REG xer; 1902c48c7b0a453d32375a4df17e153011b797ef28csewardj VKI_PPC_REG ccr; 1912c48c7b0a453d32375a4df17e153011b797ef28csewardj VKI_PPC_REG softe; /* Soft enabled/disabled */ 1922c48c7b0a453d32375a4df17e153011b797ef28csewardj VKI_PPC_REG trap; /* Reason for being here */ 1932c48c7b0a453d32375a4df17e153011b797ef28csewardj VKI_PPC_REG dar; /* Fault registers */ 1942c48c7b0a453d32375a4df17e153011b797ef28csewardj VKI_PPC_REG dsisr; 1952c48c7b0a453d32375a4df17e153011b797ef28csewardj VKI_PPC_REG result; /* Result of a system call */ 1962c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 1972c48c7b0a453d32375a4df17e153011b797ef28csewardj 1982c48c7b0a453d32375a4df17e153011b797ef28csewardj/* Kludge? I don't know where this came from or if it is right. */ 1992c48c7b0a453d32375a4df17e153011b797ef28csewardj#define vki_user_regs_struct vki_pt_regs 2002c48c7b0a453d32375a4df17e153011b797ef28csewardj 2012c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R0 0 2022c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R1 1 2032c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R2 2 2042c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R3 3 2052c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R4 4 2062c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R5 5 2072c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R6 6 2082c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R7 7 2092c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R8 8 2102c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R9 9 2112c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R10 10 2122c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R11 11 2132c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R12 12 2142c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R13 13 2152c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R14 14 2162c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R15 15 2172c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R16 16 2182c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R17 17 2192c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R18 18 2202c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R19 19 2212c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R20 20 2222c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R21 21 2232c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R22 22 2242c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R23 23 2252c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R24 24 2262c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R25 25 2272c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R26 26 2282c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R27 27 2292c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R28 28 2302c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R29 29 2312c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R30 30 2322c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_R31 31 2332c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_NIP 32 2342c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_MSR 33 2352c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_ORIG_R3 34 2362c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_CTR 35 2372c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_LNK 36 2382c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_XER 37 2392c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_CCR 38 2402c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_SOFTE 39 2412c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PT_RESULT 43 2422c48c7b0a453d32375a4df17e153011b797ef28csewardj 2432c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 2442c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/elf.h 2452c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 2462c48c7b0a453d32375a4df17e153011b797ef28csewardj 2472c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_ELF_NGREG 48 /* includes nip, msr, lr, etc. */ 2482c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_ELF_NFPREG 33 /* includes fpscr */ 2492c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_ELF_NVRREG 34 /* includes vscr & vrsave in split vectors */ 2502c48c7b0a453d32375a4df17e153011b797ef28csewardj 2512c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef unsigned long vki_elf_greg_t64; 2522c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef vki_elf_greg_t64 vki_elf_gregset_t64[VKI_ELF_NGREG]; 2532c48c7b0a453d32375a4df17e153011b797ef28csewardj 2542c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef vki_elf_gregset_t64 vki_elf_gregset_t; 2552c48c7b0a453d32375a4df17e153011b797ef28csewardj 2562c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef double vki_elf_fpreg_t; 2572c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef vki_elf_fpreg_t vki_elf_fpregset_t[VKI_ELF_NFPREG]; 2582c48c7b0a453d32375a4df17e153011b797ef28csewardj 2592c48c7b0a453d32375a4df17e153011b797ef28csewardj/* Altivec registers */ 2602c48c7b0a453d32375a4df17e153011b797ef28csewardj/* 2612c48c7b0a453d32375a4df17e153011b797ef28csewardj * The entries with indexes 0-31 contain the corresponding vector registers. 2622c48c7b0a453d32375a4df17e153011b797ef28csewardj * The entry with index 32 contains the vscr as the last word (offset 12) 2632c48c7b0a453d32375a4df17e153011b797ef28csewardj * within the quadword. This allows the vscr to be stored as either a 2642c48c7b0a453d32375a4df17e153011b797ef28csewardj * quadword (since it must be copied via a vector register to/from storage) 2652c48c7b0a453d32375a4df17e153011b797ef28csewardj * or as a word. The entry with index 33 contains the vrsave as the first 2662c48c7b0a453d32375a4df17e153011b797ef28csewardj * word (offset 0) within the quadword. 2672c48c7b0a453d32375a4df17e153011b797ef28csewardj * 2682c48c7b0a453d32375a4df17e153011b797ef28csewardj * This definition of the VMX state is compatible with the current PPC32 2692c48c7b0a453d32375a4df17e153011b797ef28csewardj * ptrace interface. This allows signal handling and ptrace to use the same 2702c48c7b0a453d32375a4df17e153011b797ef28csewardj * structures. This also simplifies the implementation of a bi-arch 2712c48c7b0a453d32375a4df17e153011b797ef28csewardj * (combined (32- and 64-bit) gdb. 2722c48c7b0a453d32375a4df17e153011b797ef28csewardj * 2732c48c7b0a453d32375a4df17e153011b797ef28csewardj * Note that it's _not_ compatible with 32 bits ucontext which stuffs the 2742c48c7b0a453d32375a4df17e153011b797ef28csewardj * vrsave along with vscr and so only uses 33 vectors for the register set 2752c48c7b0a453d32375a4df17e153011b797ef28csewardj */ 2762c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef __vki_vector128 vki_elf_vrreg_t; 2772c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef vki_elf_vrreg_t vki_elf_vrregset_t[VKI_ELF_NVRREG]; 2782c48c7b0a453d32375a4df17e153011b797ef28csewardj 2792c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 2802c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/sigcontext.h 2812c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 2822c48c7b0a453d32375a4df17e153011b797ef28csewardj 2832c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_sigcontext { 2842c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long _unused[4]; 2852c48c7b0a453d32375a4df17e153011b797ef28csewardj int signal; 2862c48c7b0a453d32375a4df17e153011b797ef28csewardj int _pad0; 2872c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long handler; 2882c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long oldmask; 2892c48c7b0a453d32375a4df17e153011b797ef28csewardj struct vki_pt_regs __user *regs; 2902c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_elf_gregset_t gp_regs; 2912c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_elf_fpregset_t fp_regs; 2922c48c7b0a453d32375a4df17e153011b797ef28csewardj /* 2932c48c7b0a453d32375a4df17e153011b797ef28csewardj * To maintain compatibility with current implementations the sigcontext is 2942c48c7b0a453d32375a4df17e153011b797ef28csewardj * extended by appending a pointer (v_regs) to a quadword type (elf_vrreg_t) 2952c48c7b0a453d32375a4df17e153011b797ef28csewardj * followed by an unstructured (vmx_reserve) field of 69 doublewords. This 2962c48c7b0a453d32375a4df17e153011b797ef28csewardj * allows the array of vector registers to be quadword aligned independent of 2972c48c7b0a453d32375a4df17e153011b797ef28csewardj * the alignment of the containing sigcontext or ucontext. It is the 2982c48c7b0a453d32375a4df17e153011b797ef28csewardj * responsibility of the code setting the sigcontext to set this pointer to 2992c48c7b0a453d32375a4df17e153011b797ef28csewardj * either NULL (if this processor does not support the VMX feature) or the 3002c48c7b0a453d32375a4df17e153011b797ef28csewardj * address of the first quadword within the allocated (vmx_reserve) area. 3012c48c7b0a453d32375a4df17e153011b797ef28csewardj * 3022c48c7b0a453d32375a4df17e153011b797ef28csewardj * The pointer (v_regs) of vector type (elf_vrreg_t) is type compatible with 3032c48c7b0a453d32375a4df17e153011b797ef28csewardj * an array of 34 quadword entries (elf_vrregset_t). The entries with 3042c48c7b0a453d32375a4df17e153011b797ef28csewardj * indexes 0-31 contain the corresponding vector registers. The entry with 3052c48c7b0a453d32375a4df17e153011b797ef28csewardj * index 32 contains the vscr as the last word (offset 12) within the 3062c48c7b0a453d32375a4df17e153011b797ef28csewardj * quadword. This allows the vscr to be stored as either a quadword (since 3072c48c7b0a453d32375a4df17e153011b797ef28csewardj * it must be copied via a vector register to/from storage) or as a word. 3082c48c7b0a453d32375a4df17e153011b797ef28csewardj * The entry with index 33 contains the vrsave as the first word (offset 0) 3092c48c7b0a453d32375a4df17e153011b797ef28csewardj * within the quadword. 3102c48c7b0a453d32375a4df17e153011b797ef28csewardj */ 3112c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_elf_vrreg_t __user *v_regs; 3122c48c7b0a453d32375a4df17e153011b797ef28csewardj long vmx_reserve[VKI_ELF_NVRREG+VKI_ELF_NVRREG+1]; 3132c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 3142c48c7b0a453d32375a4df17e153011b797ef28csewardj 3152c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 3162c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/mman.h 3172c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 3182c48c7b0a453d32375a4df17e153011b797ef28csewardj 3192c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PROT_NONE 0x0 /* page can not be accessed */ 3202c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PROT_READ 0x1 /* page can be read */ 3212c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PROT_WRITE 0x2 /* page can be written */ 3222c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PROT_EXEC 0x4 /* page can be executed */ 3232c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend 3242c48c7b0a453d32375a4df17e153011b797ef28csewardj change to start of 3252c48c7b0a453d32375a4df17e153011b797ef28csewardj growsdown vma */ 3262c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_PROT_GROWSUP 0x02000000 /* mprotect flag: extend 3272c48c7b0a453d32375a4df17e153011b797ef28csewardj change to end of 3282c48c7b0a453d32375a4df17e153011b797ef28csewardj growsup vma */ 3292c48c7b0a453d32375a4df17e153011b797ef28csewardj 3302c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_MAP_SHARED 0x01 /* Share changes */ 3312c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_MAP_PRIVATE 0x02 /* Changes are private */ 3322c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_MAP_FIXED 0x10 /* Interpret addr exactly */ 3332c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_MAP_ANONYMOUS 0x20 /* don't use a file */ 3342c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_MAP_NORESERVE 0x40 /* don't reserve swap pages */ 3352c48c7b0a453d32375a4df17e153011b797ef28csewardj 3362c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 3372c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/fcntl.h 3382c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 3392c48c7b0a453d32375a4df17e153011b797ef28csewardj 3402c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_O_RDONLY 00 3412c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_O_WRONLY 01 3422c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_O_RDWR 02 3432c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_O_CREAT 0100 /* not fcntl */ 3442c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_O_EXCL 0200 /* not fcntl */ 3452c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_O_TRUNC 01000 /* not fcntl */ 3462c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_O_APPEND 02000 3472c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_O_NONBLOCK 04000 34828d2e641964eb9342ff012e2314e22b2094606c0njn#define VKI_O_LARGEFILE 0200000 3492c48c7b0a453d32375a4df17e153011b797ef28csewardj 3502c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_F_DUPFD 0 /* dup */ 3512c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_F_GETFD 1 /* get close_on_exec */ 3522c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_F_SETFD 2 /* set/clear close_on_exec */ 3532c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_F_GETFL 3 /* get file->f_flags */ 3542c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_F_SETFL 4 /* set file->f_flags */ 3552c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_F_GETLK 5 3562c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_F_SETLK 6 3572c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_F_SETLKW 7 3582c48c7b0a453d32375a4df17e153011b797ef28csewardj 3592c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_F_SETOWN 8 /* for sockets. */ 3602c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_F_GETOWN 9 /* for sockets. */ 3612c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_F_SETSIG 10 /* for sockets. */ 3622c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_F_GETSIG 11 /* for sockets. */ 3632c48c7b0a453d32375a4df17e153011b797ef28csewardj 3642c48c7b0a453d32375a4df17e153011b797ef28csewardj/* for F_[GET|SET]FL */ 3652c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_FD_CLOEXEC 1 /* actually anything with low bit set goes */ 3662c48c7b0a453d32375a4df17e153011b797ef28csewardj 3672c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_F_LINUX_SPECIFIC_BASE 1024 3682c48c7b0a453d32375a4df17e153011b797ef28csewardj 3692c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 3702c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/resource.h 3712c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 3722c48c7b0a453d32375a4df17e153011b797ef28csewardj 3732c48c7b0a453d32375a4df17e153011b797ef28csewardj// which just does #include <asm-generic/resource.h> 3742c48c7b0a453d32375a4df17e153011b797ef28csewardj 3752c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_RLIMIT_DATA 2 /* max data size */ 3762c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_RLIMIT_STACK 3 /* max stack size */ 3772c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_RLIMIT_CORE 4 /* max core file size */ 3782c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_RLIMIT_NOFILE 7 /* max number of open files */ 3792c48c7b0a453d32375a4df17e153011b797ef28csewardj 3802c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 3812c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/socket.h 3822c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 3832c48c7b0a453d32375a4df17e153011b797ef28csewardj 3842c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SOL_SOCKET 1 3852c48c7b0a453d32375a4df17e153011b797ef28csewardj 3862c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SO_TYPE 3 3872c48c7b0a453d32375a4df17e153011b797ef28csewardj 3882c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 3892c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/sockios.h 3902c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 3912c48c7b0a453d32375a4df17e153011b797ef28csewardj 3922c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIOCSPGRP 0x8902 3932c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIOCGPGRP 0x8904 3942c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SIOCGSTAMP 0x8906 /* Get stamp */ 3952c48c7b0a453d32375a4df17e153011b797ef28csewardj 3962c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 3972c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/stat.h 3982c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 3992c48c7b0a453d32375a4df17e153011b797ef28csewardj 4002c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_stat { 4012c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long st_dev; 4022c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long st_ino; 4032108204443f84bfa733397be519bdcf6810c5127cerion unsigned long st_nlink; 4042108204443f84bfa733397be519bdcf6810c5127cerion unsigned int st_mode; 4052108204443f84bfa733397be519bdcf6810c5127cerion unsigned int st_uid; 4062108204443f84bfa733397be519bdcf6810c5127cerion unsigned int st_gid; 4072c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long st_rdev; 4082c48c7b0a453d32375a4df17e153011b797ef28csewardj long st_size; 4092c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long st_blksize; 4102c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long st_blocks; 4112c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long st_atime; 4122c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long st_atime_nsec; 4132c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long st_mtime; 4142c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long st_mtime_nsec; 4152c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long st_ctime; 4162c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long st_ctime_nsec; 4172c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long __unused4; 4182c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long __unused5; 4192c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long __unused6; 4202c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 4212c48c7b0a453d32375a4df17e153011b797ef28csewardj 4222c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_STAT_HAVE_NSEC 1 4232c48c7b0a453d32375a4df17e153011b797ef28csewardj 4242c48c7b0a453d32375a4df17e153011b797ef28csewardj/* This matches struct stat64 in glibc2.1. Only used for 32 bit. */ 4252c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_stat64 { 4262c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long st_dev; /* Device. */ 4272c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long st_ino; /* File serial number. */ 4282c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned int st_mode; /* File mode. */ 4292c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned int st_nlink; /* Link count. */ 4302c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned int st_uid; /* User ID of the file's owner. */ 4312c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned int st_gid; /* Group ID of the file's group. */ 4322c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long st_rdev; /* Device number, if device. */ 4332c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned short __pad2; 4342c48c7b0a453d32375a4df17e153011b797ef28csewardj long st_size; /* Size of file, in bytes. */ 4352c48c7b0a453d32375a4df17e153011b797ef28csewardj int st_blksize; /* Optimal block size for I/O. */ 4362c48c7b0a453d32375a4df17e153011b797ef28csewardj 4372c48c7b0a453d32375a4df17e153011b797ef28csewardj long st_blocks; /* Number 512-byte blocks allocated. */ 4382c48c7b0a453d32375a4df17e153011b797ef28csewardj int st_atime; /* Time of last access. */ 4392c48c7b0a453d32375a4df17e153011b797ef28csewardj int st_atime_nsec; 4402c48c7b0a453d32375a4df17e153011b797ef28csewardj int st_mtime; /* Time of last modification. */ 4412c48c7b0a453d32375a4df17e153011b797ef28csewardj int st_mtime_nsec; 4422c48c7b0a453d32375a4df17e153011b797ef28csewardj int st_ctime; /* Time of last status change. */ 4432c48c7b0a453d32375a4df17e153011b797ef28csewardj int st_ctime_nsec; 4442c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned int __unused4; 4452c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned int __unused5; 4462c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 4472c48c7b0a453d32375a4df17e153011b797ef28csewardj 4482c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 4492c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/statfs.h 4502c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 4512c48c7b0a453d32375a4df17e153011b797ef28csewardj 4522c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_statfs { 4532c48c7b0a453d32375a4df17e153011b797ef28csewardj long f_type; 4542c48c7b0a453d32375a4df17e153011b797ef28csewardj long f_bsize; 4552c48c7b0a453d32375a4df17e153011b797ef28csewardj long f_blocks; 4562c48c7b0a453d32375a4df17e153011b797ef28csewardj long f_bfree; 4572c48c7b0a453d32375a4df17e153011b797ef28csewardj long f_bavail; 4582c48c7b0a453d32375a4df17e153011b797ef28csewardj long f_files; 4592c48c7b0a453d32375a4df17e153011b797ef28csewardj long f_ffree; 4602c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_fsid_t f_fsid; 4612c48c7b0a453d32375a4df17e153011b797ef28csewardj long f_namelen; 4622c48c7b0a453d32375a4df17e153011b797ef28csewardj long f_frsize; 4632c48c7b0a453d32375a4df17e153011b797ef28csewardj long f_spare[5]; 4642c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 4652c48c7b0a453d32375a4df17e153011b797ef28csewardj 4662c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 4672c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/termios.h 4682c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 4692c48c7b0a453d32375a4df17e153011b797ef28csewardj 4702c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_winsize { 4712c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned short ws_row; 4722c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned short ws_col; 4732c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned short ws_xpixel; 4742c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned short ws_ypixel; 4752c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 4762c48c7b0a453d32375a4df17e153011b797ef28csewardj 4772c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_NCC 10 4782c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_termio { 4792c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned short c_iflag; /* input mode flags */ 4802c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned short c_oflag; /* output mode flags */ 4812c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned short c_cflag; /* control mode flags */ 4822c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned short c_lflag; /* local mode flags */ 4832c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned char c_line; /* line discipline */ 4842c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned char c_cc[VKI_NCC]; /* control characters */ 4852c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 4862c48c7b0a453d32375a4df17e153011b797ef28csewardj 4872c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 4882c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/termbits.h 4892c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 4902c48c7b0a453d32375a4df17e153011b797ef28csewardj 4912c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef unsigned char vki_cc_t; 4922c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef unsigned int vki_speed_t; 4932c48c7b0a453d32375a4df17e153011b797ef28csewardjtypedef unsigned int vki_tcflag_t; 4942c48c7b0a453d32375a4df17e153011b797ef28csewardj 4952c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_NCCS 19 4962c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_termios { 4972c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_tcflag_t c_iflag; /* input mode flags */ 4982c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_tcflag_t c_oflag; /* output mode flags */ 4992c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_tcflag_t c_cflag; /* control mode flags */ 5002c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_tcflag_t c_lflag; /* local mode flags */ 5012c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_cc_t c_cc[VKI_NCCS]; /* control characters */ 5022c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_cc_t c_line; /* line discipline (== c_cc[19]) */ 5032c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_speed_t c_ispeed; /* input speed */ 5042c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_speed_t c_ospeed; /* output speed */ 5052c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 5062c48c7b0a453d32375a4df17e153011b797ef28csewardj 5072c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 5082c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/ioctl.h 5092c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 5102c48c7b0a453d32375a4df17e153011b797ef28csewardj 5112c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_NRBITS 8 5122c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_TYPEBITS 8 5132c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_SIZEBITS 13 5142c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_DIRBITS 3 5152c48c7b0a453d32375a4df17e153011b797ef28csewardj 5162c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_NRMASK ((1 << _VKI_IOC_NRBITS)-1) 5172c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_TYPEMASK ((1 << _VKI_IOC_TYPEBITS)-1) 5182c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_SIZEMASK ((1 << _VKI_IOC_SIZEBITS)-1) 5192c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_DIRMASK ((1 << _VKI_IOC_DIRBITS)-1) 5202c48c7b0a453d32375a4df17e153011b797ef28csewardj 5212c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_NRSHIFT 0 5222c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_TYPESHIFT (_VKI_IOC_NRSHIFT+_VKI_IOC_NRBITS) 5232c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_SIZESHIFT (_VKI_IOC_TYPESHIFT+_VKI_IOC_TYPEBITS) 5242c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_DIRSHIFT (_VKI_IOC_SIZESHIFT+_VKI_IOC_SIZEBITS) 5252c48c7b0a453d32375a4df17e153011b797ef28csewardj 5262c48c7b0a453d32375a4df17e153011b797ef28csewardj/* 5272c48c7b0a453d32375a4df17e153011b797ef28csewardj * Direction bits _IOC_NONE could be 0, but OSF/1 gives it a bit. 5282c48c7b0a453d32375a4df17e153011b797ef28csewardj * And this turns out useful to catch old ioctl numbers in header 5292c48c7b0a453d32375a4df17e153011b797ef28csewardj * files for us. 5302c48c7b0a453d32375a4df17e153011b797ef28csewardj */ 5312c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_NONE 1U 5322c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_READ 2U 5332c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_WRITE 4U 5342c48c7b0a453d32375a4df17e153011b797ef28csewardj 5352c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC(dir,type,nr,size) \ 5362c48c7b0a453d32375a4df17e153011b797ef28csewardj (((dir) << _VKI_IOC_DIRSHIFT) | \ 5372c48c7b0a453d32375a4df17e153011b797ef28csewardj ((type) << _VKI_IOC_TYPESHIFT) | \ 5382c48c7b0a453d32375a4df17e153011b797ef28csewardj ((nr) << _VKI_IOC_NRSHIFT) | \ 5392c48c7b0a453d32375a4df17e153011b797ef28csewardj ((size) << _VKI_IOC_SIZESHIFT)) 5402c48c7b0a453d32375a4df17e153011b797ef28csewardj 5412c48c7b0a453d32375a4df17e153011b797ef28csewardj/* provoke compile error for invalid uses of size argument */ 5422c48c7b0a453d32375a4df17e153011b797ef28csewardjextern unsigned int __invalid_size_argument_for_IOC; 5432c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_TYPECHECK(t) \ 5442c48c7b0a453d32375a4df17e153011b797ef28csewardj ((sizeof(t) == sizeof(t[1]) && \ 5452c48c7b0a453d32375a4df17e153011b797ef28csewardj sizeof(t) < (1 << _VKI_IOC_SIZEBITS)) ? \ 5462c48c7b0a453d32375a4df17e153011b797ef28csewardj sizeof(t) : __invalid_size_argument_for_IOC) 5472c48c7b0a453d32375a4df17e153011b797ef28csewardj 5482c48c7b0a453d32375a4df17e153011b797ef28csewardj/* used to create numbers */ 5492c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IO(type,nr) _VKI_IOC(_VKI_IOC_NONE,(type),(nr),0) 5502c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOR(type,nr,size) _VKI_IOC(_VKI_IOC_READ,(type),(nr), \ 5512c48c7b0a453d32375a4df17e153011b797ef28csewardj (_VKI_IOC_TYPECHECK(size))) 5522c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOW(type,nr,size) _VKI_IOC(_VKI_IOC_WRITE,(type),(nr), \ 5532c48c7b0a453d32375a4df17e153011b797ef28csewardj (_VKI_IOC_TYPECHECK(size))) 5542c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOWR(type,nr,size) _VKI_IOC(_VKI_IOC_READ|_VKI_IOC_WRITE, \ 5552c48c7b0a453d32375a4df17e153011b797ef28csewardj (type),(nr),(_VKI_IOC_TYPECHECK(size))) 5562c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOR_BAD(type,nr,size) _VKI_IOC(_VKI_IOC_READ,(type),(nr), \ 5572c48c7b0a453d32375a4df17e153011b797ef28csewardj sizeof(size)) 5582c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOW_BAD(type,nr,size) _VKI_IOC(_VKI_IOC_WRITE,(type),(nr), \ 5592c48c7b0a453d32375a4df17e153011b797ef28csewardj sizeof(size)) 5602c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOWR_BAD(type,nr,size) _VKI_IOC(_VKI_IOC_READ|_VKI_IOC_WRITE, \ 5612c48c7b0a453d32375a4df17e153011b797ef28csewardj (type),(nr),sizeof(size)) 5622c48c7b0a453d32375a4df17e153011b797ef28csewardj 5632c48c7b0a453d32375a4df17e153011b797ef28csewardj/* used to decode them.. */ 5642c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_DIR(nr) (((nr) >> _VKI_IOC_DIRSHIFT) & _VKI_IOC_DIRMASK) 5652c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_TYPE(nr) (((nr) >> _VKI_IOC_TYPESHIFT) & _VKI_IOC_TYPEMASK) 5662c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_NR(nr) (((nr) >> _VKI_IOC_NRSHIFT) & _VKI_IOC_NRMASK) 5672c48c7b0a453d32375a4df17e153011b797ef28csewardj#define _VKI_IOC_SIZE(nr) (((nr) >> _VKI_IOC_SIZESHIFT) & _VKI_IOC_SIZEMASK) 5682c48c7b0a453d32375a4df17e153011b797ef28csewardj 5692c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 5702c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/ioctls.h 5712c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 5722c48c7b0a453d32375a4df17e153011b797ef28csewardj 5732c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TCGETS _VKI_IOR('t', 19, struct vki_termios) 5742c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TCSETS _VKI_IOW('t', 20, struct vki_termios) 5752c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TCSETSW _VKI_IOW('t', 21, struct vki_termios) 5762c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TCSETSF _VKI_IOW('t', 22, struct vki_termios) 5772c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TCGETA _VKI_IOR('t', 23, struct vki_termio) 5782c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TCSETA _VKI_IOW('t', 24, struct vki_termio) 5792c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TCSETAW _VKI_IOW('t', 25, struct vki_termio) 5802c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TCSETAF _VKI_IOW('t', 28, struct vki_termio) 5812c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TCSBRK _VKI_IO('t', 29) 5822c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TCXONC _VKI_IO('t', 30) 5832c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TCFLSH _VKI_IO('t', 31) 5842c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TIOCSCTTY 0x540E 5852c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TIOCGPGRP _VKI_IOR('t', 119, int) 5862c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TIOCSPGRP _VKI_IOW('t', 118, int) 5872c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TIOCOUTQ _VKI_IOR('t', 115, int) /* output queue size */ 5882c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TIOCGWINSZ _VKI_IOR('t', 104, struct vki_winsize) 5892c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TIOCSWINSZ _VKI_IOW('t', 103, struct vki_winsize) 5902c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TIOCMGET 0x5415 5912c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TIOCMBIS 0x5416 5922c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TIOCMBIC 0x5417 5932c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TIOCMSET 0x5418 5942c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_FIONREAD _VKI_IOR('f', 127, int) 5952c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TIOCLINUX 0x541C 5962c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_FIONBIO _VKI_IOW('f', 126, int) 5972c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ 5982c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TIOCGPTN _VKI_IOR('T',0x30, unsigned int) 5992c48c7b0a453d32375a4df17e153011b797ef28csewardj /* Get Pty Number (of pty-mux device) */ 6002c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_TIOCSPTLCK _VKI_IOW('T',0x31, int) /* Lock/unlock Pty */ 6012c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_FIOASYNC _VKI_IOW('f', 125, int) 6025d2af674214d1f7b9abda9b178775c69dc4f7c7dtom#define VKI_TIOCSERGETLSR 0x5459 /* Get line status register */ 6035d2af674214d1f7b9abda9b178775c69dc4f7c7dtom#define VKI_TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ 6042c48c7b0a453d32375a4df17e153011b797ef28csewardj 6052c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 6062c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/poll.h 6072c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 6082c48c7b0a453d32375a4df17e153011b797ef28csewardj 6092c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_POLLIN 0x0001 6102c48c7b0a453d32375a4df17e153011b797ef28csewardj 6112c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_pollfd { 6122c48c7b0a453d32375a4df17e153011b797ef28csewardj int fd; 6132c48c7b0a453d32375a4df17e153011b797ef28csewardj short events; 6142c48c7b0a453d32375a4df17e153011b797ef28csewardj short revents; 6152c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 6162c48c7b0a453d32375a4df17e153011b797ef28csewardj 6172c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 6182c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/user.h 6192c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 6202c48c7b0a453d32375a4df17e153011b797ef28csewardj 6212c48c7b0a453d32375a4df17e153011b797ef28csewardj// Not sure what's needed from here 6222c48c7b0a453d32375a4df17e153011b797ef28csewardj 6232c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 6242c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/elf.h 6252c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 6262c48c7b0a453d32375a4df17e153011b797ef28csewardj 6272c48c7b0a453d32375a4df17e153011b797ef28csewardj// Not sure what's needed from here 6282c48c7b0a453d32375a4df17e153011b797ef28csewardj 6292c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 6302c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/ucontext.h 6312c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 6322c48c7b0a453d32375a4df17e153011b797ef28csewardj 6332c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_ucontext { 6342c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long uc_flags; 6352c48c7b0a453d32375a4df17e153011b797ef28csewardj struct vki_ucontext *uc_link; 6362c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_stack_t uc_stack; 6372c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_sigset_t uc_sigmask; 6382c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_sigset_t __unused[15]; /* Allow for uc_sigmask growth */ 6392c48c7b0a453d32375a4df17e153011b797ef28csewardj struct vki_sigcontext uc_mcontext; /* last for extensibility */ 6402c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 6412c48c7b0a453d32375a4df17e153011b797ef28csewardj 6422c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 6432c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/ipcbuf.h 6442c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 6452c48c7b0a453d32375a4df17e153011b797ef28csewardj 6462c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_ipc64_perm 6472c48c7b0a453d32375a4df17e153011b797ef28csewardj{ 6482c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_key_t key; 6492c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_uid_t uid; 6502c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_gid_t gid; 6512c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_uid_t cuid; 6522c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_gid_t cgid; 6532c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_mode_t mode; 6542c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned int seq; 6552c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned int __pad1; 6562c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long __unused1; 6572c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long __unused2; 6582c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 6592c48c7b0a453d32375a4df17e153011b797ef28csewardj 6602c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 6612c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/sembuf.h 6622c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 6632c48c7b0a453d32375a4df17e153011b797ef28csewardj 6642c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_semid64_ds { 6652c48c7b0a453d32375a4df17e153011b797ef28csewardj struct vki_ipc64_perm sem_perm; /* permissions .. see ipc.h */ 6662c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_time_t sem_otime; /* last semop time */ 6672c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_time_t sem_ctime; /* last change time */ 6682c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long sem_nsems; /* no. of semaphores in array */ 6692c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long __unused1; 6702c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long __unused2; 6712c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 6722c48c7b0a453d32375a4df17e153011b797ef28csewardj 6732c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 6742c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/msgbuf.h 6752c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 6762c48c7b0a453d32375a4df17e153011b797ef28csewardj 6772c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_msqid64_ds { 6782c48c7b0a453d32375a4df17e153011b797ef28csewardj struct vki_ipc64_perm msg_perm; 6792c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_time_t msg_stime; /* last msgsnd time */ 6802c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_time_t msg_rtime; /* last msgrcv time */ 6812c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_time_t msg_ctime; /* last change time */ 6822c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long msg_cbytes; /* current number of bytes on queue */ 6832c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long msg_qnum; /* number of messages in queue */ 6842c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long msg_qbytes; /* max number of bytes on queue */ 6852c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_pid_t msg_lspid; /* pid of last msgsnd */ 6862c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_pid_t msg_lrpid; /* last receive pid */ 6872c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long __unused1; 6882c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long __unused2; 6892c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 6902c48c7b0a453d32375a4df17e153011b797ef28csewardj 6912c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 6922c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/ipc.h 6932c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 6942c48c7b0a453d32375a4df17e153011b797ef28csewardj 6952c48c7b0a453d32375a4df17e153011b797ef28csewardj// this just does #include <asm-generic/ipc.h> 6962c48c7b0a453d32375a4df17e153011b797ef28csewardj 6972c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_ipc_kludge { 6982c48c7b0a453d32375a4df17e153011b797ef28csewardj struct vki_msgbuf __user *msgp; 6992c48c7b0a453d32375a4df17e153011b797ef28csewardj long msgtyp; 7002c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 7012c48c7b0a453d32375a4df17e153011b797ef28csewardj 7022c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SEMOP 1 7032c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SEMGET 2 7042c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SEMCTL 3 7052c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SEMTIMEDOP 4 7062c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_MSGSND 11 7072c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_MSGRCV 12 7082c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_MSGGET 13 7092c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_MSGCTL 14 7102c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SHMAT 21 7112c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SHMDT 22 7122c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SHMGET 23 7132c48c7b0a453d32375a4df17e153011b797ef28csewardj#define VKI_SHMCTL 24 7142c48c7b0a453d32375a4df17e153011b797ef28csewardj 7152c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 7162c48c7b0a453d32375a4df17e153011b797ef28csewardj// From linux-2.6.13/include/asm-ppc64/shmbuf.h 7172c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 7182c48c7b0a453d32375a4df17e153011b797ef28csewardj 7192c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_shmid64_ds { 7202c48c7b0a453d32375a4df17e153011b797ef28csewardj struct vki_ipc64_perm shm_perm; /* operation perms */ 7212c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_time_t shm_atime; /* last attach time */ 7222c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_time_t shm_dtime; /* last detach time */ 7232c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_time_t shm_ctime; /* last change time */ 7242c48c7b0a453d32375a4df17e153011b797ef28csewardj vki_size_t shm_segsz; /* size of segment (bytes) */ 7252c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_pid_t shm_cpid; /* pid of creator */ 7262c48c7b0a453d32375a4df17e153011b797ef28csewardj __vki_kernel_pid_t shm_lpid; /* pid of last operator */ 7272c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long shm_nattch; /* no. of current attaches */ 7282c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long __unused1; 7292c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long __unused2; 7302c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 7312c48c7b0a453d32375a4df17e153011b797ef28csewardj 7322c48c7b0a453d32375a4df17e153011b797ef28csewardjstruct vki_shminfo64 { 7332c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long shmmax; 7342c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long shmmin; 7352c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long shmmni; 7362c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long shmseg; 7372c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long shmall; 7382c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long __unused1; 7392c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long __unused2; 7402c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long __unused3; 7412c48c7b0a453d32375a4df17e153011b797ef28csewardj unsigned long __unused4; 7422c48c7b0a453d32375a4df17e153011b797ef28csewardj}; 7432c48c7b0a453d32375a4df17e153011b797ef28csewardj 7442c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 7452c48c7b0a453d32375a4df17e153011b797ef28csewardj// end 7462c48c7b0a453d32375a4df17e153011b797ef28csewardj//---------------------------------------------------------------------- 7472c48c7b0a453d32375a4df17e153011b797ef28csewardj 7482c48c7b0a453d32375a4df17e153011b797ef28csewardj#endif // __PPC64_LINUX_VKI_ARCH_H 7492c48c7b0a453d32375a4df17e153011b797ef28csewardj 7502c48c7b0a453d32375a4df17e153011b797ef28csewardj/*--------------------------------------------------------------------*/ 7512c48c7b0a453d32375a4df17e153011b797ef28csewardj/*--- end ---*/ 7522c48c7b0a453d32375a4df17e153011b797ef28csewardj/*--------------------------------------------------------------------*/ 753