Further version syncing...

svn path=/trunk/; revision=6384
This commit is contained in:
Robert Dickenson 2003-10-20 12:48:19 +00:00
parent c42c8aa58a
commit 139847baad
3 changed files with 402 additions and 215 deletions

View file

@ -1,19 +1,54 @@
/*
* MINIPORT.H - miniport driver interface header
* miniport.h
*
* Type definitions for miniport drivers
*
* This file is part of the w32api package.
*
* Contributors:
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#define EMULATOR_READ_ACCESS 0x00000001
#define EMULATOR_WRITE_ACCESS 0x00000002
#ifndef __MINIPORT_H
#define __MINIPORT_H
typedef enum _EMULATOR_PORT_ACCESS_TYPE
{
#if __GNUC__ >=3
#pragma GCC system_header
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define DDKAPI
#pragma pack(push,4)
#include "ntddk.h"
#define EMULATOR_READ_ACCESS 0x01
#define EMULATOR_WRITE_ACCESS 0x02
typedef enum _EMULATOR_PORT_ACCESS_TYPE {
Uchar,
Ushort,
Ulong
} EMULATOR_PORT_ACCESS_TYPE, *PEMULATOR_PORT_ACCESS_TYPE;
typedef struct _EMULATOR_ACCESS_ENTRY
{
typedef struct _EMULATOR_ACCESS_ENTRY {
ULONG BasePort;
ULONG NumConsecutivePorts;
EMULATOR_PORT_ACCESS_TYPE AccessType;
@ -22,4 +57,31 @@ typedef struct _EMULATOR_ACCESS_ENTRY
PVOID Routine;
} EMULATOR_ACCESS_ENTRY, *PEMULATOR_ACCESS_ENTRY;
#ifndef VIDEO_ACCESS_RANGE_DEFINED /* also in video.h */
#define VIDEO_ACCESS_RANGE_DEFINED
typedef struct _VIDEO_ACCESS_RANGE {
PHYSICAL_ADDRESS RangeStart;
ULONG RangeLength;
UCHAR RangeInIoSpace;
UCHAR RangeVisible;
UCHAR RangeShareable;
UCHAR RangePassive;
} VIDEO_ACCESS_RANGE, *PVIDEO_ACCESS_RANGE;
#endif
#ifndef BANKED_SECTION_ROUTINE_DEFINED /* also in video.h */
#define BANKED_SECTION_ROUTINE_DEFINED
typedef VOID DDKAPI
(*PBANKED_SECTION_ROUTINE)(
IN ULONG ReadBank,
IN ULONG WriteBank,
IN PVOID Context);
#endif
#pragma pack(pop)
#ifdef __cplusplus
}
#endif
#endif /* __MINIPORT_H */

View file

