Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

vdmntos.h

Go to the documentation of this file.
00001 /*++ 00002 00003 Copyright (c) 1991 Microsoft Corporation 00004 00005 Module Name: 00006 00007 vdmntos.h 00008 00009 Abstract: 00010 00011 This is the include file for the vdm component. It describes the kernel 00012 mode visible portions of the vdm component. The \nt\private\inc\vdm.h 00013 file describes the portions that are usermode visible. 00014 00015 Author: 00016 00017 Dave Hastings (daveh) 02-Feb-1992 00018 00019 Revision History: 00020 00021 --*/ 00022 00023 #ifndef _VDMNTOS_ 00024 #define _VDMNTOS_ 00025 00026 // 00027 // Need this #include here because non-x86 ntos\vdm\vdm.c 00028 // references structures defined there. 00029 // 00030 00031 #include "..\..\inc\vdm.h" 00032 00033 #if defined(i386) 00034 00035 typedef struct _VDM_IO_LISTHEAD { 00036 PVDM_IO_HANDLER VdmIoHandlerList; 00037 ERESOURCE VdmIoResource; 00038 ULONG Context; 00039 } VDM_IO_LISTHEAD, *PVDM_IO_LISTHEAD; 00040 00041 00042 typedef struct _VDM_PROCESS_OBJECTS { 00043 PVDM_IO_LISTHEAD VdmIoListHead; 00044 KAPC QueuedIntApc; 00045 KAPC QueuedIntUserApc; 00046 FAST_MUTEX DelayIntFastMutex; 00047 KSPIN_LOCK DelayIntSpinLock; 00048 LIST_ENTRY DelayIntListHead; 00049 PVDMICAUSERDATA pIcaUserData; 00050 PETHREAD MainThread; 00051 PVDM_TIB VdmTib; 00052 PUCHAR PrinterState; 00053 PUCHAR PrinterControl; 00054 PUCHAR PrinterStatus; 00055 PUCHAR PrinterHostState; 00056 } VDM_PROCESS_OBJECTS, *PVDM_PROCESS_OBJECTS; 00057 00058 00059 typedef struct _DelayInterruptsIrq { 00060 LIST_ENTRY DelayIntListEntry; 00061 ULONG IrqLine; 00062 PETHREAD Thread; 00063 KDPC Dpc; 00064 KAPC Apc; 00065 KTIMER Timer; 00066 BOOLEAN InUse; 00067 PETHREAD MainThread; 00068 } DELAYINTIRQ, *PDELAYINTIRQ; 00069 00070 #define VDMDELAY_NOTINUSE 0 00071 #define VDMDELAY_KTIMER 1 00072 #define VDMDELAY_PTIMER 2 00073 #define VDMDELAY_KAPC 3 00074 00075 00076 BOOLEAN 00077 Ps386GetVdmIoHandler( 00078 IN PEPROCESS Process, 00079 IN ULONG PortNumber, 00080 OUT PVDM_IO_HANDLER VdmIoHandler, 00081 OUT PULONG Context 00082 ); 00083 00084 #define SEL_TYPE_READ 0x00000001 00085 #define SEL_TYPE_WRITE 0x00000002 00086 #define SEL_TYPE_EXECUTE 0x00000004 00087 #define SEL_TYPE_BIG 0x00000008 00088 #define SEL_TYPE_ED 0x00000010 00089 #define SEL_TYPE_2GIG 0x00000020 00090 #define SEL_TYPE_NP 0x00000040 00091 00092 // NPX error exception dispatcher 00093 BOOLEAN 00094 VdmDispatchIRQ13( 00095 PKTRAP_FRAME TrapFrame 00096 ); 00097 00098 BOOLEAN 00099 VdmSkipNpxInstruction( 00100 PKTRAP_FRAME TrapFrame, 00101 ULONG Address32Bits, 00102 PUCHAR istream, 00103 ULONG InstructionSize 00104 ); 00105 00106 VOID 00107 VdmEndExecution( 00108 PKTRAP_FRAME TrapFrame, 00109 PVDM_TIB VdmTib 00110 ); 00111 00112 NTSTATUS 00113 VdmDispatchInterrupts( 00114 PKTRAP_FRAME TrapFrame, 00115 PVDM_TIB VdmTib 00116 ); 00117 00118 VOID 00119 VdmDispatchException( 00120 PKTRAP_FRAME TrapFrame, 00121 NTSTATUS ExcepCode, 00122 PVOID ExcepAddress, 00123 ULONG NumParms, 00124 ULONG Parm1, 00125 ULONG Parm2, 00126 ULONG Parm3 00127 ); 00128 00129 #define VdmGetTrapFrame(pKThread) \ 00130 ((PKTRAP_FRAME)( (PUCHAR)(pKThread)->InitialStack - \ 00131 sizeof(FX_SAVE_AREA) - \ 00132 ((ULONG)(sizeof(KTRAP_FRAME)+KTRAP_FRAME_ROUND) \ 00133 & ~(KTRAP_FRAME_ROUND)) \ 00134 ) \ 00135 ) 00136 00137 // 00138 // These values are defined here to describe the structure of an array 00139 // containing running counts of v86 opcode emulation. The array lives in 00140 // ke\i386, but is referenced in ex. 00141 // 00142 #define VDM_INDEX_Invalid 0 00143 #define VDM_INDEX_0F 1 00144 #define VDM_INDEX_ESPrefix 2 00145 #define VDM_INDEX_CSPrefix 3 00146 #define VDM_INDEX_SSPrefix 4 00147 #define VDM_INDEX_DSPrefix 5 00148 #define VDM_INDEX_FSPrefix 6 00149 #define VDM_INDEX_GSPrefix 7 00150 #define VDM_INDEX_OPER32Prefix 8 00151 #define VDM_INDEX_ADDR32Prefix 9 00152 #define VDM_INDEX_INSB 10 00153 #define VDM_INDEX_INSW 11 00154 #define VDM_INDEX_OUTSB 12 00155 #define VDM_INDEX_OUTSW 13 00156 #define VDM_INDEX_PUSHF 14 00157 #define VDM_INDEX_POPF 15 00158 #define VDM_INDEX_INTnn 16 00159 #define VDM_INDEX_INTO 17 00160 #define VDM_INDEX_IRET 18 00161 #define VDM_INDEX_NPX 19 00162 #define VDM_INDEX_INBimm 20 00163 #define VDM_INDEX_INWimm 21 00164 #define VDM_INDEX_OUTBimm 22 00165 #define VDM_INDEX_OUTWimm 23 00166 #define VDM_INDEX_INB 24 00167 #define VDM_INDEX_INW 25 00168 #define VDM_INDEX_OUTB 26 00169 #define VDM_INDEX_OUTW 27 00170 #define VDM_INDEX_LOCKPrefix 28 00171 #define VDM_INDEX_REPNEPrefix 29 00172 #define VDM_INDEX_REPPrefix 30 00173 #define VDM_INDEX_CLI 31 00174 #define VDM_INDEX_STI 32 00175 #define VDM_INDEX_HLT 33 00176 00177 // The following value must be 1 more than the last defined index value 00178 #define MAX_VDM_INDEX 34 00179 00180 // 00181 // This is the address of the Vdm communication area. It's in ke\i386\vdm.c 00182 // 00183 00184 extern ULONG VdmFixedStateLinear; 00185 00186 #define FIXED_NTVDMSTATE_LINEAR_PC_AT 0x714 00187 #define FIXED_NTVDMSTATE_LINEAR_PC_98 0x614 00188 00189 #endif // i386 00190 #endif // _VDMNTOS_

Generated on Sat May 15 19:42:22 2004 for test by doxygen 1.3.7