blob: 7193484e49886ab8e53f921bc55fa1cf0c6b6042 [file] [log] [blame]
Elliott Hughesabd62612013-11-08 11:45:48 -08001/****************************************************************************
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 Hughesabd62612013-11-08 11:45:48 -080023#define CPU_086 0
24#define CPU_186 1
25#define CPU_286 2
26#define CPU_386 3
Elliott Hughesabd62612013-11-08 11:45:48 -080027#define CPU_486 4
28#define CPU_586 5
29#define VM86_TYPE(retval) ((retval) & 0xff)
30#define VM86_ARG(retval) ((retval) >> 8)
Elliott Hughesabd62612013-11-08 11:45:48 -080031#define VM86_SIGNAL 0
32#define VM86_UNKNOWN 1
33#define VM86_INTx 2
34#define VM86_STI 3
Elliott Hughesabd62612013-11-08 11:45:48 -080035#define VM86_PICRETURN 4
36#define VM86_TRAP 6
37#define VM86_PLUS_INSTALL_CHECK 0
38#define VM86_ENTER 1
Elliott Hughesabd62612013-11-08 11:45:48 -080039#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 Hughesabd62612013-11-08 11:45:48 -080043#define VM86_GET_AND_RESET_IRQ 6
44struct vm86_regs {
Tao Baod7db5942015-01-28 10:07:51 -080045 long ebx;
46 long ecx;
Tao Baod7db5942015-01-28 10:07:51 -080047 long edx;
48 long esi;
49 long edi;
50 long ebp;
Tao Baod7db5942015-01-28 10:07:51 -080051 long eax;
52 long __null_ds;
53 long __null_es;
54 long __null_fs;
Tao Baod7db5942015-01-28 10:07:51 -080055 long __null_gs;
56 long orig_eax;
57 long eip;
58 unsigned short cs, __csh;
Tao Baod7db5942015-01-28 10:07:51 -080059 long eflags;
60 long esp;
61 unsigned short ss, __ssh;
62 unsigned short es, __esh;
Tao Baod7db5942015-01-28 10:07:51 -080063 unsigned short ds, __dsh;
64 unsigned short fs, __fsh;
65 unsigned short gs, __gsh;
Elliott Hughesabd62612013-11-08 11:45:48 -080066};
Elliott Hughesabd62612013-11-08 11:45:48 -080067struct revectored_struct {
Tao Baod7db5942015-01-28 10:07:51 -080068 unsigned long __map[8];
Elliott Hughesabd62612013-11-08 11:45:48 -080069};
70struct vm86_struct {
Tao Baod7db5942015-01-28 10:07:51 -080071 struct vm86_regs regs;
72 unsigned long flags;
73 unsigned long screen_bitmap;
74 unsigned long cpu_type;
Tao Baod7db5942015-01-28 10:07:51 -080075 struct revectored_struct int_revectored;
76 struct revectored_struct int21_revectored;
Elliott Hughesabd62612013-11-08 11:45:48 -080077};
78#define VM86_SCREEN_BITMAP 0x0001
Elliott Hughesabd62612013-11-08 11:45:48 -080079struct vm86plus_info_struct {
Tao Baod7db5942015-01-28 10:07:51 -080080 unsigned long force_return_for_pic : 1;
81 unsigned long vm86dbg_active : 1;
82 unsigned long vm86dbg_TFpendig : 1;
Tao Baod7db5942015-01-28 10:07:51 -080083 unsigned long unused : 28;
84 unsigned long is_vm86pus : 1;
85 unsigned char vm86dbg_intxxtab[32];
Elliott Hughesabd62612013-11-08 11:45:48 -080086};
Elliott Hughesabd62612013-11-08 11:45:48 -080087struct vm86plus_struct {
Tao Baod7db5942015-01-28 10:07:51 -080088 struct vm86_regs regs;
89 unsigned long flags;
90 unsigned long screen_bitmap;
Tao Baod7db5942015-01-28 10:07:51 -080091 unsigned long cpu_type;
92 struct revectored_struct int_revectored;
93 struct revectored_struct int21_revectored;
94 struct vm86plus_info_struct vm86plus;
Elliott Hughesabd62612013-11-08 11:45:48 -080095};
96#endif