@ -1,4 +1,4 @@
/* $Id: ntddscsi.h,v 1.4 2003/08/27 21:28:08 dwelch Exp $
/* $Id: ntddscsi.h,v 1.5 2003/10/20 12:48:19 robd Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -7,89 +7,59 @@
* PROGRAMMER: Eric Kohl (ekohl@rz-online.de)
*/
#ifndef __STORAGE_INCLUDE_NTDDSCSI_H
#define __STORAGE_INCLUDE_NTDDSCSI_H
#ifndef __NTDDSCSI_H
#define __NTDDSCSI_H
#if __GNUC__ >=3
#pragma GCC system_header
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma pack(push,4)
#include "ntddk.h"
#define DD_SCSI_DEVICE_NAME "\\Device\\ScsiPort"
#define DD_SCSI_DEVICE_NAME_U L"\\Device\\ScsiPort"
#define IOCTL_SCSI_BASE FILE_DEVICE_CONTROLLER
/* IOCTL codes */
#define IOCTL_SCSI_PASS_THROUGH \
CTL_CODE(FILE_DEVICE_CONTROLLER, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_SCSI_MINIPORT \
CTL_CODE(FILE_DEVICE_CONTROLLER, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_SCSI_GET_INQUIRY_DATA \
CTL_CODE(FILE_DEVICE_CONTROLLER, 0x0403, METHOD_BUFFERED, FILE_ANY_ACCESS)
CTL_CODE(IOCTL_SCSI_BASE, 0x0403, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_SCSI_GET_CAPABILITIES \
CTL_CODE(FILE_DEVICE_CONTROLLER, 0x0404, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_SCSI_PASS_THROUGH_DIRECT \
CTL_CODE(FILE_DEVICE_CONTROLLER, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
CTL_CODE(IOCTL_SCSI_BASE, 0x0404, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_SCSI_GET_ADDRESS \
CTL_CODE(FILE_DEVICE_CONTROLLER, 0x0406, METHOD_BUFFERED, FILE_ANY_ACCESS)
CTL_CODE(IOCTL_SCSI_BASE, 0x0406, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_SCSI_MINIPORT \
CTL_CODE(IOCTL_SCSI_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_SCSI_PASS_THROUGH \
CTL_CODE(IOCTL_SCSI_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_SCSI_PASS_THROUGH_DIRECT \
CTL_CODE(IOCTL_SCSI_BASE, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_SCSI_RESCAN_BUS \
CTL_CODE(FILE_DEVICE_CONTROLLER, 0x0407, METHOD_BUFFERED, FILE_ANY_ACCESS)
CTL_CODE(IOCTL_SCSI_BASE, 0x0407, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_SCSI_GET_DUMP_POINTERS \
CTL_CODE(FILE_DEVICE_CONTROLLER, 0x0408, METHOD_BUFFERED, FILE_ANY_ACCESS)
/* Used by IOCTL_SCSI_GET_CAPABILITIES */
typedef struct _IO_SCSI_CAPABILITIES
{
ULONG Length;
ULONG MaximumTransferLength;
ULONG MaximumPhysicalPages;
ULONG SupportedAsynchronousEvents;
ULONG AlignmentMask;
BOOLEAN TaggedQueuing;
BOOLEAN AdapterScansDown;
BOOLEAN AdapterUsesPio;
} IO_SCSI_CAPABILITIES, *PIO_SCSI_CAPABILITIES;
/* Used by IOCTL_SCSI_GET_INQUIRY_DATA */
typedef struct _SCSI_BUS_DATA
{
UCHAR NumberOfLogicalUnits;
UCHAR InitiatorBusId;
ULONG InquiryDataOffset;
}SCSI_BUS_DATA, *PSCSI_BUS_DATA;
typedef struct _SCSI_ADAPTER_BUS_INFO
{
UCHAR NumberOfBuses;
SCSI_BUS_DATA BusData[1];
} SCSI_ADAPTER_BUS_INFO, *PSCSI_ADAPTER_BUS_INFO;
typedef struct _SCSI_INQUIRY_DATA
{
UCHAR PathId;
UCHAR TargetId;
UCHAR Lun;
BOOLEAN DeviceClaimed;
ULONG InquiryDataLength;
ULONG NextInquiryDataOffset;
UCHAR InquiryData[1];
}SCSI_INQUIRY_DATA, *PSCSI_INQUIRY_DATA;
/* Used by IOCTL_SCSI_GET_ADDRESS */
typedef struct _SCSI_ADDRESS
{
ULONG Length;
UCHAR PortNumber;
UCHAR PathId;
UCHAR TargetId;
UCHAR Lun;
} SCSI_ADDRESS, *PSCSI_ADDRESS;
/* Used by IOCTL_SCSI_PASS_THROUGH */
typedef struct _SCSI_PASS_THROUGH
{
typedef struct _SCSI_PASS_THROUGH {
USHORT Length;
UCHAR ScsiStatus;
UCHAR PathId;
@ -108,8 +78,7 @@ typedef struct _SCSI_PASS_THROUGH
/* Used by IOCTL_SCSI_PASS_THROUGH_DIRECT */
typedef struct _SCSI_PASS_THROUGH_DIRECT
{
typedef struct _SCSI_PASS_THROUGH_DIRECT {
USHORT Length;
UCHAR ScsiStatus;
UCHAR PathId;
@ -125,6 +94,60 @@ typedef struct _SCSI_PASS_THROUGH_DIRECT
UCHAR Cdb[16];
} SCSI_PASS_THROUGH_DIRECT, *PSCSI_PASS_THROUGH_DIRECT;
typedef struct _SRB_IO_CONTROL {
ULONG HeaderLength;
UCHAR Signature[8];
ULONG Timeout;
ULONG ControlCode;
ULONG ReturnCode;
ULONG Length;
} SRB_IO_CONTROL, *PSRB_IO_CONTROL;
/* Used by IOCTL_SCSI_GET_ADDRESS */
typedef struct _SCSI_ADDRESS {
ULONG Length;
UCHAR PortNumber;
UCHAR PathId;
UCHAR TargetId;
UCHAR Lun;
} SCSI_ADDRESS, *PSCSI_ADDRESS;
typedef struct _SCSI_BUS_DATA {
UCHAR NumberOfLogicalUnits;
UCHAR InitiatorBusId;
ULONG InquiryDataOffset;
}SCSI_BUS_DATA, *PSCSI_BUS_DATA;
typedef struct _SCSI_ADAPTER_BUS_INFO {
UCHAR NumberOfBuses;
SCSI_BUS_DATA BusData[1];
} SCSI_ADAPTER_BUS_INFO, *PSCSI_ADAPTER_BUS_INFO;
/* Used by IOCTL_SCSI_GET_CAPABILITIES */
typedef struct _IO_SCSI_CAPABILITIES {
ULONG Length;
ULONG MaximumTransferLength;
ULONG MaximumPhysicalPages;
ULONG SupportedAsynchronousEvents;
ULONG AlignmentMask;
BOOLEAN TaggedQueuing;
BOOLEAN AdapterScansDown;
BOOLEAN AdapterUsesPio;
} IO_SCSI_CAPABILITIES, *PIO_SCSI_CAPABILITIES;
/* Used by IOCTL_SCSI_GET_INQUIRY_DATA */
typedef struct _SCSI_INQUIRY_DATA {
UCHAR PathId;
UCHAR TargetId;
UCHAR Lun;
BOOLEAN DeviceClaimed;
ULONG InquiryDataLength;
ULONG NextInquiryDataOffset;
UCHAR InquiryData[1];
}SCSI_INQUIRY_DATA, *PSCSI_INQUIRY_DATA;
/* Pass through DataIn */
@ -132,11 +155,25 @@ typedef struct _SCSI_PASS_THROUGH_DIRECT
#define SCSI_IOCTL_DATA_IN 1
#define SCSI_IOCTL_DATA_UNSPECIFIED 2
typedef struct _DUMP_POINTERS
{
typedef struct _DUMP_POINTERS {
PADAPTER_OBJECT AdapterObject;
PVOID MappedRegisterBase;
PVOID DumpData;
PVOID CommonBufferVa;
LARGE_INTEGER CommonBufferPa;
ULONG CommonBufferSize;
BOOLEAN AllocateCommonBuffers;
BOOLEAN UseDiskDump;
UCHAR Spare1[2];
PVOID DeviceObject;
} DUMP_POINTERS, *PDUMP_POINTERS;
#endif /* __STORAGE_INCLUDE_NTDDSCSI_H */
#pragma pack(pop)
/* EOF */
#ifdef __cplusplus
}
#endif
#endif /* __NTDDSCSI_H */

View file

@ -27,9 +27,144 @@
* interrupts are handled the same as KM drivers.
*/
#ifndef __NTDDVID_H
#define __NTDDVID_H
#if __GNUC__ >=3
#pragma GCC system_header
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma pack(push,4)
#include "ntddk.h"
typedef LONG VP_STATUS, *PVP_STATUS;
#define IOCTL_VIDEO_DISABLE_CURSOR \
CTL_CODE(FILE_DEVICE_VIDEO, 24, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_DISABLE_POINTER \
CTL_CODE(FILE_DEVICE_VIDEO, 15, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_ENABLE_CURSOR \
CTL_CODE(FILE_DEVICE_VIDEO, 25, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_ENABLE_POINTER \
CTL_CODE(FILE_DEVICE_VIDEO, 16, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_FREE_PUBLIC_ACCESS_RANGES \
CTL_CODE(FILE_DEVICE_VIDEO, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_GET_BANK_SELECT_CODE \
CTL_CODE(FILE_DEVICE_VIDEO, 30, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_GET_POWER_MANAGEMENT \
CTL_CODE(FILE_DEVICE_VIDEO, 11, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_LOAD_AND_SET_FONT \
CTL_CODE(FILE_DEVICE_VIDEO, 32, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_MAP_VIDEO_MEMORY \
CTL_CODE(FILE_DEVICE_VIDEO, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_AVAIL_MODES \
CTL_CODE(FILE_DEVICE_VIDEO, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_COLOR_CAPABILITIES \
CTL_CODE(FILE_DEVICE_VIDEO, 13, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_CURRENT_MODE \
CTL_CODE(FILE_DEVICE_VIDEO, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_CURSOR_ATTR \
CTL_CODE(FILE_DEVICE_VIDEO, 26, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_CURSOR_POSITION \
CTL_CODE(FILE_DEVICE_VIDEO, 28, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES \
CTL_CODE(FILE_DEVICE_VIDEO, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_POINTER_ATTR \
CTL_CODE(FILE_DEVICE_VIDEO, 18, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_POINTER_CAPABILITIES \
CTL_CODE(FILE_DEVICE_VIDEO, 17, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_POINTER_POSITION \
CTL_CODE(FILE_DEVICE_VIDEO, 20, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_PUBLIC_ACCESS_RANGES \
CTL_CODE(FILE_DEVICE_VIDEO, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_RESET_DEVICE \
CTL_CODE(FILE_DEVICE_VIDEO, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_RESTORE_HARDWARE_STATE \
CTL_CODE(FILE_DEVICE_VIDEO, 23, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SAVE_HARDWARE_STATE \
CTL_CODE(FILE_DEVICE_VIDEO, 22, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SET_COLOR_REGISTERS \
CTL_CODE(FILE_DEVICE_VIDEO, 14, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SET_CURRENT_MODE \
CTL_CODE(FILE_DEVICE_VIDEO, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SET_CURSOR_ATTR \
CTL_CODE(FILE_DEVICE_VIDEO, 27, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SET_CURSOR_POSITION \
CTL_CODE(FILE_DEVICE_VIDEO, 29, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SET_PALETTE_REGISTERS \
CTL_CODE(FILE_DEVICE_VIDEO, 31, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SET_POINTER_ATTR \
CTL_CODE(FILE_DEVICE_VIDEO, 19, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SET_POINTER_POSITION \
CTL_CODE(FILE_DEVICE_VIDEO, 21, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SET_POWER_MANAGEMENT \
CTL_CODE(FILE_DEVICE_VIDEO, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SHARE_VIDEO_MEMORY \
CTL_CODE(FILE_DEVICE_VIDEO, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_UNMAP_VIDEO_MEMORY \
CTL_CODE(FILE_DEVICE_VIDEO, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_UNSHARE_VIDEO_MEMORY \
CTL_CODE(FILE_DEVICE_VIDEO, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
// Bit definitions for Attribute Flags
typedef struct _VIDEO_MEMORY {
PVOID RequestedVirtualAddress;
} VIDEO_MEMORY, *PVIDEO_MEMORY;
typedef struct _VIDEO_MEMORY_INFORMATION {
PVOID VideoRamBase;
ULONG VideoRamLength;
PVOID FrameBufferBase;
ULONG FrameBufferLength;
} VIDEO_MEMORY_INFORMATION, *PVIDEO_MEMORY_INFORMATION;
typedef struct _VIDEO_MODE {
ULONG RequestedMode;
} VIDEO_MODE, *PVIDEO_MODE;
/* VIDEO_MODE_INFORMATION.AttributeFlags */
#define VIDEO_MODE_COLOR 0x0001
#define VIDEO_MODE_GRAPHICS 0x0002
#define VIDEO_MODE_PALETTE_DRIVEN 0x0004
@ -40,69 +175,7 @@ typedef LONG VP_STATUS, *PVP_STATUS;
#define VIDEO_MEMORY_SPACE_DENSE 0x04
#define VIDEO_MEMORY_SPACE_P6CACHE 0x08
typedef struct _VIDEO_POINTER_CAPABILITIES
{
ULONG Flags;
ULONG MaxWidth;
ULONG MaxHeight;
ULONG HWPtrBitmapStart;
ULONG HWPtrBitmapEnd;
} VIDEO_POINTER_CAPABILITIES, *PVIDEO_POINTER_CAPABILITIES;
typedef struct _VIDEO_POINTER_ATTRIBUTES
{
ULONG Flags;
ULONG Width;
ULONG Height;
ULONG WidthInBytes;
ULONG Enable;
SHORT Column;
SHORT Row;
UCHAR Pixels[1];
} VIDEO_POINTER_ATTRIBUTES, *PVIDEO_POINTER_ATTRIBUTES;
typedef enum _VIDEO_BANK_TYPE
{
VideoNotBanked = 0,
VideoBanked1RW,
VideoBanked1R1W,
VideoBanked2RW,
NumVideoBankTypes
} VIDEO_BANK_TYPE, *PVIDEO_BANK_TYPE;
typedef struct _VIDEO_BANK_SELECT
{
ULONG Length;
ULONG Size;
ULONG BankingFlags;
ULONG BankingType;
ULONG PlanarHCBankingType;
ULONG BitmapWidthInBytes;
ULONG BitmapSize;
ULONG Granularity;
ULONG PlanarHCGranularity;
ULONG CodeOffset;
ULONG PlanarHCBankCodeOffset;
ULONG PlanarHCEnableCodeOffset;
ULONG PlanarHCDisableCodeOffset;
} VIDEO_BANK_SELECT, *PVIDEO_BANK_SELECT;
typedef struct _VIDEO_CLUTDATA
{
UCHAR Red;
UCHAR Green;
UCHAR Blue;
UCHAR Unused;
} VIDEO_CLUTDATA, *PVIDEO_CLUTDATA;
typedef struct _VIDEO_NUM_MODES
{
ULONG NumModes;
ULONG ModeInformationLength;
} VIDEO_NUM_MODES, *PVIDEO_NUM_MODES;
typedef struct _VIDEO_MODE_INFORMATION
{
typedef struct _VIDEO_MODE_INFORMATION {
ULONG Length;
ULONG ModeIndex;
ULONG VisScreenWidth;
@ -125,6 +198,72 @@ typedef struct _VIDEO_MODE_INFORMATION
ULONG DriverSpecificAttributeFlags;
} VIDEO_MODE_INFORMATION, *PVIDEO_MODE_INFORMATION;
typedef struct _VIDEO_NUM_MODES {
ULONG NumModes;
ULONG ModeInformationLength;
} VIDEO_NUM_MODES, *PVIDEO_NUM_MODES;
typedef struct _VIDEO_SHARE_MEMORY {
HANDLE ProcessHandle;
ULONG ViewOffset;
ULONG ViewSize;
PVOID RequestedVirtualAddress;
} VIDEO_SHARE_MEMORY, *PVIDEO_SHARE_MEMORY;
/* VIDEO_BANK_SELECT.BankingType and PlanarHCBankingType constants */
typedef enum _VIDEO_BANK_TYPE {
VideoNotBanked = 0,
VideoBanked1RW,
VideoBanked1R1W,
VideoBanked2RW,
NumVideoBankTypes
} VIDEO_BANK_TYPE, *PVIDEO_BANK_TYPE;
typedef struct _VIDEO_BANK_SELECT {
ULONG Length;
ULONG Size;
ULONG BankingFlags;
ULONG BankingType;
ULONG PlanarHCBankingType;
ULONG BitmapWidthInBytes;
ULONG BitmapSize;
ULONG Granularity;
ULONG PlanarHCGranularity;
ULONG CodeOffset;
ULONG PlanarHCBankCodeOffset;
ULONG PlanarHCEnableCodeOffset;
ULONG PlanarHCDisableCodeOffset;
} VIDEO_BANK_SELECT, *PVIDEO_BANK_SELECT;
typedef struct _VIDEO_POINTER_ATTRIBUTES {
ULONG Flags;
ULONG Width;
ULONG Height;
ULONG WidthInBytes;
ULONG Enable;
SHORT Column;
SHORT Row;
UCHAR Pixels[1];
} VIDEO_POINTER_ATTRIBUTES, *PVIDEO_POINTER_ATTRIBUTES;
typedef struct _VIDEO_POINTER_CAPABILITIES {
ULONG Flags;
ULONG MaxWidth;
ULONG MaxHeight;
ULONG HWPtrBitmapStart;
ULONG HWPtrBitmapEnd;
} VIDEO_POINTER_CAPABILITIES, *PVIDEO_POINTER_CAPABILITIES;
typedef struct _VIDEO_CLUTDATA {
UCHAR Red;
UCHAR Green;
UCHAR Blue;
UCHAR Unused;
} VIDEO_CLUTDATA, *PVIDEO_CLUTDATA;
typedef enum _VIDEO_DEVICE_DATA_TYPE
{
VpMachineData,
@ -157,40 +296,6 @@ typedef struct _VIDEO_REQUEST_PACKET
ULONG OutputBufferLength;
} VIDEO_REQUEST_PACKET, *PVIDEO_REQUEST_PACKET;
#define IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES CTL_CODE(FILE_DEVICE_VIDEO, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_AVAIL_MODES CTL_CODE(FILE_DEVICE_VIDEO, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_CURRENT_MODE CTL_CODE(FILE_DEVICE_VIDEO, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SET_CURRENT_MODE CTL_CODE(FILE_DEVICE_VIDEO, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_RESET_DEVICE CTL_CODE(FILE_DEVICE_VIDEO, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_MAP_VIDEO_MEMORY CTL_CODE(FILE_DEVICE_VIDEO, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_UNMAP_VIDEO_MEMORY CTL_CODE(FILE_DEVICE_VIDEO, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SHARE_VIDEO_MEMORY CTL_CODE(FILE_DEVICE_VIDEO, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_UNSHARE_VIDEO_MEMORY CTL_CODE(FILE_DEVICE_VIDEO, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_GET_PUBLIC_ACCESS_RANGES CTL_CODE(FILE_DEVICE_VIDEO, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_FREE_PUBLIC_ACCESS_RANGES CTL_CODE(FILE_DEVICE_VIDEO, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_GET_POWER_MANAGEMENT CTL_CODE(FILE_DEVICE_VIDEO, 11, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SET_POWER_MANAGEMENT CTL_CODE(FILE_DEVICE_VIDEO, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_COLOR_CAPABILITIES CTL_CODE(FILE_DEVICE_VIDEO, 13, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SET_COLOR_REGISTERS CTL_CODE(FILE_DEVICE_VIDEO, 14, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_DISABLE_POINTER CTL_CODE(FILE_DEVICE_VIDEO, 15, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_ENABLE_POINTER CTL_CODE(FILE_DEVICE_VIDEO, 16, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_POINTER_CAPABILITIES CTL_CODE(FILE_DEVICE_VIDEO, 17, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_POINTER_ATTR CTL_CODE(FILE_DEVICE_VIDEO, 18, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SET_POINTER_ATTR CTL_CODE(FILE_DEVICE_VIDEO, 19, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_POINTER_POSITION CTL_CODE(FILE_DEVICE_VIDEO, 20, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SET_POINTER_POSITION CTL_CODE(FILE_DEVICE_VIDEO, 21, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SAVE_HARDWARE_STATE CTL_CODE(FILE_DEVICE_VIDEO, 22, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_RESTORE_HARDWARE_STATE CTL_CODE(FILE_DEVICE_VIDEO, 23, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_DISABLE_CURSOR CTL_CODE(FILE_DEVICE_VIDEO, 24, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_ENABLE_CURSOR CTL_CODE(FILE_DEVICE_VIDEO, 25, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_CURSOR_ATTR CTL_CODE(FILE_DEVICE_VIDEO, 26, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SET_CURSOR_ATTR CTL_CODE(FILE_DEVICE_VIDEO, 27, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_QUERY_CURSOR_POSITION CTL_CODE(FILE_DEVICE_VIDEO, 28, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SET_CURSOR_POSITION CTL_CODE(FILE_DEVICE_VIDEO, 29, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_GET_BANK_SELECT_CODE CTL_CODE(FILE_DEVICE_VIDEO, 30, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_SET_PALETTE_REGISTERS CTL_CODE(FILE_DEVICE_VIDEO, 31, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VIDEO_LOAD_AND_SET_FONT CTL_CODE(FILE_DEVICE_VIDEO, 32, METHOD_BUFFERED, FILE_ANY_ACCESS)
typedef struct _VIDEO_PORT_CONFIG_INFO
{
ULONG Length;
@ -246,8 +351,7 @@ typedef BOOLEAN STDCALL
typedef VOID STDCALL
(*PVIDEO_HW_TIMER)(PVOID HwDeviceExtension);
typedef struct _VIDEO_HW_INITIALIZATION_DATA
{
typedef struct _VIDEO_HW_INITIALIZATION_DATA {
ULONG HwInitDataSize;
INTERFACE_TYPE AdapterInterfaceType;
PVIDEO_HW_FIND_ADAPTER HwFindAdapter;
@ -281,17 +385,18 @@ typedef VP_STATUS STDCALL
typedef BOOLEAN STDCALL
(*PMINIPORT_SYNCHRONIZE_ROUTINE)(PVOID Context);
typedef struct _VIDEO_ACCESS_RANGE
{
#ifndef VIDEO_ACCESS_RANGE_DEFINED /* also in video.h */
#define VIDEO_ACCESS_RANGE_DEFINED
typedef struct _VIDEO_ACCESS_RANGE {
PHYSICAL_ADDRESS RangeStart;
ULONG RangeLength;
UCHAR RangeInIoSpace;
UCHAR RangeVisible;
UCHAR RangeShareable;
} VIDEO_ACCESS_RANGE, *PVIDEO_ACCESS_RANGE;
#endif
typedef struct _VIDEO_X86_BIOS_ARGUMENTS
{
typedef struct _VIDEO_X86_BIOS_ARGUMENTS {
ULONG Eax;
ULONG Ebx;
ULONG Ecx;
@ -301,48 +406,23 @@ typedef struct _VIDEO_X86_BIOS_ARGUMENTS
ULONG Ebp;
} VIDEO_X86_BIOS_ARGUMENTS, *PVIDEO_X86_BIOS_ARGUMENTS;
#ifndef BANKED_SECTION_ROUTINE_DEFINED /* also in video.h */
#define BANKED_SECTION_ROUTINE_DEFINED
typedef VOID STDCALL
(*PBANKED_SECTION_ROUTINE)(IN ULONG ReadBank,
IN ULONG WriteBank,
IN PVOID Context);
#endif
typedef struct
{
typedef struct {
USHORT NumEntries;
USHORT FirstEntry;
union
{
union {
VIDEO_CLUTDATA RgbArray;
ULONG RgbLong;
} LookupTable[1];
} VIDEO_CLUT, *PVIDEO_CLUT;
typedef struct _VIDEO_MEMORY
{
PVOID RequestedVirtualAddress;
} VIDEO_MEMORY, *PVIDEO_MEMORY;
typedef struct _VIDEO_MEMORY_INFORMATION
{
PVOID VideoRamBase;
ULONG VideoRamLength;
PVOID FrameBufferBase;
ULONG FrameBufferLength;
} VIDEO_MEMORY_INFORMATION, *PVIDEO_MEMORY_INFORMATION;
typedef struct _VIDEO_MODE
{
ULONG RequestedMode;
} VIDEO_MODE, *PVIDEO_MODE;
typedef struct _VIDEO_SHARE_MEMORY
{
HANDLE ProcessHandle;
ULONG ViewOffset;
ULONG ViewSize;
PVOID RequestedVirtualAddress;
} VIDEO_SHARE_MEMORY, *PVIDEO_SHARE_MEMORY;
ULONG STDCALL VideoPortCompareMemory(IN PVOID Source1, IN PVOID Source2, IN ULONG Length);
VOID VideoPortDebugPrint(IN ULONG DebugPrintLevel, IN PCHAR DebugMessage, ...);
VP_STATUS STDCALL VideoPortDisableInterrupt(IN PVOID HwDeviceExtension);
@ -461,3 +541,11 @@ VOID STDCALL VideoPortZeroMemory(OUT PVOID Destination, IN ULONG Length);
VOID STDCALL VideoPortZeroDeviceMemory(OUT PVOID Destination, IN ULONG Length);
#pragma pack(pop)
#ifdef __cplusplus
}
#endif
#endif /* __NTDDVID_H */