~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/x86/include/uapi/asm/vm86.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 #ifndef _UAPI_ASM_X86_VM86_H
  3 #define _UAPI_ASM_X86_VM86_H
  4 
  5 /*
  6  * I'm guessing at the VIF/VIP flag usage, but hope that this is how
  7  * the Pentium uses them. Linux will return from vm86 mode when both
  8  * VIF and VIP is set.
  9  *
 10  * On a Pentium, we could probably optimize the virtual flags directly
 11  * in the eflags register instead of doing it "by hand" in vflags...
 12  *
 13  * Linus
 14  */
 15 
 16 #include <asm/processor-flags.h>
 17 
 18 #define BIOSSEG         0x0f000
 19 
 20 #define CPU_086         0
 21 #define CPU_186         1
 22 #define CPU_286         2
 23 #define CPU_386         3
 24 #define CPU_486         4
 25 #define CPU_586         5
 26 
 27 /*
 28  * Return values for the 'vm86()' system call
 29  */
 30 #define VM86_TYPE(retval)       ((retval) & 0xff)
 31 #define VM86_ARG(retval)        ((retval) >> 8)
 32 
 33 #define VM86_SIGNAL     0       /* return due to signal */
 34 #define VM86_UNKNOWN    1       /* unhandled GP fault
 35                                    - IO-instruction or similar */
 36 #define VM86_INTx       2       /* int3/int x instruction (ARG = x) */
 37 #define VM86_STI        3       /* sti/popf/iret instruction enabled
 38                                    virtual interrupts */
 39 
 40 /*
 41  * Additional return values when invoking new vm86()
 42  */
 43 #define VM86_PICRETURN  4       /* return due to pending PIC request */
 44 #define VM86_TRAP       6       /* return due to DOS-debugger request */
 45 
 46 /*
 47  * function codes when invoking new vm86()
 48  */
 49 #define VM86_PLUS_INSTALL_CHECK 0
 50 #define VM86_ENTER              1
 51 #define VM86_ENTER_NO_BYPASS    2
 52 #define VM86_REQUEST_IRQ        3
 53 #define VM86_FREE_IRQ           4
 54 #define VM86_GET_IRQ_BITS       5
 55 #define VM86_GET_AND_RESET_IRQ  6
 56 
 57 /*
 58  * This is the stack-layout seen by the user space program when we have
 59  * done a translation of "SAVE_ALL" from vm86 mode. The real kernel layout
 60  * is 'kernel_vm86_regs' (see below).
 61  */
 62 
 63 struct vm86_regs {
 64 /*
 65  * normal regs, with special meaning for the segment descriptors..
 66  */
 67         long ebx;
 68         long ecx;
 69         long edx;
 70         long esi;
 71         long edi;
 72         long ebp;
 73         long eax;
 74         long __null_ds;
 75         long __null_es;
 76         long __null_fs;
 77         long __null_gs;
 78         long orig_eax;
 79         long eip;
 80         unsigned short cs, __csh;
 81         long eflags;
 82         long esp;
 83         unsigned short ss, __ssh;
 84 /*
 85  * these are specific to v86 mode:
 86  */
 87         unsigned short es, __esh;
 88         unsigned short ds, __dsh;
 89         unsigned short fs, __fsh;
 90         unsigned short gs, __gsh;
 91 };
 92 
 93 struct revectored_struct {
 94         unsigned long __map[8];                 /* 256 bits */
 95 };
 96 
 97 struct vm86_struct {
 98         struct vm86_regs regs;
 99         unsigned long flags;
100         unsigned long screen_bitmap;            /* unused, preserved by vm86() */
101         unsigned long cpu_type;
102         struct revectored_struct int_revectored;
103         struct revectored_struct int21_revectored;
104 };
105 
106 /*
107  * flags masks
108  */
109 #define VM86_SCREEN_BITMAP      0x0001        /* no longer supported */
110 
111 struct vm86plus_info_struct {
112         unsigned long force_return_for_pic:1;
113         unsigned long vm86dbg_active:1;       /* for debugger */
114         unsigned long vm86dbg_TFpendig:1;     /* for debugger */
115         unsigned long unused:28;
116         unsigned long is_vm86pus:1;           /* for vm86 internal use */
117         unsigned char vm86dbg_intxxtab[32];   /* for debugger */
118 };
119 struct vm86plus_struct {
120         struct vm86_regs regs;
121         unsigned long flags;
122         unsigned long screen_bitmap;
123         unsigned long cpu_type;
124         struct revectored_struct int_revectored;
125         struct revectored_struct int21_revectored;
126         struct vm86plus_info_struct vm86plus;
127 };
128 
129 
130 #endif /* _UAPI_ASM_X86_VM86_H */
131 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php