1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 21965aae3SH. Peter Anvin #ifndef _ASM_X86_USER32_H 31965aae3SH. Peter Anvin #define _ASM_X86_USER32_H 4bb898558SAl Viro 5bb898558SAl Viro /* IA32 compatible user structures for ptrace. 6bb898558SAl Viro * These should be used for 32bit coredumps too. */ 7bb898558SAl Viro 8bb898558SAl Viro struct user_i387_ia32_struct { 9bb898558SAl Viro u32 cwd; 10bb898558SAl Viro u32 swd; 11bb898558SAl Viro u32 twd; 12bb898558SAl Viro u32 fip; 13bb898558SAl Viro u32 fcs; 14bb898558SAl Viro u32 foo; 15bb898558SAl Viro u32 fos; 16bb898558SAl Viro u32 st_space[20]; /* 8*10 bytes for each FP-reg = 80 bytes */ 17bb898558SAl Viro }; 18bb898558SAl Viro 19bb898558SAl Viro /* FSAVE frame with extensions */ 20bb898558SAl Viro struct user32_fxsr_struct { 21bb898558SAl Viro unsigned short cwd; 22bb898558SAl Viro unsigned short swd; 23bb898558SAl Viro unsigned short twd; /* not compatible to 64bit twd */ 24bb898558SAl Viro unsigned short fop; 25bb898558SAl Viro int fip; 26bb898558SAl Viro int fcs; 27bb898558SAl Viro int foo; 28bb898558SAl Viro int fos; 29bb898558SAl Viro int mxcsr; 30bb898558SAl Viro int reserved; 31bb898558SAl Viro int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */ 32bb898558SAl Viro int xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */ 33bb898558SAl Viro int padding[56]; 34bb898558SAl Viro }; 35bb898558SAl Viro 36bb898558SAl Viro struct user_regs_struct32 { 37bb898558SAl Viro __u32 ebx, ecx, edx, esi, edi, ebp, eax; 38bb898558SAl Viro unsigned short ds, __ds, es, __es; 39bb898558SAl Viro unsigned short fs, __fs, gs, __gs; 40bb898558SAl Viro __u32 orig_eax, eip; 41bb898558SAl Viro unsigned short cs, __cs; 42bb898558SAl Viro __u32 eflags, esp; 43bb898558SAl Viro unsigned short ss, __ss; 44bb898558SAl Viro }; 45bb898558SAl Viro 46bb898558SAl Viro struct user32 { 47bb898558SAl Viro struct user_regs_struct32 regs; /* Where the registers are actually stored */ 48bb898558SAl Viro int u_fpvalid; /* True if math co-processor being used. */ 49bb898558SAl Viro /* for this mess. Not yet used. */ 50bb898558SAl Viro struct user_i387_ia32_struct i387; /* Math Co-processor registers. */ 51bb898558SAl Viro /* The rest of this junk is to help gdb figure out what goes where */ 52bb898558SAl Viro __u32 u_tsize; /* Text segment size (pages). */ 53bb898558SAl Viro __u32 u_dsize; /* Data segment size (pages). */ 54bb898558SAl Viro __u32 u_ssize; /* Stack segment size (pages). */ 55bb898558SAl Viro __u32 start_code; /* Starting virtual address of text. */ 56bb898558SAl Viro __u32 start_stack; /* Starting virtual address of stack area. 57bb898558SAl Viro This is actually the bottom of the stack, 58bb898558SAl Viro the top of the stack is always found in the 59bb898558SAl Viro esp register. */ 60bb898558SAl Viro __u32 signal; /* Signal that caused the core dump. */ 61bb898558SAl Viro int reserved; /* No __u32er used */ 62bb898558SAl Viro __u32 u_ar0; /* Used by gdb to help find the values for */ 63bb898558SAl Viro /* the registers. */ 64bb898558SAl Viro __u32 u_fpstate; /* Math Co-processor pointer. */ 65bb898558SAl Viro __u32 magic; /* To uniquely identify a core file */ 66bb898558SAl Viro char u_comm[32]; /* User command that was responsible */ 67bb898558SAl Viro int u_debugreg[8]; 68bb898558SAl Viro }; 69bb898558SAl Viro 70bb898558SAl Viro 711965aae3SH. Peter Anvin #endif /* _ASM_X86_USER32_H */ 72