| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -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 | ***   To edit the content of this header, modify the corresponding | 
|  | 11 | ***   source file (e.g. under external/kernel-headers/original/) then | 
|  | 12 | ***   run bionic/libc/kernel/tools/update_all.py | 
|  | 13 | *** | 
|  | 14 | ***   Any manual change here will be lost the next time this script will | 
|  | 15 | ***   be run. You've been warned! | 
|  | 16 | *** | 
|  | 17 | **************************************************************************** | 
|  | 18 | ****************************************************************************/ | 
|  | 19 | #ifndef _UAPI_ASM_X86_VM86_H | 
|  | 20 | #define _UAPI_ASM_X86_VM86_H | 
|  | 21 | #include <asm/processor-flags.h> | 
|  | 22 | #define BIOSSEG 0x0f000 | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 23 | #define CPU_086 0 | 
|  | 24 | #define CPU_186 1 | 
|  | 25 | #define CPU_286 2 | 
|  | 26 | #define CPU_386 3 | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 27 | #define CPU_486 4 | 
|  | 28 | #define CPU_586 5 | 
|  | 29 | #define VM86_TYPE(retval) ((retval) & 0xff) | 
|  | 30 | #define VM86_ARG(retval) ((retval) >> 8) | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 31 | #define VM86_SIGNAL 0 | 
|  | 32 | #define VM86_UNKNOWN 1 | 
|  | 33 | #define VM86_INTx 2 | 
|  | 34 | #define VM86_STI 3 | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 35 | #define VM86_PICRETURN 4 | 
|  | 36 | #define VM86_TRAP 6 | 
|  | 37 | #define VM86_PLUS_INSTALL_CHECK 0 | 
|  | 38 | #define VM86_ENTER 1 | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 39 | #define VM86_ENTER_NO_BYPASS 2 | 
|  | 40 | #define VM86_REQUEST_IRQ 3 | 
|  | 41 | #define VM86_FREE_IRQ 4 | 
|  | 42 | #define VM86_GET_IRQ_BITS 5 | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 43 | #define VM86_GET_AND_RESET_IRQ 6 | 
|  | 44 | struct vm86_regs { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 45 | long ebx; | 
|  | 46 | long ecx; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | long edx; | 
|  | 48 | long esi; | 
|  | 49 | long edi; | 
|  | 50 | long ebp; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | long eax; | 
|  | 52 | long __null_ds; | 
|  | 53 | long __null_es; | 
|  | 54 | long __null_fs; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | long __null_gs; | 
|  | 56 | long orig_eax; | 
|  | 57 | long eip; | 
|  | 58 | unsigned short cs, __csh; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | long eflags; | 
|  | 60 | long esp; | 
|  | 61 | unsigned short ss, __ssh; | 
|  | 62 | unsigned short es, __esh; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 | unsigned short ds, __dsh; | 
|  | 64 | unsigned short fs, __fsh; | 
|  | 65 | unsigned short gs, __gsh; | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 66 | }; | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 67 | struct revectored_struct { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 68 | unsigned long __map[8]; | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 69 | }; | 
|  | 70 | struct vm86_struct { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | struct vm86_regs regs; | 
|  | 72 | unsigned long flags; | 
|  | 73 | unsigned long screen_bitmap; | 
|  | 74 | unsigned long cpu_type; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 75 | struct revectored_struct int_revectored; | 
|  | 76 | struct revectored_struct int21_revectored; | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 77 | }; | 
|  | 78 | #define VM86_SCREEN_BITMAP 0x0001 | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 79 | struct vm86plus_info_struct { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 80 | unsigned long force_return_for_pic : 1; | 
|  | 81 | unsigned long vm86dbg_active : 1; | 
|  | 82 | unsigned long vm86dbg_TFpendig : 1; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 83 | unsigned long unused : 28; | 
|  | 84 | unsigned long is_vm86pus : 1; | 
|  | 85 | unsigned char vm86dbg_intxxtab[32]; | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 86 | }; | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 87 | struct vm86plus_struct { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 88 | struct vm86_regs regs; | 
|  | 89 | unsigned long flags; | 
|  | 90 | unsigned long screen_bitmap; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 91 | unsigned long cpu_type; | 
|  | 92 | struct revectored_struct int_revectored; | 
|  | 93 | struct revectored_struct int21_revectored; | 
|  | 94 | struct vm86plus_info_struct vm86plus; | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 95 | }; | 
|  | 96 | #endif |