;****************************************************************************
;                                                                           *
; THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY     *
; KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE       *
; IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR     *
; PURPOSE.                                                                  *
;                                                                           *
; Copyright (C) 1993-95  Microsoft Corporation.  All Rights Reserved.       *
;                                                                           *
;****************************************************************************

option expr32

IFNDEF	miniport_inc
miniport_inc	EQU		1

; Begin of file ..\ioh\miniport.h
ANYSIZE_ARRAY		EQU		1t
PVOID		TYPEDEF		PTR 

CHAR		TYPEDEF		SBYTE

_SHORT		TYPEDEF		SWORD

LONG		TYPEDEF		SDWORD

PCHAR		TYPEDEF		PTR CHAR

LPCH		TYPEDEF		PTR CHAR

PCH		TYPEDEF		PTR CHAR

LPCCH		TYPEDEF		PTR SBYTE

PCCH		TYPEDEF		PTR SBYTE

NPSTR		TYPEDEF		PTR CHAR

LPSTR		TYPEDEF		PTR CHAR

PSTR		TYPEDEF		PTR CHAR

LPCSTR		TYPEDEF		PTR SBYTE

PCSTR		TYPEDEF		PTR SBYTE

TCHAR		TYPEDEF		SBYTE

PTCHAR		TYPEDEF		PTR SBYTE

TUCHAR		TYPEDEF		BYTE

PTUCHAR		TYPEDEF		PTR BYTE

LPTCH		TYPEDEF		LPSTR

PTCH		TYPEDEF		LPSTR

PTSTR		TYPEDEF		LPSTR

LPTSTR		TYPEDEF		LPSTR

LPCTSTR		TYPEDEF		LPCSTR

DOUBLE		TYPEDEF		REAL8

_QUAD		STRUCT 1t
DoNotUseThisField		REAL8		?
_QUAD		ENDS

QUAD		TYPEDEF		_QUAD

PSHORT		TYPEDEF		PTR _SHORT

PLONG		TYPEDEF		PTR LONG

PQUAD		TYPEDEF		PTR QUAD

UCHAR		TYPEDEF		BYTE

USHORT		TYPEDEF		WORD

ULONG		TYPEDEF		DWORD

UQUAD		TYPEDEF		QUAD

PUCHAR		TYPEDEF		PTR UCHAR

PUSHORT		TYPEDEF		PTR USHORT

PULONG		TYPEDEF		PTR ULONG

PUQUAD		TYPEDEF		PTR UQUAD

SCHAR		TYPEDEF		SBYTE

PSCHAR		TYPEDEF		PTR SCHAR

STRICT		EQU		1t
HANDLE		TYPEDEF		PTR 

PHANDLE		TYPEDEF		PTR HANDLE

OBJ_HANDLE_TAGBITS		EQU		000000003h
CCHAR		TYPEDEF		SBYTE

CSHORT		TYPEDEF		SWORD

CLONG		TYPEDEF		ULONG

PCCHAR		TYPEDEF		PTR CCHAR

PCSHORT		TYPEDEF		PTR CSHORT

PCLONG		TYPEDEF		PTR CLONG

LONGLONG		TYPEDEF		REAL8

ULONGLONG		TYPEDEF		REAL8

@tag_miniport0		STRUCT 1t
LowPart		ULONG		?
HighPart		LONG		?
@tag_miniport0		ENDS

_LARGE_INTEGER		UNION
		STRUCT
LowPart		ULONG		?
HighPart		LONG		?
		ENDS
QuadPart		LONGLONG		?
_LARGE_INTEGER		ENDS

LARGE_INTEGER		TYPEDEF		_LARGE_INTEGER

PLARGE_INTEGER		TYPEDEF		PTR _LARGE_INTEGER

@tag_miniport1		STRUCT 1t
LowPart		ULONG		?
HighPart		ULONG		?
@tag_miniport1		ENDS

_ULARGE_INTEGER		UNION
		STRUCT
LowPart		ULONG		?
HighPart		ULONG		?
		ENDS
QuadPart		ULONGLONG		?
_ULARGE_INTEGER		ENDS

