target_syscall.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef SPARC_TARGET_SYSCALL_H
  2. #define SPARC_TARGET_SYSCALL_H
  3. #include "target_errno.h"
  4. struct target_pt_regs {
  5. abi_ulong psr;
  6. abi_ulong pc;
  7. abi_ulong npc;
  8. abi_ulong y;
  9. abi_ulong u_regs[16];
  10. };
  11. #define UNAME_MACHINE "sparc"
  12. #define UNAME_MINIMUM_RELEASE "2.6.32"
  13. /* SPARC kernels don't define this in their Kconfig, but they have the
  14. * same ABI as if they did, implemented by sparc-specific code which fishes
  15. * directly in the u_regs() struct for half the parameters in sparc_do_fork()
  16. * and copy_thread().
  17. */
  18. #define TARGET_CLONE_BACKWARDS
  19. #define TARGET_MINSIGSTKSZ 4096
  20. #define TARGET_MCL_CURRENT 0x2000
  21. #define TARGET_MCL_FUTURE 0x4000
  22. #define TARGET_MCL_ONFAULT 0x8000
  23. /* For SPARC SHMLBA is determined at runtime in the kernel, and
  24. * libc has to runtime-detect it using the hwcaps (see glibc
  25. * sysdeps/unix/sysv/linux/sparc/getshmlba; we follow the same
  26. * logic here, though we know we're not the sparc v9 64-bit case).
  27. */
  28. #define TARGET_FORCE_SHMLBA
  29. static inline abi_ulong target_shmlba(CPUSPARCState *env)
  30. {
  31. if (!(env->def.features & CPU_FEATURE_FLUSH)) {
  32. return 64 * 1024;
  33. } else {
  34. return 256 * 1024;
  35. }
  36. }
  37. #endif /* SPARC_TARGET_SYSCALL_H */