The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | **************************************************************************** |
| 11 | ****************************************************************************/ |
| 12 | #ifndef _I386_USER_H |
| 13 | #define _I386_USER_H |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 14 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 15 | #include <asm/page.h> |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 16 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 17 | struct user_i387_struct { |
| 18 | long cwd; |
| 19 | long swd; |
| 20 | long twd; |
| 21 | long fip; |
| 22 | long fcs; |
| 23 | long foo; |
| 24 | long fos; |
| 25 | long st_space[20]; |
| 26 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 27 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 28 | struct user_fxsr_struct { |
| 29 | unsigned short cwd; |
| 30 | unsigned short swd; |
| 31 | unsigned short twd; |
| 32 | unsigned short fop; |
| 33 | long fip; |
| 34 | long fcs; |
| 35 | long foo; |
| 36 | long fos; |
| 37 | long mxcsr; |
| 38 | long reserved; |
| 39 | long st_space[32]; |
| 40 | long xmm_space[32]; |
| 41 | long padding[56]; |
| 42 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 43 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 44 | struct user_regs_struct { |
| 45 | long ebx, ecx, edx, esi, edi, ebp, eax; |
| 46 | unsigned short ds, __ds, es, __es; |
| 47 | unsigned short fs, __fs, gs, __gs; |
| 48 | long orig_eax, eip; |
| 49 | unsigned short cs, __cs; |
| 50 | long eflags, esp; |
| 51 | unsigned short ss, __ss; |
| 52 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 53 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 54 | struct user{ |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 55 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 56 | struct user_regs_struct regs; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 57 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 58 | int u_fpvalid; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 59 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 60 | struct user_i387_struct i387; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 61 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 62 | unsigned long int u_tsize; |
| 63 | unsigned long int u_dsize; |
| 64 | unsigned long int u_ssize; |
| 65 | unsigned long start_code; |
| 66 | unsigned long start_stack; |
| 67 | long int signal; |
| 68 | int reserved; |
| 69 | struct user_pt_regs * u_ar0; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 70 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 71 | struct user_i387_struct* u_fpstate; |
| 72 | unsigned long magic; |
| 73 | char u_comm[32]; |
| 74 | int u_debugreg[8]; |
| 75 | }; |
| 76 | #define NBPG PAGE_SIZE |
| 77 | #define UPAGES 1 |
| 78 | #define HOST_TEXT_START_ADDR (u.start_code) |
| 79 | #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 80 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 81 | #endif |