ULARGE_INTEGER		TYPEDEF		_ULARGE_INTEGER

PULARGE_INTEGER		TYPEDEF		PTR _ULARGE_INTEGER

PHYSICAL_ADDRESS		TYPEDEF		LARGE_INTEGER

PPHYSICAL_ADDRESS		TYPEDEF		PTR LARGE_INTEGER

BOOLEAN		TYPEDEF		CCHAR

PBOOLEAN		TYPEDEF		PTR BOOLEAN

FALSE		EQU		0t
TRUE		EQU		1t
KIRQL		TYPEDEF		CCHAR

PKIRQL		TYPEDEF		PTR KIRQL

Internal		EQU		0t
Isa		EQU		1t
Eisa		EQU		2t
MicroChannel		EQU		3t
TurboChannel		EQU		4t
PCIBus		EQU		5t
VMEBus		EQU		6t
NuBus		EQU		7t
PCMCIABus		EQU		8t
CBus		EQU		9t
MPIBus		EQU		10t
MPSABus		EQU		11t
MaximumInterfaceType		EQU		11t
INTERFACE_TYPE		TYPEDEF		ULONG

PINTERFACE_TYPE		TYPEDEF		PTR ULONG

_Width8Bits		EQU		0t
_Width16Bits		EQU		1t
_Width32Bits		EQU		2t
MaximumDmaWidth		EQU		3t
DMA_WIDTH		TYPEDEF		ULONG

PDMA_WIDTH		TYPEDEF		PTR ULONG

Compatible		EQU		0t
TypeA		EQU		1t
TypeB		EQU		2t
TypeC		EQU		3t
MaximumDmaSpeed		EQU		4t
DMA_SPEED		TYPEDEF		ULONG

PDMA_SPEED		TYPEDEF		PTR ULONG

LevelSensitive		EQU		0t
Latched		EQU		1t
KINTERRUPT_MODE		TYPEDEF		ULONG

Cmos		EQU		0t
EisaConfiguration		EQU		1t
Pos		EQU		2t
CbusConfiguration		EQU		3t
PCIConfiguration		EQU		4t
VMEConfiguration		EQU		5t
NuBusConfiguration		EQU		6t
PCMCIAConfiguration		EQU		7t
MPIConfiguration		EQU		8t
MPSAConfiguration		EQU		9t
MaximumBusDataType		EQU		10t

BUS_DATA_TYPE		TYPEDEF		SWORD

PBUS_DATA_TYPE		TYPEDEF		PTR SWORD

SUchar		EQU		0t
SUshort		EQU		1t
SUlong		EQU		2t

EMULATOR_PORT_ACCESS_TYPE		TYPEDEF		SWORD

PEMULATOR_PORT_ACCESS_TYPE		TYPEDEF		PTR SWORD

EMULATOR_READ_ACCESS		EQU		000000001h
EMULATOR_WRITE_ACCESS		EQU		000000002h
_EMULATOR_ACCESS_ENTRY		STRUCT 1t
BasePort		ULONG		?
NumConsecutivePorts		ULONG		?
AccessType		EMULATOR_PORT_ACCESS_TYPE		?
AccessMode		UCHAR		?
StringSupport		UCHAR		?
Routine		PVOID		?
_EMULATOR_ACCESS_ENTRY		ENDS

EMULATOR_ACCESS_ENTRY		TYPEDEF		_EMULATOR_ACCESS_ENTRY

PEMULATOR_ACCESS_ENTRY		TYPEDEF		PTR _EMULATOR_ACCESS_ENTRY

@tag_miniport3		RECORD	Reserved@@tag_miniport3:24,
			FunctionNumber@@tag_miniport3:3,
			DeviceNumber@@tag_miniport3:5

@tag_miniport2		UNION
bits		@tag_miniport3		<>
AsULONG		ULONG		?
@tag_miniport2		ENDS

_PCI_SLOT_NUMBER		STRUCT 1t
u		@tag_miniport2		<>
_PCI_SLOT_NUMBER		ENDS

