25#define MEM_VGA 0xA0000
26#define MEM_VGA_SIZE 0x20000
32#define MEMORY_MAPPED_IO_OFFSET (0xB8000 - 0xA0000)
42#define VGA_BASE_IO_PORT 0x000003B0
43#define VGA_START_BREAK_PORT 0x000003BB
44#define VGA_END_BREAK_PORT 0x000003C0
45#define VGA_MAX_IO_PORT 0x000003DF
51#define CRTC_ADDRESS_PORT_MONO 0x0004
52#define CRTC_DATA_PORT_MONO 0x0005
53#define FEAT_CTRL_WRITE_PORT_MONO 0x000A
55#define INPUT_STATUS_1_MONO 0x000A
57#define ATT_INITIALIZE_PORT_MONO INPUT_STATUS_1_MONO
61#define ATT_ADDRESS_PORT 0x0010
62#define ATT_DATA_WRITE_PORT 0x0010
65#define ATT_DATA_READ_PORT 0x0011
67#define MISC_OUTPUT_REG_WRITE_PORT 0x0012
69#define INPUT_STATUS_0_PORT 0x0012
71#define VIDEO_SUBSYSTEM_ENABLE_PORT 0x0013
73#define SEQ_ADDRESS_PORT 0x0014
74#define SEQ_DATA_PORT 0x0015
75#define DAC_PIXEL_MASK_PORT 0x0016
76#define DAC_ADDRESS_READ_PORT 0x0017
78#define DAC_STATE_PORT 0x0017
80#define DAC_ADDRESS_WRITE_PORT 0x0018
81#define DAC_DATA_REG_PORT 0x0019
82#define FEAT_CTRL_READ_PORT 0x001A
83#define MISC_OUTPUT_REG_READ_PORT 0x001C
85#define GRAPH_ADDRESS_PORT 0x001E
86#define GRAPH_DATA_PORT 0x001F
88#define CRTC_ADDRESS_PORT_COLOR 0x0024
89#define CRTC_DATA_PORT_COLOR 0x0025
90#define FEAT_CTRL_WRITE_PORT_COLOR 0x002A
91#define INPUT_STATUS_1_COLOR 0x002A
94#define ATT_INITIALIZE_PORT_COLOR INPUT_STATUS_1_COLOR
104#define CRTC_ADDRESS_MONO_OFFSET 0x04
105#define FEAT_CTRL_WRITE_MONO_OFFSET 0x0A
106#define ATT_ADDRESS_OFFSET 0x10
107#define MISC_OUTPUT_REG_WRITE_OFFSET 0x12
108#define VIDEO_SUBSYSTEM_ENABLE_OFFSET 0x13
109#define SEQ_ADDRESS_OFFSET 0x14
110#define DAC_PIXEL_MASK_OFFSET 0x16
111#define DAC_STATE_OFFSET 0x17
112#define DAC_ADDRESS_WRITE_OFFSET 0x18
113#define GRAPH_ADDRESS_OFFSET 0x1E
114#define CRTC_ADDRESS_COLOR_OFFSET 0x24
115#define FEAT_CTRL_WRITE_COLOR_OFFSET 0x2A
123#define IND_CL_EXTS_ENB 0x06
124#define IND_NORD_SCRATCH_PAD 0x09
125#define IND_CL_SCRATCH_PAD 0x0A
126#define IND_ALP_SCRATCH_PAD 0x15
127#define IND_CL_REV_REG 0x25
128#define IND_CL_ID_REG 0x27
130#define IND_CURSOR_START 0x0A
131#define IND_CURSOR_END 0x0B
132#define IND_CURSOR_HIGH_LOC 0x0E
133#define IND_CURSOR_LOW_LOC 0x0F
134#define IND_VSYNC_END 0x11
140#define IND_SET_RESET_ENABLE 0x01
141#define IND_DATA_ROTATE 0x03
142#define IND_READ_MAP 0x04
143#define IND_GRAPH_MODE 0x05
144#define IND_GRAPH_MISC 0x06
145#define IND_BIT_MASK 0x08
146#define IND_SYNC_RESET 0x00
147#define IND_MAP_MASK 0x02
148#define IND_MEMORY_MODE 0x04
149#define IND_CRTC_PROTECT 0x11
151#define IND_CRTC_COMPAT 0x34
153#define IND_PERF_TUNING 0x16
154#define START_SYNC_RESET_VALUE 0x01
156#define END_SYNC_RESET_VALUE 0x03
163#define CL64xx_EXTENSION_ENABLE_INDEX 0x0A
164#define CL64xx_EXTENSION_ENABLE_VALUE 0xEC
165#define CL64xx_EXTENSION_DISABLE_VALUE 0xCE
166#define CL64xx_TRISTATE_CONTROL_REG 0xA1
168#define CL6340_ENABLE_READBACK_REGISTER 0xE0
169#define CL6340_ENABLE_READBACK_ALLSEL_VALUE 0xF0
170#define CL6340_ENABLE_READBACK_OFF_VALUE 0x00
171#define CL6340_IDENTIFICATION_REGISTER 0xE9
177#define VIDEO_DISABLE 0
178#define VIDEO_ENABLE 0x20
180#define INDEX_ENABLE_AUTO_START 0x31
188#define GRAPH_ADDR_MASK 0x0F
189#define SEQ_ADDR_MASK 0x07
195#define CHAIN4_MASK 0x08
203#define READ_MAP_TEST_SETTING 0x03
210#define MEMORY_MODE_TEXT_DEFAULT 0x02
211#define BIT_MASK_DEFAULT 0xFF
212#define READ_MAP_DEFAULT 0x00
223#define VIDEO_MAX_COLOR_REGISTER 0xFF
229#define VIDEO_MAX_PALETTE_REGISTER 0x0F
235#define CAPS_NO_HOST_XFER 0x00000002
237#define CAPS_SW_POINTER 0x00000004
238#define CAPS_TRUE_COLOR 0x00000008
239#define CAPS_MM_IO 0x00000010
240#define CAPS_BLT_SUPPORT 0x00000020
241#define CAPS_IS_542x 0x00000040
242#define CAPS_IS_5436 0x00000080
243#define CAPS_CURSOR_VERT_EXP 0x00000100
287#define DEFAULT_MODE 0
295#define VGA_MAX_VALIDATOR_DATA 100
297#define VGA_VALIDATOR_UCHAR_ACCESS 1
298#define VGA_VALIDATOR_USHORT_ACCESS 2
299#define VGA_VALIDATOR_ULONG_ACCESS 3
311#define VGA_PLANE_SIZE 0x10000
320#define VGA_NUM_SEQUENCER_PORTS 5
321#define VGA_NUM_CRTC_PORTS 25
322#define VGA_NUM_GRAPH_CONT_PORTS 9
323#define VGA_NUM_ATTRIB_CONT_PORTS 21
324#define VGA_NUM_DAC_ENTRIES 256
326#define EXT_NUM_GRAPH_CONT_PORTS 0
327#define EXT_NUM_SEQUENCER_PORTS 0
328#define EXT_NUM_CRTC_PORTS 0
329#define EXT_NUM_ATTRIB_CONT_PORTS 0
330#define EXT_NUM_DAC_ENTRIES 0
338#define VGA_HARDWARE_STATE_SIZE sizeof(VIDEO_HARDWARE_STATE_HEADER)
340#define VGA_BASIC_SEQUENCER_OFFSET (VGA_HARDWARE_STATE_SIZE + 0)
341#define VGA_BASIC_CRTC_OFFSET (VGA_BASIC_SEQUENCER_OFFSET + \
342 VGA_NUM_SEQUENCER_PORTS)
343#define VGA_BASIC_GRAPH_CONT_OFFSET (VGA_BASIC_CRTC_OFFSET + \
345#define VGA_BASIC_ATTRIB_CONT_OFFSET (VGA_BASIC_GRAPH_CONT_OFFSET + \
346 VGA_NUM_GRAPH_CONT_PORTS)
347#define VGA_BASIC_DAC_OFFSET (VGA_BASIC_ATTRIB_CONT_OFFSET + \
348 VGA_NUM_ATTRIB_CONT_PORTS)
349#define VGA_BASIC_LATCHES_OFFSET (VGA_BASIC_DAC_OFFSET + \
350 (3 * VGA_NUM_DAC_ENTRIES))
352#define VGA_EXT_SEQUENCER_OFFSET (VGA_BASIC_LATCHES_OFFSET + 4)
353#define VGA_EXT_CRTC_OFFSET (VGA_EXT_SEQUENCER_OFFSET + \
354 EXT_NUM_SEQUENCER_PORTS)
355#define VGA_EXT_GRAPH_CONT_OFFSET (VGA_EXT_CRTC_OFFSET + \
357#define VGA_EXT_ATTRIB_CONT_OFFSET (VGA_EXT_GRAPH_CONT_OFFSET +\
358 EXT_NUM_GRAPH_CONT_PORTS)
359#define VGA_EXT_DAC_OFFSET (VGA_EXT_ATTRIB_CONT_OFFSET + \
360 EXT_NUM_ATTRIB_CONT_PORTS)
362#define VGA_VALIDATOR_OFFSET (VGA_EXT_DAC_OFFSET + 4 * EXT_NUM_DAC_ENTRIES)
364#define VGA_VALIDATOR_AREA_SIZE sizeof (ULONG) + (VGA_MAX_VALIDATOR_DATA * \
365 sizeof (VGA_VALIDATOR_DATA)) + \
368 sizeof (PVIDEO_ACCESS_RANGE)
370#define VGA_MISC_DATA_AREA_OFFSET VGA_VALIDATOR_OFFSET + VGA_VALIDATOR_AREA_SIZE
372#define VGA_MISC_DATA_AREA_SIZE 0
374#define VGA_PLANE_0_OFFSET VGA_MISC_DATA_AREA_OFFSET + VGA_MISC_DATA_AREA_SIZE
376#define VGA_PLANE_1_OFFSET VGA_PLANE_0_OFFSET + VGA_PLANE_SIZE
377#define VGA_PLANE_2_OFFSET VGA_PLANE_1_OFFSET + VGA_PLANE_SIZE
378#define VGA_PLANE_3_OFFSET VGA_PLANE_2_OFFSET + VGA_PLANE_SIZE
384#define VGA_TOTAL_STATE_SIZE VGA_PLANE_3_OFFSET + VGA_PLANE_SIZE
443#define NUM_VGA_ACCESS_RANGES 5
448#define VESA_MAGIC ('V' + ('E' << 8) + ('S' << 16) + ('A' << 24))
PHYSICAL_ADDRESS PhysicalFrameOffset
PUCHAR VideoMemoryAddress
ULONG PhysicalFrameLength
UCHAR CursorBottomScanLine
VIDEO_PORT_INT10_INTERFACE Int10Interface
PHYSICAL_ADDRESS PhysicalVideoMemoryBase
VIDEO_CURSOR_POSITION CursorPosition
ULONG PhysicalVideoMemoryLength
struct _VGA_VALIDATOR_DATA * PVGA_VALIDATOR_DATA
struct VIDEOMODE * PVIDEOMODE
struct _VGA_VALIDATOR_DATA VGA_VALIDATOR_DATA
VIDEO_ACCESS_RANGE VgaAccessRange[]
struct _HW_DEVICE_EXTENSION * PHW_DEVICE_EXTENSION
struct _HW_DEVICE_EXTENSION HW_DEVICE_EXTENSION
USHORT DisableA000Color[]