Windows NT 4.0 source code leak
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.

158 lines
4.4 KiB

4 years ago
  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. jxvideo.h
  5. Abstract:
  6. This module implements contains definitions for the interface with
  7. the video prom initialization code.
  8. Author:
  9. Lluis Abello (lluis) 16-Jul-1992
  10. Environment:
  11. Kernel mode.
  12. Revision History:
  13. --*/
  14. #ifndef _JXVIDEO_
  15. #define _JXVIDEO_
  16. // The video PROM contains the following structure starting at offset zero
  17. // from the PROM base address. Each entry is 8 bytes wide with the low byte
  18. // containing data and the upper 7 bytes reserved.
  19. //
  20. // 63 8 7 0 Offset
  21. // +------------------+ +------------------+
  22. // | reserved | | Board_Identifier | 0x00
  23. // +------------------+ +------------------+
  24. // | reserved | | PROM_Stride | 0x08
  25. // +------------------+ +------------------+
  26. // | reserved | | PROM_Width | 0x10
  27. // +------------------+ +------------------+
  28. // | reserved | | PROM_Size | 0x18
  29. // +------------------+ +------------------+
  30. // | reserved | | Test_Byte_0 | 0x20
  31. // +------------------+ +------------------+
  32. // | reserved | | Test_Byte_1 | 0x28
  33. // +------------------+ +------------------+
  34. // | reserved | | Test_Byte_2 | 0x30
  35. // +------------------+ +------------------+
  36. // | reserved | | Test_Byte_3 | 0x38
  37. // +------------------+ +------------------+
  38. //
  39. //
  40. // Board_Identifier - supplies two bytes identifying the video board.
  41. //
  42. // PROM_Stride - supplies the stride of the PROM in bytes. Possible
  43. // values are:
  44. //
  45. // 1 - data every byte
  46. // 2 - data every 2 bytes
  47. // 4 - data every 4 bytes
  48. // 8 - data every 8 bytes
  49. //
  50. // PROM_Width - supplies the width of the PROM in bytes. Possible values
  51. // are:
  52. //
  53. // 1 - 1 byte wide
  54. // 2 - 2 bytes wide
  55. // 4 - 4 bytes wide
  56. // 8 - 8 bytes wide
  57. //
  58. // PROM_Size - supplies the size of the PROM in 4 KByte pages.
  59. //
  60. // Test_Bytes_[3:0] - supplies a test pattern ("Jazz").
  61. //
  62. // This strucure viewed from the video prom, i.e. the system
  63. //prom reads it taking into account PROM_Stride and PROM_Width
  64. //follows:
  65. //
  66. //typedef struct _VIDEO_PROM_CONFIGURATION {
  67. // ULONG VideoMemorySize;
  68. // ULONG VideoControlSize;
  69. // ULONG CodeOffset;
  70. // ULONG CodeSize;
  71. //} VIDEO_PROM_CONFIGURATION; *PVIDEO_PROM_CONFIGURATION;
  72. //
  73. //
  74. // VideoMemorySize - Supplies the size of video memory in bytes
  75. //
  76. // VideoControlSize - Supplies the size of video control in bytes
  77. //
  78. // CodeOffset - Supplies the offset in bytes from the beginning
  79. // of the video prom to the first byte of code which
  80. // is also the entry point of the initialization routine.
  81. //
  82. // CodeSize - Supplies the size of the code in bytes.
  83. //
  84. //
  85. //
  86. // Following this structure there is a IdentifierString -
  87. // Zero terminated string that identifies the video card "JazzG364", "
  88. // JazzVXL" ...
  89. typedef struct _VIDEO_PROM_CONFIGURATION {
  90. ULONG VideoMemorySize;
  91. ULONG VideoControlSize;
  92. ULONG CodeOffset;
  93. ULONG CodeSize;
  94. } VIDEO_PROM_CONFIGURATION, *PVIDEO_PROM_CONFIGURATION;
  95. typedef struct _VIDEO_VIRTUAL_SPACE {
  96. ULONG MemoryVirtualBase;
  97. ULONG ControlVirtualBase;
  98. } VIDEO_VIRTUAL_SPACE, *PVIDEO_VIRTUAL_SPACE;
  99. typedef
  100. ARC_STATUS
  101. (*PVIDEO_INITIALIZE_ROUTINE) (
  102. IN PVIDEO_VIRTUAL_SPACE VideoAdr,
  103. IN PMONITOR_CONFIGURATION_DATA VideoConfig
  104. );
  105. #define InitializeVideo(VideoAdr, VideoConfig) \
  106. ((PVIDEO_INITIALIZE_ROUTINE)(VIDEO_PROM_CODE_VIRTUAL_BASE)) \
  107. ((VideoAdr), (VideoConfig))
  108. ARC_STATUS
  109. InitializeVideoFromProm(
  110. IN PMONITOR_CONFIGURATION_DATA Monitor
  111. );
  112. //
  113. // Define colors, HI = High Intensity
  114. //
  115. #define FW_COLOR_BLACK 0x00
  116. #define FW_COLOR_RED 0x01
  117. #define FW_COLOR_GREEN 0x02
  118. #define FW_COLOR_YELLOW 0x03
  119. #define FW_COLOR_BLUE 0x04
  120. #define FW_COLOR_MAGENTA 0x05
  121. #define FW_COLOR_CYAN 0x06
  122. #define FW_COLOR_WHITE 0x07
  123. #define FW_COLOR_HI_BLACK 0x08
  124. #define FW_COLOR_HI_RED 0x09
  125. #define FW_COLOR_HI_GREEN 0x0A
  126. #define FW_COLOR_HI_YELLOW 0x0B
  127. #define FW_COLOR_HI_BLUE 0x0C
  128. #define FW_COLOR_HI_MAGENTA 0x0D
  129. #define FW_COLOR_HI_CYAN 0x0E
  130. #define FW_COLOR_HI_WHITE 0x0F
  131. #endif