| 1 | #ifndef SPARC_TARGET_SYSCALL_H |
| 2 | #define SPARC_TARGET_SYSCALL_H |
| 3 | |
| 4 | #ifdef TARGET_SPARC64 |
| 5 | # define UNAME_MACHINE "sparc64" |
| 6 | #else |
| 7 | # define UNAME_MACHINE "sparc" |
| 8 | #endif |
| 9 | #define UNAME_MINIMUM_RELEASE "2.6.32" |
| 10 | |
| 11 | /* |
| 12 | * SPARC kernels don't define this in their Kconfig, but they have the |
| 13 | * same ABI as if they did, implemented by sparc-specific code which fishes |
| 14 | * directly in the u_regs() struct for half the parameters in sparc_do_fork() |
| 15 | * and copy_thread(). |
| 16 | */ |
| 17 | #define TARGET_CLONE_BACKWARDS |
| 18 | #define TARGET_MCL_CURRENT 0x2000 |
| 19 | #define TARGET_MCL_FUTURE 0x4000 |
| 20 | #define TARGET_MCL_ONFAULT 0x8000 |
| 21 | |
| 22 | /* |
| 23 | * For SPARC SHMLBA is determined at runtime in the kernel, and |
| 24 | * libc has to runtime-detect it using the hwcaps. |
| 25 | * See glibc sysdeps/unix/sysv/linux/sparc/getshmlba. |
| 26 | */ |
| 27 | #define TARGET_FORCE_SHMLBA |
| 28 | |
| 29 | static inline abi_ulong target_shmlba(CPUSPARCState *env) |
| 30 | { |
| 31 | #ifdef TARGET_SPARC64 |
| 32 | return MAX(TARGET_PAGE_SIZE, 16 * 1024); |
| 33 | #else |
| 34 | return 256 * 1024; |
| 35 | #endif |
| 36 | } |
| 37 | |
| 38 | #endif /* SPARC_TARGET_SYSCALL_H */ |