Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

113 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. dpmi.h
  5. Abstract:
  6. This file contains code to implement support for the DPMI bops
  7. Author:
  8. Dave Hastings (daveh) 27-Jun-1991
  9. Revision History:
  10. --*/
  11. /* ASM
  12. ifdef WOW_x86
  13. include vint.inc
  14. endif
  15. include bop.inc
  16. */
  17. #define LDT_SIZE 0x1FFF
  18. // DPMI Bop Sub Functions
  19. #define InitDosxRM 0
  20. #define InitDosx 1
  21. #define InitLDT 2
  22. #define GetFastBopAddress 3
  23. #define InitIDT 4
  24. #define InitExceptionHandlers 5
  25. #define InitApp 6
  26. #define TerminateApp 7
  27. #define DpmiInUse 8
  28. #define DpmiNoLongerInUse 9
  29. #define DPMISwitchToProtectedMode 10 /* prefix necessary */
  30. #define DPMISwitchToRealMode 11
  31. #define SetAltRegs 12
  32. #define IntHandlerIret 13
  33. #define IntHandlerIretd 14
  34. #define FaultHandlerIret 15
  35. #define FaultHandlerIretd 16
  36. #define DpmiUnhandledException 17
  37. #define RMCallBackCall 18
  38. #define ReflectIntrToPM 19
  39. #define ReflectIntrToV86 20
  40. #define InitPmStackInfo 21
  41. #define VcdPmSvcCall32 22
  42. #define SetDescriptorTableEntries 23
  43. #define ResetLDTUserBase 24
  44. #define XlatInt21Call 25
  45. #define Int31Entry 26
  46. #define Int31Call 27
  47. #define HungAppIretAndExit 28
  48. #define MAX_DPMI_BOP_FUNC HungAppIretAndExit + 1
  49. /* ASM
  50. DPMIBOP macro SubFun
  51. BOP BOP_DPMI
  52. db SubFun
  53. endm
  54. */
  55. //
  56. // Definitions for real mode call backs
  57. //
  58. /* XLATOFF */
  59. typedef struct _RMCB_INFO {
  60. BOOL bInUse;
  61. USHORT StackSel;
  62. USHORT StrucSeg;
  63. ULONG StrucOffset;
  64. USHORT ProcSeg;
  65. ULONG ProcOffset;
  66. } RMCB_INFO;
  67. // 16 is the minimum defined in the dpmi spec
  68. #define MAX_RMCBS 16
  69. typedef struct _MEM_DPMI {
  70. PVOID Address;
  71. ULONG Length;
  72. struct _MEM_DPMI * Prev;
  73. struct _MEM_DPMI * Next;
  74. WORD Owner;
  75. WORD Sel;
  76. WORD SelCount;
  77. } MEM_DPMI, *PMEM_DPMI;
  78. VOID
  79. SetShadowDescriptorEntries(
  80. USHORT SelStart,
  81. USHORT SelCount
  82. );
  83. /* XLATON */