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.

121 lines
2.3 KiB

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. v86emul.h
  5. Abstract:
  6. This module contains the V86 instruction emulator interface definitions
  7. used by kernel device drivers.
  8. Author:
  9. Andre Vachon (andreva) 8-Jan-1992
  10. Revision History:
  11. --*/
  12. #ifndef _V86EMUL_
  13. #define _V86EMUL_
  14. // begin_ntminiport begin_ntosp
  15. //
  16. // Structures used by the kernel drivers to describe which ports must be
  17. // hooked out directly from the V86 emulator to the driver.
  18. //
  19. typedef enum _EMULATOR_PORT_ACCESS_TYPE {
  20. Uchar,
  21. Ushort,
  22. Ulong
  23. } EMULATOR_PORT_ACCESS_TYPE, *PEMULATOR_PORT_ACCESS_TYPE;
  24. //
  25. // Access Modes
  26. //
  27. #define EMULATOR_READ_ACCESS 0x01
  28. #define EMULATOR_WRITE_ACCESS 0x02
  29. typedef struct _EMULATOR_ACCESS_ENTRY {
  30. ULONG BasePort;
  31. ULONG NumConsecutivePorts;
  32. EMULATOR_PORT_ACCESS_TYPE AccessType;
  33. UCHAR AccessMode;
  34. UCHAR StringSupport;
  35. PVOID Routine;
  36. } EMULATOR_ACCESS_ENTRY, *PEMULATOR_ACCESS_ENTRY;
  37. // end_ntminiport
  38. //
  39. // These are the various function prototypes of the routines that are
  40. // provided by the kernel driver to hook out access to io ports.
  41. //
  42. typedef
  43. NTSTATUS
  44. (*PDRIVER_IO_PORT_UCHAR ) (
  45. IN ULONG_PTR Context,
  46. IN ULONG Port,
  47. IN UCHAR AccessMode,
  48. IN OUT PUCHAR Data
  49. );
  50. typedef
  51. NTSTATUS
  52. (*PDRIVER_IO_PORT_UCHAR_STRING ) (
  53. IN ULONG_PTR Context,
  54. IN ULONG Port,
  55. IN UCHAR AccessMode,
  56. IN OUT PUCHAR Data,
  57. IN ULONG DataLength
  58. );
  59. typedef
  60. NTSTATUS
  61. (*PDRIVER_IO_PORT_USHORT ) (
  62. IN ULONG_PTR Context,
  63. IN ULONG Port,
  64. IN UCHAR AccessMode,
  65. IN OUT PUSHORT Data
  66. );
  67. typedef
  68. NTSTATUS
  69. (*PDRIVER_IO_PORT_USHORT_STRING ) (
  70. IN ULONG_PTR Context,
  71. IN ULONG Port,
  72. IN UCHAR AccessMode,
  73. IN OUT PUSHORT Data,
  74. IN ULONG DataLength // number of words
  75. );
  76. typedef
  77. NTSTATUS
  78. (*PDRIVER_IO_PORT_ULONG ) (
  79. IN ULONG_PTR Context,
  80. IN ULONG Port,
  81. IN UCHAR AccessMode,
  82. IN OUT PULONG Data
  83. );
  84. typedef
  85. NTSTATUS
  86. (*PDRIVER_IO_PORT_ULONG_STRING ) (
  87. IN ULONG_PTR Context,
  88. IN ULONG Port,
  89. IN UCHAR AccessMode,
  90. IN OUT PULONG Data,
  91. IN ULONG DataLength // number of dwords
  92. );
  93. // end_ntosp
  94. #endif // _V86EMUL_