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.

126 lines
4.4 KiB

  1. /*++
  2. Copyright (c) 1992-1995 Microsoft Corporation
  3. Module Name:
  4. cmdcnst.h
  5. Abstract:
  6. This is the command string interpreter definitions
  7. Environment:
  8. kernel mode only
  9. Notes:
  10. Revision History:
  11. --*/
  12. //--------------------------------------------------------------------------
  13. // Definition of the set/clear mode command language.
  14. //
  15. // Each command is composed of a major portion and a minor portion.
  16. // The major portion of a command can be found in the most significant
  17. // nibble of a command byte, while the minor portion is in the least
  18. // significant portion of a command byte.
  19. //
  20. // maj minor Description
  21. // ---- ----- --------------------------------------------
  22. // 00 End of data
  23. //
  24. // 10 in and out type commands as described by flags
  25. // flags:
  26. //
  27. // xxxx
  28. // ||||
  29. // |||+-------- unused
  30. // ||+--------- 0/1 single/multiple values to output
  31. // |+---------- 0/1 8/16 bit operation
  32. // +----------- 0/1 out/in instruction
  33. //
  34. // Outs
  35. // ----------------------------------------------
  36. // 0 reg:W val:B
  37. // 2 reg:W cnt:W val1:B val2:B...valN:B
  38. // 4 reg:W val:W
  39. // 6 reg:W cnt:W val1:W val2:W...valN:W
  40. //
  41. // Ins
  42. // ----------------------------------------------
  43. // 8 reg:W
  44. // a reg:W cnt:W
  45. // c reg:W
  46. // e reg:W cnt:W
  47. //
  48. // 20 Special purpose outs
  49. // 00 do indexed outs for seq, crtc, and gdc
  50. // indexreg:W cnt:B startindex:B val1:B val2:B...valN:B
  51. // 01 do indexed outs for atc
  52. // index-data_reg:W cnt:B startindex:B val1:B val2:B...valN:B
  53. // 02 do masked outs
  54. // indexreg:W andmask:B xormask:B
  55. //
  56. // 40 Select Access Range
  57. // 00 Registers is range 3c0-3cf
  58. // 01 Registers in range 3d4-3df
  59. // 02 Registers in range 4ae8-4ae9
  60. //
  61. // 50 Misc.
  62. // 00 Reset CRTC 5C register to POST value
  63. //
  64. // F0 Nop
  65. //
  66. //---------------------------------------------------------------------------
  67. // some useful equates - major commands
  68. #define EOD 0x000 // end of data
  69. #define INOUT 0x010 // do ins or outs
  70. #define METAOUT 0x020 // do special types of outs
  71. #define SELECTACCESSRANGE 0x040 // select access range
  72. #define NCMD 0x0f0 // Nop command
  73. // flags for INOUT major command
  74. //#define UNUSED 0x01 // reserved
  75. #define MULTI 0x02 // multiple or single ins/outs
  76. #define BW 0x04 // byte/word size of operation
  77. #define IO 0x08 // out/in instruction
  78. // minor commands for metout
  79. #define INDXOUT 0x00 // do indexed outs
  80. #define ATCOUT 0x01 // do indexed outs for atc
  81. #define MASKOUT 0x02 // do masked outs using and-xor masks
  82. #define VBLANK 0x03 // Wait for Vertical Blank Interval
  83. #define SETCLK 0x04 // Set the OEM Clock.
  84. #define SETCRTC 0x05 // Set the OEM CRTC values.
  85. #define BUSTEST 0x06 // 928 bus test
  86. #define DELAY 0x07 // delay in microseconds
  87. // Register ranges for the select access range command
  88. #define VARIOUSVGA 0x00 // registers in range 3c0-3cf
  89. #define SYSTEMCONTROL 0x01 // registers in range 3d4-3df
  90. #define ADVANCEDFUNCTIONCONTROL 0x02 // registers in range 4ae8-4ae9
  91. // composite inout type commands
  92. #define OB (INOUT) // output 8 bit value
  93. #define OBM (INOUT+MULTI) // output multiple bytes
  94. #define OW (INOUT+BW) // output single word value
  95. #define OWM (INOUT+BW+MULTI) // output multiple words
  96. #define IB (INOUT+IO) // input byte
  97. #define IBM (INOUT+IO+MULTI) // input multiple bytes
  98. #define IW (INOUT+IO+BW) // input word
  99. #define IWM (INOUT+IO+BW+MULTI) // input multiple words
  100. // Misc
  101. #define RESET_CR5C 0x50 // reset CR5C value to POST value