mirror of https://github.com/lianthony/NT4.0
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.
193 lines
4.0 KiB
193 lines
4.0 KiB
/*++
|
|
|
|
Copyright (c) 1992-1993 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
avgadata.h
|
|
|
|
Abstract:
|
|
|
|
This module contains all the global data used by the VGA driver.
|
|
|
|
Environment:
|
|
|
|
Kernel mode
|
|
|
|
Revision History:
|
|
|
|
|
|
--*/
|
|
|
|
//
|
|
// This structure describes to which ports access is required.
|
|
//
|
|
|
|
#define NUM_VGA_ACCESS_RANGES 3
|
|
|
|
VIDEO_ACCESS_RANGE VgaAccessRange[] = {
|
|
{
|
|
VGA_BASE_IO_PORT, 0x00000000, // 64-bit linear base address
|
|
// of range
|
|
VGA_START_BREAK_PORT - VGA_BASE_IO_PORT + 1, // # of ports
|
|
1, // range is in I/O space
|
|
1, // range should be visible
|
|
0 // range should NOT be shareable
|
|
},
|
|
{
|
|
VGA_END_BREAK_PORT, 0x00000000,
|
|
VGA_MAX_IO_PORT - VGA_END_BREAK_PORT + 1,
|
|
1,
|
|
1,
|
|
0
|
|
},
|
|
{
|
|
0x000A0000, 0x00000000,
|
|
0x00020000,
|
|
0,
|
|
1,
|
|
0
|
|
}
|
|
};
|
|
|
|
|
|
//
|
|
// Validator Port list.
|
|
// This structure describes all the ports that must be hooked out of the V86
|
|
// emulator when a DOS app goes to full-screen mode.
|
|
// The structure determines to which routine the data read or written to a
|
|
// specific port should be sent.
|
|
//
|
|
|
|
#define VGA_NUM_EMULATOR_ACCESS_ENTRIES 6
|
|
|
|
EMULATOR_ACCESS_ENTRY VgaEmulatorAccessEntries[] = {
|
|
|
|
//
|
|
// Traps for byte OUTs.
|
|
//
|
|
|
|
{
|
|
0x000003b0, // range start I/O address
|
|
0xC, // range length
|
|
Uchar, // access size to trap
|
|
EMULATOR_READ_ACCESS | EMULATOR_WRITE_ACCESS, // types of access to trap
|
|
FALSE, // does not support string accesses
|
|
(PVOID)VgaValidatorUcharEntry // routine to which to trap
|
|
},
|
|
|
|
{
|
|
0x000003c0, // range start I/O address
|
|
0x20, // range length
|
|
Uchar, // access size to trap
|
|
EMULATOR_READ_ACCESS | EMULATOR_WRITE_ACCESS, // types of access to trap
|
|
FALSE, // does not support string accesses
|
|
(PVOID)VgaValidatorUcharEntry // routine to which to trap
|
|
},
|
|
|
|
//
|
|
// Traps for word OUTs.
|
|
//
|
|
|
|
{
|
|
0x000003b0,
|
|
0x06,
|
|
Ushort,
|
|
EMULATOR_READ_ACCESS | EMULATOR_WRITE_ACCESS,
|
|
FALSE,
|
|
(PVOID)VgaValidatorUshortEntry
|
|
},
|
|
|
|
{
|
|
0x000003c0,
|
|
0x10,
|
|
Ushort,
|
|
EMULATOR_READ_ACCESS | EMULATOR_WRITE_ACCESS,
|
|
FALSE,
|
|
(PVOID)VgaValidatorUshortEntry
|
|
},
|
|
|
|
//
|
|
// Traps for dword OUTs.
|
|
//
|
|
|
|
{
|
|
0x000003b0,
|
|
0x03,
|
|
Ulong,
|
|
EMULATOR_READ_ACCESS | EMULATOR_WRITE_ACCESS,
|
|
FALSE,
|
|
(PVOID)VgaValidatorUlongEntry
|
|
},
|
|
|
|
{
|
|
0x000003c0,
|
|
0x08,
|
|
Ulong,
|
|
EMULATOR_READ_ACCESS | EMULATOR_WRITE_ACCESS,
|
|
FALSE,
|
|
(PVOID)VgaValidatorUlongEntry
|
|
}
|
|
|
|
};
|
|
|
|
|
|
//
|
|
// Used to trap only the sequncer and the misc output registers
|
|
//
|
|
|
|
#define NUM_MINIMAL_VGA_VALIDATOR_ACCESS_RANGE 4
|
|
|
|
VIDEO_ACCESS_RANGE MinimalVgaValidatorAccessRange[] = {
|
|
{
|
|
VGA_BASE_IO_PORT, 0x00000000,
|
|
VGA_START_BREAK_PORT - VGA_BASE_IO_PORT + 1,
|
|
1,
|
|
1, // <- enable range IOPM so that it is not trapped.
|
|
1
|
|
},
|
|
{
|
|
VGA_END_BREAK_PORT, 0x00000000,
|
|
VGA_MAX_IO_PORT - VGA_END_BREAK_PORT + 1,
|
|
1,
|
|
1,
|
|
1
|
|
},
|
|
{
|
|
VGA_BASE_IO_PORT + MISC_OUTPUT_REG_WRITE_PORT, 0x00000000,
|
|
0x00000001,
|
|
1,
|
|
0,
|
|
1
|
|
},
|
|
{
|
|
VGA_BASE_IO_PORT + SEQ_ADDRESS_PORT, 0x00000000,
|
|
0x00000002,
|
|
1,
|
|
0,
|
|
1
|
|
}
|
|
};
|
|
|
|
//
|
|
// Used to trap all registers
|
|
//
|
|
|
|
#define NUM_FULL_VGA_VALIDATOR_ACCESS_RANGE 2
|
|
|
|
VIDEO_ACCESS_RANGE FullVgaValidatorAccessRange[] = {
|
|
{
|
|
VGA_BASE_IO_PORT, 0x00000000,
|
|
VGA_START_BREAK_PORT - VGA_BASE_IO_PORT + 1,
|
|
1,
|
|
0, // <- disable range in the IOPM so that it is trapped.
|
|
1
|
|
},
|
|
{
|
|
VGA_END_BREAK_PORT, 0x00000000,
|
|
VGA_MAX_IO_PORT - VGA_END_BREAK_PORT + 1,
|
|
1,
|
|
0,
|
|
1
|
|
}
|
|
};
|