]>
Commit | Line | Data |
---|---|---|
3622634b MA |
1 | #ifndef SPARC_TARGET_SYSCALL_H |
2 | #define SPARC_TARGET_SYSCALL_H | |
460c579f | 3 | |
05623849 LV |
4 | #include "target_errno.h" |
5 | ||
7a3f1944 | 6 | struct target_pt_regs { |
992f48a0 BS |
7 | abi_ulong psr; |
8 | abi_ulong pc; | |
9 | abi_ulong npc; | |
10 | abi_ulong y; | |
11 | abi_ulong u_regs[16]; | |
7a3f1944 | 12 | }; |
cf720db3 | 13 | |
9a93c152 | 14 | #define UNAME_MACHINE "sparc" |
cbc14e6f | 15 | #define UNAME_MINIMUM_RELEASE "2.6.32" |
4ce6243d PM |
16 | |
17 | /* SPARC kernels don't define this in their Kconfig, but they have the | |
18 | * same ABI as if they did, implemented by sparc-specific code which fishes | |
19 | * directly in the u_regs() struct for half the parameters in sparc_do_fork() | |
20 | * and copy_thread(). | |
21 | */ | |
22 | #define TARGET_CLONE_BACKWARDS | |
0903c8be | 23 | #define TARGET_MINSIGSTKSZ 4096 |
6f6a4032 TM |
24 | #define TARGET_MLOCKALL_MCL_CURRENT 0x2000 |
25 | #define TARGET_MLOCKALL_MCL_FUTURE 0x4000 | |
460c579f | 26 | |
ee8e7614 PM |
27 | /* For SPARC SHMLBA is determined at runtime in the kernel, and |
28 | * libc has to runtime-detect it using the hwcaps (see glibc | |
29 | * sysdeps/unix/sysv/linux/sparc/getshmlba; we follow the same | |
30 | * logic here, though we know we're not the sparc v9 64-bit case). | |
31 | */ | |
32 | #define TARGET_FORCE_SHMLBA | |
33 | ||
34 | static inline abi_ulong target_shmlba(CPUSPARCState *env) | |
35 | { | |
576e1c4c | 36 | if (!(env->def.features & CPU_FEATURE_FLUSH)) { |
ee8e7614 PM |
37 | return 64 * 1024; |
38 | } else { | |
39 | return 256 * 1024; | |
40 | } | |
41 | } | |
42 | ||
3622634b | 43 | #endif /* SPARC_TARGET_SYSCALL_H */ |