blob: 7643f1ded7d5446e8f6354d5dd38349c9a474026 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Elliott Hughesabd62612013-11-08 11:45:48 -08007#ifndef _UAPI_ASM_X86_VM86_H
8#define _UAPI_ASM_X86_VM86_H
9#include <asm/processor-flags.h>
10#define BIOSSEG 0x0f000
Elliott Hughesabd62612013-11-08 11:45:48 -080011#define CPU_086 0
12#define CPU_186 1
13#define CPU_286 2
14#define CPU_386 3
Elliott Hughesabd62612013-11-08 11:45:48 -080015#define CPU_486 4
16#define CPU_586 5
17#define VM86_TYPE(retval) ((retval) & 0xff)
18#define VM86_ARG(retval) ((retval) >> 8)
Elliott Hughesabd62612013-11-08 11:45:48 -080019#define VM86_SIGNAL 0
20#define VM86_UNKNOWN 1
21#define VM86_INTx 2
22#define VM86_STI 3
Elliott Hughesabd62612013-11-08 11:45:48 -080023#define VM86_PICRETURN 4
24#define VM86_TRAP 6
25#define VM86_PLUS_INSTALL_CHECK 0
26#define VM86_ENTER 1
Elliott Hughesabd62612013-11-08 11:45:48 -080027#define VM86_ENTER_NO_BYPASS 2
28#define VM86_REQUEST_IRQ 3
29#define VM86_FREE_IRQ 4
30#define VM86_GET_IRQ_BITS 5
Elliott Hughesabd62612013-11-08 11:45:48 -080031#define VM86_GET_AND_RESET_IRQ 6
32struct vm86_regs {
Tao Baod7db5942015-01-28 10:07:51 -080033 long ebx;
34 long ecx;
Tao Baod7db5942015-01-28 10:07:51 -080035 long edx;
36 long esi;
37 long edi;
38 long ebp;
Tao Baod7db5942015-01-28 10:07:51 -080039 long eax;
40 long __null_ds;
41 long __null_es;
42 long __null_fs;
Tao Baod7db5942015-01-28 10:07:51 -080043 long __null_gs;
44 long orig_eax;
45 long eip;
46 unsigned short cs, __csh;
Tao Baod7db5942015-01-28 10:07:51 -080047 long eflags;
48 long esp;
49 unsigned short ss, __ssh;
50 unsigned short es, __esh;
Tao Baod7db5942015-01-28 10:07:51 -080051 unsigned short ds, __dsh;
52 unsigned short fs, __fsh;
53 unsigned short gs, __gsh;
Elliott Hughesabd62612013-11-08 11:45:48 -080054};
Elliott Hughesabd62612013-11-08 11:45:48 -080055struct revectored_struct {
Tao Baod7db5942015-01-28 10:07:51 -080056 unsigned long __map[8];
Elliott Hughesabd62612013-11-08 11:45:48 -080057};
58struct vm86_struct {
Tao Baod7db5942015-01-28 10:07:51 -080059 struct vm86_regs regs;
60 unsigned long flags;
61 unsigned long screen_bitmap;
62 unsigned long cpu_type;
Tao Baod7db5942015-01-28 10:07:51 -080063 struct revectored_struct int_revectored;
64 struct revectored_struct int21_revectored;
Elliott Hughesabd62612013-11-08 11:45:48 -080065};
66#define VM86_SCREEN_BITMAP 0x0001
Elliott Hughesabd62612013-11-08 11:45:48 -080067struct vm86plus_info_struct {
Tao Baod7db5942015-01-28 10:07:51 -080068 unsigned long force_return_for_pic : 1;
69 unsigned long vm86dbg_active : 1;
70 unsigned long vm86dbg_TFpendig : 1;
Tao Baod7db5942015-01-28 10:07:51 -080071 unsigned long unused : 28;
72 unsigned long is_vm86pus : 1;
73 unsigned char vm86dbg_intxxtab[32];
Elliott Hughesabd62612013-11-08 11:45:48 -080074};
Elliott Hughesabd62612013-11-08 11:45:48 -080075struct vm86plus_struct {
Tao Baod7db5942015-01-28 10:07:51 -080076 struct vm86_regs regs;
77 unsigned long flags;
78 unsigned long screen_bitmap;
Tao Baod7db5942015-01-28 10:07:51 -080079 unsigned long cpu_type;
80 struct revectored_struct int_revectored;
81 struct revectored_struct int21_revectored;
82 struct vm86plus_info_struct vm86plus;
Elliott Hughesabd62612013-11-08 11:45:48 -080083};
84#endif