PCI_SLOT_NUMBER		TYPEDEF		_PCI_SLOT_NUMBER

PPCI_SLOT_NUMBER		TYPEDEF		PTR _PCI_SLOT_NUMBER

PCI_TYPE0_ADDRESSES		EQU		6t
_PCI_HEADER_TYPE_0		STRUCT 1t
BaseAddresses		ULONG		6t DUP (?)
Reserved1		ULONG		2t DUP (?)
ROMBaseAddress		ULONG		?
Reserved2		ULONG		2t DUP (?)
InterruptLine		UCHAR		?
InterruptPin		UCHAR		?
MinimumGrant		UCHAR		?
MaximumLatency		UCHAR		?
_PCI_HEADER_TYPE_0		ENDS

@tag_miniport4		UNION
type0		_PCI_HEADER_TYPE_0		<>
@tag_miniport4		ENDS

_PCI_COMMON_CONFIG		STRUCT 1t
VendorID		USHORT		?
DeviceID		USHORT		?
Command		USHORT		?
Status		USHORT		?
RevisionID		UCHAR		?
ProgIf		UCHAR		?
SubClass		UCHAR		?
BaseClass		UCHAR		?
CacheLineSize		UCHAR		?
LatencyTimer		UCHAR		?
HeaderType		UCHAR		?
BIST		UCHAR		?
u		@tag_miniport4		<>
DeviceSpecific		UCHAR		192t DUP (?)
_PCI_COMMON_CONFIG		ENDS

PCI_COMMON_CONFIG		TYPEDEF		_PCI_COMMON_CONFIG

PPCI_COMMON_CONFIG		TYPEDEF		PTR _PCI_COMMON_CONFIG

PCI_MAX_DEVICES		EQU		32t
PCI_MAX_FUNCTION		EQU		8t
PCI_INVALID_VENDORID		EQU		00000ffffh
PCI_MULTIFUNCTION		EQU		000000080h
PCI_ENABLE_IO_SPACE		EQU		000000001h
PCI_ENABLE_MEMORY_SPACE		EQU		000000002h
PCI_ENABLE_BUS_MASTER		EQU		000000004h
PCI_ENABLE_SPECIAL_CYCLES		EQU		000000008h
PCI_ENABLE_WRITE_AND_INVALIDATE		EQU		000000010h
PCI_ENABLE_VGA_COMPATIBLE_PALET		EQU		000000020h
PCI_ENABLE_PARITY		EQU		000000040h
PCI_ENABLE_WAIT_CYCLE		EQU		000000080h
PCI_ENABLE_SERR		EQU		000000100h
PCI_ENABLE_FAST_BACK_TO_BACK		EQU		000000200h
PCI_STATUS_FAST_BACK_TO_BACK		EQU		000000080h
PCI_STATUS_DATA_PARITY_DETECTED		EQU		000000100h
PCI_STATUS_DEVSEL		EQU		000000600h
PCI_STATUS_SIGNALED_TARGET_ABOR		EQU		000000800h
PCI_STATUS_RECEIVED_TARGET_ABOR		EQU		000001000h
PCI_STATUS_RECEIVED_MASTER_ABOR		EQU		000002000h
PCI_STATUS_SIGNALED_SYSTEM_ERRO		EQU		000004000h
PCI_STATUS_DETECTED_PARITY_ERRO		EQU		000008000h
PCI_ADDRESS_IO_SPACE		EQU		000000001h
PCI_ADDRESS_MEMORY_TYPE_MASK		EQU		000000006h
PCI_ADDRESS_MEMORY_PREFETCHABLE		EQU		000000008h
PCI_TYPE_32BIT		EQU		0t
PCI_TYPE_20BIT		EQU		2t
PCI_TYPE_64BIT		EQU		4t
PCI_ROMADDRESS_ENABLED		EQU		000000001h
_CM_MCA_POS_DATA		STRUCT 1t
AdapterId		USHORT		?
PosData1		UCHAR		?
PosData2		UCHAR		?
PosData3		UCHAR		?
PosData4		UCHAR		?
_CM_MCA_POS_DATA		ENDS

