target_syscall.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * PPC emulation for qemu: syscall definitions.
  3. *
  4. * Copyright (c) 2003 Jocelyn Mayer
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef PPC_TARGET_SYSCALL_H
  20. #define PPC_TARGET_SYSCALL_H
  21. /* XXX: ABSOLUTELY BUGGY:
  22. * for now, this is quite just a cut-and-paste from i386 target...
  23. */
  24. /* default linux values for the selectors */
  25. #define __USER_DS (1)
  26. struct target_pt_regs {
  27. abi_ulong gpr[32];
  28. abi_ulong nip;
  29. abi_ulong msr;
  30. abi_ulong orig_gpr3; /* Used for restarting system calls */
  31. abi_ulong ctr;
  32. abi_ulong link;
  33. abi_ulong xer;
  34. abi_ulong ccr;
  35. #if defined(TARGET_PPC64)
  36. abi_ulong softe;
  37. #else
  38. abi_ulong mq; /* 601 only (not used at present) */
  39. #endif
  40. /* Used on APUS to hold IPL value. */
  41. abi_ulong trap; /* Reason for being here */
  42. abi_ulong dar; /* Fault registers */
  43. abi_ulong dsisr;
  44. abi_ulong result; /* Result of a system call */
  45. };
  46. /* ioctls */
  47. struct target_revectored_struct {
  48. abi_ulong __map[8]; /* 256 bits */
  49. };
  50. /*
  51. * flags masks
  52. */
  53. #if defined(TARGET_PPC64)
  54. #if TARGET_BIG_ENDIAN
  55. #define UNAME_MACHINE "ppc64"
  56. #else
  57. #define UNAME_MACHINE "ppc64le"
  58. #endif
  59. #else
  60. #define UNAME_MACHINE "ppc"
  61. #endif
  62. #define UNAME_MINIMUM_RELEASE "2.6.32"
  63. #define TARGET_CLONE_BACKWARDS
  64. #define TARGET_MCL_CURRENT 0x2000
  65. #define TARGET_MCL_FUTURE 0x4000
  66. #define TARGET_MCL_ONFAULT 0x8000
  67. #define TARGET_WANT_NI_OLD_SELECT
  68. #endif /* PPC_TARGET_SYSCALL_H */