virtio/pci/migration: Convert to VMState
[qemu.git] / linux-user / sparc / target_syscall.h
blob5f09abfe89d8e4a8b0a5bfea3cf5d3e85357c79d
1 #ifndef SPARC_TARGET_SYSCALL_H
2 #define SPARC_TARGET_SYSCALL_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];
12 #define UNAME_MACHINE "sun4"
13 #define UNAME_MINIMUM_RELEASE "2.6.32"
15 /* SPARC kernels don't define this in their Kconfig, but they have the
16 * same ABI as if they did, implemented by sparc-specific code which fishes
17 * directly in the u_regs() struct for half the parameters in sparc_do_fork()
18 * and copy_thread().
20 #define TARGET_CLONE_BACKWARDS
21 #define TARGET_MINSIGSTKSZ 4096
22 #define TARGET_MLOCKALL_MCL_CURRENT 0x2000
23 #define TARGET_MLOCKALL_MCL_FUTURE 0x4000
25 /* For SPARC SHMLBA is determined at runtime in the kernel, and
26 * libc has to runtime-detect it using the hwcaps (see glibc
27 * sysdeps/unix/sysv/linux/sparc/getshmlba; we follow the same
28 * logic here, though we know we're not the sparc v9 64-bit case).
30 #define TARGET_FORCE_SHMLBA
32 static inline abi_ulong target_shmlba(CPUSPARCState *env)
34 if (!(env->def.features & CPU_FEATURE_FLUSH)) {
35 return 64 * 1024;
36 } else {
37 return 256 * 1024;
41 #endif /* SPARC_TARGET_SYSCALL_H */