root/include/linux/vm86.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _LINUX_VM86_H
   2 #define _LINUX_VM86_H
   3 
   4 #define TF_MASK         0x00000100
   5 #define IF_MASK         0x00000200
   6 #define IOPL_MASK       0x00003000
   7 #define NT_MASK         0x00004000
   8 #define VM_MASK         0x00020000
   9 #define AC_MASK         0x00040000
  10 
  11 #define BIOSSEG         0x0f000
  12 
  13 #define CPU_286         2
  14 #define CPU_386         3
  15 #define CPU_486         4
  16 
  17 /*
  18  * This is the stack-layout when we have done a "SAVE_ALL" from vm86
  19  * mode - the main change is that the old segment descriptors aren't
  20  * useful any more and are forced to be zero by the kernel (and the
  21  * hardware when a trap occurs), and the real segment descriptors are
  22  * at the end of the structure. Look at ptrace.h to see the "normal"
  23  * setup.
  24  */
  25 
  26 struct vm86_regs {
  27 /*
  28  * normal regs, with special meaning for the segment descriptors..
  29  */
  30         long ebx;
  31         long ecx;
  32         long edx;
  33         long esi;
  34         long edi;
  35         long ebp;
  36         long eax;
  37         long __null_ds;
  38         long __null_es;
  39         long __null_fs;
  40         long __null_gs;
  41         long orig_eax;
  42         long eip;
  43         unsigned short cs, __csh;
  44         long eflags;
  45         long esp;
  46         unsigned short ss, __ssh;
  47 /*
  48  * these are specific to v86 mode:
  49  */
  50         unsigned short es, __esh;
  51         unsigned short ds, __dsh;
  52         unsigned short fs, __fsh;
  53         unsigned short gs, __gsh;
  54 };
  55 
  56 struct vm86_struct {
  57         struct vm86_regs regs;
  58         unsigned long flags;
  59         unsigned long screen_bitmap;
  60         unsigned long v_eflags;
  61         unsigned long cpu_type;
  62         unsigned long return_if_iflag;
  63         unsigned char int_revectored[0x100];
  64         unsigned char int21_revectored[0x100];
  65 };
  66 
  67 /*
  68  * flags masks
  69  */
  70 #define VM86_SCREEN_BITMAP 1
  71 
  72 #ifdef __KERNEL__
  73 
  74 void handle_vm86_fault(struct vm86_regs *, long);
  75 
  76 #endif
  77 
  78 #endif

/* [previous][next][first][last][top][bottom][index][help] */