CM_MCA_POS_DATA		TYPEDEF		_CM_MCA_POS_DATA

PCM_MCA_POS_DATA		TYPEDEF		PTR _CM_MCA_POS_DATA

_EISA_MEMORY_TYPE		RECORD	MoreEntries@_EISA_MEMORY_TYPE:1,
			Reserved1@_EISA_MEMORY_TYPE:1,
			Shared@_EISA_MEMORY_TYPE:1,
			Type@_EISA_MEMORY_TYPE:2,
			Reserved0@_EISA_MEMORY_TYPE:1,
			Cached@_EISA_MEMORY_TYPE:1,
			ReadWrite@_EISA_MEMORY_TYPE:1

EISA_MEMORY_TYPE		TYPEDEF		_EISA_MEMORY_TYPE

PEISA_MEMORY_TYPE		TYPEDEF		PTR _EISA_MEMORY_TYPE

_EISA_MEMORY_CONFIGURATION		STRUCT 1t
ConfigurationByte		EISA_MEMORY_TYPE		<>
DataSize		UCHAR		?
AddressLowWord		USHORT		?
AddressHighByte		UCHAR		?
MemorySize		USHORT		?
_EISA_MEMORY_CONFIGURATION		ENDS

EISA_MEMORY_CONFIGURATION		TYPEDEF		_EISA_MEMORY_CONFIGURATION

PEISA_MEMORY_CONFIGURATION		TYPEDEF		PTR _EISA_MEMORY_CONFIGURATION

_EISA_IRQ_DESCRIPTOR		RECORD	MoreEntries@_EISA_IRQ_DESCRIPTOR:1,
			Shared@_EISA_IRQ_DESCRIPTOR:1,
			LevelTriggered@_EISA_IRQ_DESCRIPTOR:1,
			Reserved@_EISA_IRQ_DESCRIPTOR:1,
			Interrupt@_EISA_IRQ_DESCRIPTOR:4

EISA_IRQ_DESCRIPTOR		TYPEDEF		_EISA_IRQ_DESCRIPTOR

PEISA_IRQ_DESCRIPTOR		TYPEDEF		PTR _EISA_IRQ_DESCRIPTOR

_EISA_IRQ_CONFIGURATION		STRUCT 1t
ConfigurationByte		EISA_IRQ_DESCRIPTOR		<>
Reserved		UCHAR		?
_EISA_IRQ_CONFIGURATION		ENDS

EISA_IRQ_CONFIGURATION		TYPEDEF		_EISA_IRQ_CONFIGURATION

PEISA_IRQ_CONFIGURATION		TYPEDEF		PTR _EISA_IRQ_CONFIGURATION

_DMA_CONFIGURATION_BYTE0		RECORD	MoreEntries@_DMA_CONFIGURATION_BYTE0:1,
			Shared@_DMA_CONFIGURATION_BYTE0:1,
			Reserved@_DMA_CONFIGURATION_BYTE0:3,
			Channel@_DMA_CONFIGURATION_BYTE0:3

DMA_CONFIGURATION_BYTE0		TYPEDEF		_DMA_CONFIGURATION_BYTE0

_DMA_CONFIGURATION_BYTE1		RECORD	Reserved1@_DMA_CONFIGURATION_BYTE1:2,
			Timing@_DMA_CONFIGURATION_BYTE1:2,
			TransferSize@_DMA_CONFIGURATION_BYTE1:2,
			Reserved0@_DMA_CONFIGURATION_BYTE1:2

DMA_CONFIGURATION_BYTE1		TYPEDEF		_DMA_CONFIGURATION_BYTE1

_EISA_DMA_CONFIGURATION		STRUCT 1t
ConfigurationByte0		DMA_CONFIGURATION_BYTE0		<>
ConfigurationByte1		DMA_CONFIGURATION_BYTE1		<>
_EISA_DMA_CONFIGURATION		ENDS

EISA_DMA_CONFIGURATION		TYPEDEF		_EISA_DMA_CONFIGURATION

PEISA_DMA_CONFIGURATION		TYPEDEF		PTR _EISA_DMA_CONFIGURATION

