|
|
1.1 root 1: /*++
2:
3: Copyright (c) 1992 Microsoft Corporation
4:
5: Module Name:
6:
7: wddata.h
8:
9: Abstract:
10:
11: This module contains all the global data used by the Western Digital driver.
12:
13: Environment:
14:
15: Kernel mode
16:
17: Revision History:
18:
19:
20: --*/
21:
22: //
23: // This structure describes to which ports access is required.
24: //
25:
26: #define NUM_WD_ACCESS_RANGES 4
27: #define NUM_VGA_ACCESS_RANGES 3
28:
29: VIDEO_ACCESS_RANGE VgaAccessRange[] = {
30: {
31: VGA_BASE_IO_PORT, 0x00000000, // 64-bit linear base address
32: // of range
33: VGA_START_BREAK_PORT - VGA_BASE_IO_PORT + 1, // # of ports
34: 1, // range is in I/O space
35: 1, // range should be visible
36: 0 // range should be shareable
37: },
38: {
39: VGA_END_BREAK_PORT, 0x00000000,
40: VGA_MAX_IO_PORT - VGA_END_BREAK_PORT + 1,
41: 1,
42: 1,
43: 0
44: },
45: {
46: 0x000A0000, 0x00000000,
47: 0x00020000,
48: 0,
49: 1,
50: 0
51: },
52: //
53: // These are extended registers found only on SOME advanced WD cards.
54: // so try to map them in if possible
55: //
56: {
57: WD_EXT_PORT_START, 0x00000000,
58: WD_EXT_PORT_END - WD_EXT_PORT_START + 1,
59: 1,
60: 1,
61: 0
62: }
63: };
64:
65:
66:
67: //
68: // Validator Port list.
69: // This structure describes all the ports that must be hooked out of the V86
70: // emulator when a DOS app goes to full-screen mode.
71: // The structure determines to which routine the data read or written to a
72: // specific port should be sent.
73: //
74:
75: #define VGA_NUM_EMULATOR_ACCESS_ENTRIES 6
76:
77: EMULATOR_ACCESS_ENTRY VgaEmulatorAccessEntries[] = {
78:
79: //
80: // Traps for byte OUTs.
81: //
82:
83: {
84: 0x000003b0, // range start I/O address
85: 0xC, // range length
86: Uchar, // access size to trap
87: EMULATOR_READ_ACCESS | EMULATOR_WRITE_ACCESS, // types of access to trap
88: FALSE, // does not support string accesses
89: (PVOID)VgaValidatorUcharEntry // routine to which to trap
90: },
91:
92: {
93: 0x000003c0, // range start I/O address
94: 0x20, // range length
95: Uchar, // access size to trap
96: EMULATOR_READ_ACCESS | EMULATOR_WRITE_ACCESS, // types of access to trap
97: FALSE, // does not support string accesses
98: (PVOID)VgaValidatorUcharEntry // routine to which to trap
99: },
100:
101: //
102: // Traps for word OUTs.
103: //
104:
105: {
106: 0x000003b0,
107: 0x06,
108: Ushort,
109: EMULATOR_READ_ACCESS | EMULATOR_WRITE_ACCESS,
110: FALSE,
111: (PVOID)VgaValidatorUshortEntry
112: },
113:
114: {
115: 0x000003c0,
116: 0x10,
117: Ushort,
118: EMULATOR_READ_ACCESS | EMULATOR_WRITE_ACCESS,
119: FALSE,
120: (PVOID)VgaValidatorUshortEntry
121: },
122:
123: //
124: // Traps for dword OUTs.
125: //
126:
127: {
128: 0x000003b0,
129: 0x03,
130: Ulong,
131: EMULATOR_READ_ACCESS | EMULATOR_WRITE_ACCESS,
132: FALSE,
133: (PVOID)VgaValidatorUlongEntry
134: },
135:
136: {
137: 0x000003c0,
138: 0x08,
139: Ulong,
140: EMULATOR_READ_ACCESS | EMULATOR_WRITE_ACCESS,
141: FALSE,
142: (PVOID)VgaValidatorUlongEntry
143: }
144:
145: };
146:
147:
148: //
149: // Used to trap only the sequncer and the misc output registers
150: //
151:
152: #define NUM_MINIMAL_VGA_VALIDATOR_ACCESS_RANGE 4
153:
154: VIDEO_ACCESS_RANGE MinimalVgaValidatorAccessRange[] = {
155: {
156: VGA_BASE_IO_PORT, 0x00000000,
157: VGA_START_BREAK_PORT - VGA_BASE_IO_PORT + 1,
158: 1,
159: 1, // <- enable range IOPM so that it is not trapped.
160: 0
161: },
162: {
163: VGA_END_BREAK_PORT, 0x00000000,
164: VGA_MAX_IO_PORT - VGA_END_BREAK_PORT + 1,
165: 1,
166: 1,
167: 0
168: },
169: {
170: VGA_BASE_IO_PORT + MISC_OUTPUT_REG_WRITE_PORT, 0x00000000,
171: 0x00000001,
172: 1,
173: 0,
174: 0
175: },
176: {
177: VGA_BASE_IO_PORT + SEQ_ADDRESS_PORT, 0x00000000,
178: 0x00000002,
179: 1,
180: 0,
181: 0
182: }
183: };
184:
185: //
186: // Used to trap all registers
187: //
188:
189: #define NUM_FULL_VGA_VALIDATOR_ACCESS_RANGE 2
190:
191: VIDEO_ACCESS_RANGE FullVgaValidatorAccessRange[] = {
192: {
193: VGA_BASE_IO_PORT, 0x00000000,
194: VGA_START_BREAK_PORT - VGA_BASE_IO_PORT + 1,
195: 1,
196: 0, // <- disable range in the IOPM so that it is trapped.
197: 0
198: },
199: {
200: VGA_END_BREAK_PORT, 0x00000000,
201: VGA_MAX_IO_PORT - VGA_END_BREAK_PORT + 1,
202: 1,
203: 0,
204: 0
205: }
206: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.