00001 /* 00002 * PPC emulation for qemu: syscall definitions. 00003 * 00004 * Copyright (c) 2003 Jocelyn Mayer 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA 00019 */ 00020 00021 /* XXX: ABSOLUTELY BUGGY: 00022 * for now, this is quite just a cut-and-paste from i386 target... 00023 */ 00024 00025 /* default linux values for the selectors */ 00026 #define __USER_DS (1) 00027 00028 struct target_pt_regs { 00029 abi_ulong gpr[32]; 00030 abi_ulong nip; 00031 abi_ulong msr; 00032 abi_ulong orig_gpr3; /* Used for restarting system calls */ 00033 abi_ulong ctr; 00034 abi_ulong link; 00035 abi_ulong xer; 00036 abi_ulong ccr; 00037 #if defined(TARGET_PPC64) && !defined(TARGET_ABI32) 00038 abi_ulong softe; 00039 #else 00040 abi_ulong mq; /* 601 only (not used at present) */ 00041 #endif 00042 /* Used on APUS to hold IPL value. */ 00043 abi_ulong trap; /* Reason for being here */ 00044 abi_ulong dar; /* Fault registers */ 00045 abi_ulong dsisr; 00046 abi_ulong result; /* Result of a system call */ 00047 }; 00048 00049 /* ioctls */ 00050 struct target_revectored_struct { 00051 abi_ulong __map[8]; /* 256 bits */ 00052 }; 00053 00054 /* 00055 * flags masks 00056 */ 00057 00058 #if defined(TARGET_PPC64) && !defined(TARGET_ABI32) 00059 #define UNAME_MACHINE "ppc64" 00060 #else 00061 #define UNAME_MACHINE "ppc" 00062 #endif