]>
Commit | Line | Data |
---|---|---|
3622634b MA |
1 | #ifndef SPARC_TARGET_SYSCALL_H |
2 | #define SPARC_TARGET_SYSCALL_H | |
460c579f | 3 | |
2f23eec6 | 4 | #if defined(TARGET_SPARC64) && !defined(TARGET_ABI32) |
7a3f1944 | 5 | struct target_pt_regs { |
2f23eec6 RH |
6 | abi_ulong u_regs[16]; |
7 | abi_ulong tstate; | |
8 | abi_ulong pc; | |
9 | abi_ulong npc; | |
10 | uint32_t y; | |
11 | uint32_t magic; | |
7a3f1944 | 12 | }; |
2f23eec6 RH |
13 | #else |
14 | struct target_pt_regs { | |
15 | abi_ulong psr; | |
16 | abi_ulong pc; | |
17 | abi_ulong npc; | |
18 | abi_ulong y; | |
19 | abi_ulong u_regs[16]; | |
20 | }; | |
21 | #endif | |
cf720db3 | 22 | |
2f23eec6 RH |
23 | #ifdef TARGET_SPARC64 |
24 | # define UNAME_MACHINE "sparc64" | |
25 | #else | |
26 | # define UNAME_MACHINE "sparc" | |
27 | #endif | |
cbc14e6f | 28 | #define UNAME_MINIMUM_RELEASE "2.6.32" |
4ce6243d | 29 | |
2f23eec6 RH |
30 | /* |
31 | * SPARC kernels don't define this in their Kconfig, but they have the | |
4ce6243d PM |
32 | * same ABI as if they did, implemented by sparc-specific code which fishes |
33 | * directly in the u_regs() struct for half the parameters in sparc_do_fork() | |
34 | * and copy_thread(). | |
35 | */ | |
36 | #define TARGET_CLONE_BACKWARDS | |
0903c8be | 37 | #define TARGET_MINSIGSTKSZ 4096 |
02e5d7d7 FB |
38 | #define TARGET_MCL_CURRENT 0x2000 |
39 | #define TARGET_MCL_FUTURE 0x4000 | |
40 | #define TARGET_MCL_ONFAULT 0x8000 | |
460c579f | 41 | |
2f23eec6 RH |
42 | /* |
43 | * For SPARC SHMLBA is determined at runtime in the kernel, and | |
44 | * libc has to runtime-detect it using the hwcaps. | |
45 | * See glibc sysdeps/unix/sysv/linux/sparc/getshmlba. | |
ee8e7614 PM |
46 | */ |
47 | #define TARGET_FORCE_SHMLBA | |
48 | ||
49 | static inline abi_ulong target_shmlba(CPUSPARCState *env) | |
50 | { | |
2f23eec6 RH |
51 | #ifdef TARGET_SPARC64 |
52 | return MAX(TARGET_PAGE_SIZE, 16 * 1024); | |
53 | #else | |
576e1c4c | 54 | if (!(env->def.features & CPU_FEATURE_FLUSH)) { |
ee8e7614 PM |
55 | return 64 * 1024; |
56 | } else { | |
57 | return 256 * 1024; | |
58 | } | |
2f23eec6 | 59 | #endif |
ee8e7614 PM |
60 | } |
61 | ||
3622634b | 62 | #endif /* SPARC_TARGET_SYSCALL_H */ |