_EISA_PORT_DESCRIPTOR		RECORD	MoreEntries@_EISA_PORT_DESCRIPTOR:1,
			Shared@_EISA_PORT_DESCRIPTOR:1,
			Reserved@_EISA_PORT_DESCRIPTOR:1,
			NumberPorts@_EISA_PORT_DESCRIPTOR:5

EISA_PORT_DESCRIPTOR		TYPEDEF		_EISA_PORT_DESCRIPTOR

PEISA_PORT_DESCRIPTOR		TYPEDEF		PTR _EISA_PORT_DESCRIPTOR

_EISA_PORT_CONFIGURATION		STRUCT 1t
Configuration		EISA_PORT_DESCRIPTOR		<>
PortAddress		USHORT		?
_EISA_PORT_CONFIGURATION		ENDS

EISA_PORT_CONFIGURATION		TYPEDEF		_EISA_PORT_CONFIGURATION

PEISA_PORT_CONFIGURATION		TYPEDEF		PTR _EISA_PORT_CONFIGURATION

_CM_EISA_SLOT_INFORMATION		STRUCT 1t
ReturnCode		UCHAR		?
ReturnFlags		UCHAR		?
MajorRevision		UCHAR		?
MinorRevision		UCHAR		?
Checksum		USHORT		?
NumberFunctions		UCHAR		?
FunctionInformation		UCHAR		?
CompressedId		ULONG		?
_CM_EISA_SLOT_INFORMATION		ENDS

CM_EISA_SLOT_INFORMATION		TYPEDEF		_CM_EISA_SLOT_INFORMATION

PCM_EISA_SLOT_INFORMATION		TYPEDEF		PTR _CM_EISA_SLOT_INFORMATION

_CM_EISA_FUNCTION_INFORMATION		STRUCT 1t
CompressedId		ULONG		?
IdSlotFlags1		UCHAR		?
IdSlotFlags2		UCHAR		?
MinorRevision		UCHAR		?
MajorRevision		UCHAR		?
Selections		UCHAR		26t DUP (?)
FunctionFlags		UCHAR		?
TypeString		UCHAR		80t DUP (?)
EisaMemory		EISA_MEMORY_CONFIGURATION		9t DUP (<>)
EisaIrq		EISA_IRQ_CONFIGURATION		7t DUP (<>)
EisaDma		EISA_DMA_CONFIGURATION		4t DUP (<>)
EisaPort		EISA_PORT_CONFIGURATION		20t DUP (<>)
InitializationData		UCHAR		60t DUP (?)
_CM_EISA_FUNCTION_INFORMATION		ENDS

CM_EISA_FUNCTION_INFORMATION		TYPEDEF		_CM_EISA_FUNCTION_INFORMATION

PCM_EISA_FUNCTION_INFORMATION		TYPEDEF		PTR _CM_EISA_FUNCTION_INFORMATION

EISA_FUNCTION_ENABLED		EQU		000000080h
EISA_FREE_FORM_DATA		EQU		000000040h
EISA_HAS_PORT_INIT_ENTRY		EQU		000000020h
EISA_HAS_PORT_RANGE		EQU		000000010h
EISA_HAS_DMA_ENTRY		EQU		000000008h
EISA_HAS_IRQ_ENTRY		EQU		000000004h
EISA_HAS_MEMORY_ENTRY		EQU		000000002h
EISA_HAS_TYPE_ENTRY		EQU		000000001h
EISA_HAS_INFORMATION		EQU		00000001fh
EISA_MORE_ENTRIES		EQU		000000080h
EISA_SYSTEM_MEMORY		EQU		000000000h
EISA_MEMORY_TYPE_RAM		EQU		000000001h
EISA_INVALID_SLOT		EQU		000000080h
EISA_INVALID_FUNCTION		EQU		000000081h
EISA_INVALID_CONFIGURATION		EQU		000000082h
EISA_EMPTY_SLOT		EQU		000000083h
EISA_INVALID_BIOS_CALL		EQU		000000086h
; End of file ..\ioh\miniport.h

ENDIF
