1 #ifndef _ASMARM_UCONTEXT_H
2 #define _ASMARM_UCONTEXT_H
4 #include <asm/fpstate.h>
7 * struct sigcontext only has room for the basic registers, but struct
8 * ucontext now has room for all registers which need to be saved and
9 * restored. Coprocessor registers are stored in uc_regspace. Each
10 * coprocessor's saved state should start with a documented 32-bit magic
11 * number, followed by a 32-bit word giving the coproccesor's saved size.
12 * uc_regspace may be expanded if necessary, although this takes some
13 * coordination with glibc.
17 unsigned long uc_flags;
18 struct ucontext *uc_link;
20 struct sigcontext uc_mcontext;
22 /* Allow for uc_sigmask growth. Glibc uses a 1024-bit sigset_t. */
23 int __unused[32 - (sizeof (sigset_t) / sizeof (int))];
24 /* Last for extensibility. Eight byte aligned because some
25 coprocessors require eight byte alignment. */
26 unsigned long uc_regspace[128] __attribute__((__aligned__(8)));
32 * Coprocessor save state. The magic values and specific
33 * coprocessor's layouts are part of the userspace ABI. Each one of
34 * these should be a multiple of eight bytes and aligned to eight
35 * bytes, to prevent unpredictable padding in the signal frame.
39 #define CRUNCH_MAGIC 0x5065cf03
40 #define CRUNCH_STORAGE_SIZE (CRUNCH_SIZE + 8)
42 struct crunch_sigframe {
45 struct crunch_state storage;
46 } __attribute__((__aligned__(8)));
50 /* iwmmxt_area is 0x98 bytes long, preceeded by 8 bytes of signature */
51 #define IWMMXT_MAGIC 0x12ef842a
52 #define IWMMXT_STORAGE_SIZE (IWMMXT_SIZE + 8)
54 struct iwmmxt_sigframe {
57 struct iwmmxt_struct storage;
58 } __attribute__((__aligned__(8)));
59 #endif /* CONFIG_IWMMXT */
62 #if __LINUX_ARM_ARCH__ < 6
63 /* For ARM pre-v6, we use fstmiax and fldmiax. This adds one extra
64 * word after the registers, and a word of padding at the end for
66 #define VFP_MAGIC 0x56465001
67 #define VFP_STORAGE_SIZE 152
69 #define VFP_MAGIC 0x56465002
70 #define VFP_STORAGE_SIZE 144
77 union vfp_state storage;
79 #endif /* CONFIG_VFP */
82 * Auxiliary signal frame. This saves stuff like FP state.
83 * The layout of this structure is not part of the user ABI,
84 * because the config options aren't. uc_regspace is really
89 struct crunch_sigframe crunch;
92 struct iwmmxt_sigframe iwmmxt;
94 #if 0 && defined CONFIG_VFP /* Not yet saved. */
95 struct vfp_sigframe vfp;
97 /* Something that isn't a valid magic number for any coprocessor. */
98 unsigned long end_magic;
99 } __attribute__((__aligned__(8)));
103 #endif /* !_ASMARM_UCONTEXT_H */