mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Added skeleton video port driver
svn path=/trunk/; revision=501
This commit is contained in:
parent
2a87426631
commit
ebf6630e2b
3 changed files with 774 additions and 0 deletions
30
reactos/drivers/dd/vidport/makefile
Normal file
30
reactos/drivers/dd/vidport/makefile
Normal file
|
@ -0,0 +1,30 @@
|
|||
#
|
||||
#
|
||||
#
|
||||
OBJECTS = vidport.o ../../../ntoskrnl/ntoskrnl.a
|
||||
|
||||
all: vidport.sys
|
||||
|
||||
.phony: all
|
||||
|
||||
clean:
|
||||
- $(RM) vidport.o
|
||||
- $(RM) junk.tmp
|
||||
- $(RM) base.tmp
|
||||
- $(RM) temp.exp
|
||||
- $(RM) vidport.sys
|
||||
|
||||
.phony: clean
|
||||
|
||||
vidport.sys: $(OBJECTS)
|
||||
$(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \
|
||||
-Wl,--defsym,_edata=__data_end__ -Wl,--defsym,_etext=etext \
|
||||
-Wl,--base-file,base.tmp $(OBJECTS)
|
||||
- $(RM) junk.tmp
|
||||
$(DLLTOOL) --dllname vidport.sys --base-file base.tmp \
|
||||
--output-exp temp.exp
|
||||
- $(RM) base.tmp
|
||||
$(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \
|
||||
-specs=../../svc_specs -mdll -o vidport.sys $(OBJECTS) -Wl,temp.exp
|
||||
- $(RM) temp.exp
|
||||
|
510
reactos/drivers/dd/vidport/vidport.c
Normal file
510
reactos/drivers/dd/vidport/vidport.c
Normal file
|
@ -0,0 +1,510 @@
|
|||
|
||||
#include <ntddk.h>
|
||||
#include <ntddvid.h>
|
||||
|
||||
static NTSTATUS VidDispatchOpenClose(IN PDEVICE_OBJECT pDO, IN PIRP Irp);
|
||||
static NTSTATUS VidDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
|
||||
|
||||
// ------------------------------------------------------- Public Interface
|
||||
|
||||
// DriverEntry
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// This function initializes the driver.
|
||||
//
|
||||
// RUN LEVEL:
|
||||
// PASSIVE_LEVEL
|
||||
//
|
||||
// ARGUMENTS:
|
||||
// IN PDRIVER_OBJECT DriverObject System allocated Driver Object
|
||||
// for this driver
|
||||
// IN PUNICODE_STRING RegistryPath Name of registry driver service
|
||||
// key
|
||||
//
|
||||
// RETURNS:
|
||||
// NTSTATUS
|
||||
|
||||
STDCALL NTSTATUS
|
||||
DriverEntry(IN PDRIVER_OBJECT DriverObject,
|
||||
IN PUNICODE_STRING RegistryPath)
|
||||
{
|
||||
|
||||
DbgPrint("VideoPort Driver %s\n", VERSION);
|
||||
|
||||
// Export other driver entry points...
|
||||
DriverObject->DriverStartIo = VidtartIo;
|
||||
DriverObject->MajorFunction[IRP_MJ_CREATE] = VidDispatchOpenClose;
|
||||
DriverObject->MajorFunction[IRP_MJ_CLOSE] = VidDispatchOpenClose;
|
||||
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = VidDispatchDeviceControl;
|
||||
|
||||
// FIXME: should the miniport driver be loaded here?
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
ULONG
|
||||
VideoPortCompareMemory(IN PVOID Source1,
|
||||
IN PVOID Source2,
|
||||
IN ULONG Length)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortDebugPrint(IN ULONG DebugPrintLevel,
|
||||
IN PCHAR DebugMessage, ...)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VP_STATUS
|
||||
VideoPortDisableInterrupt(IN PVOID HwDeviceExtension)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
VP_STATUS
|
||||
VideoPortEnableInterrupt(IN PVOID HwDeviceExtension)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortFreeDeviceBase(IN PVOID HwDeviceExtension,
|
||||
IN PVOID MappedAddress)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
ULONG
|
||||
VideoPortGetBusData(IN PVOID HwDeviceExtension,
|
||||
IN BUS_DATA_TYPE BusDataType,
|
||||
IN ULONG SlotNumber,
|
||||
OUT PVOID Buffer,
|
||||
IN ULONG Offset,
|
||||
IN ULONG Length)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
UCHAR
|
||||
VideoPortGetCurrentIrql(VOID)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
PVOID
|
||||
VideoPortGetDeviceBase(IN PVOID HwDeviceExtension,
|
||||
IN PHYSICAL_ADDRESS IoAddress,
|
||||
IN ULONG NumberOfUchars,
|
||||
IN UCHAR InIoSpace)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VP_STATUS
|
||||
VideoPortGetDeviceData(IN PVOID HwDeviceExtension,
|
||||
IN VIDEO_DEVICE_DATA_TYPE DeviceDataType,
|
||||
IN PMINIPORT_QUERY_DEVICE_ROUTINE CallbackRoutine,
|
||||
IN PVOID Context)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VP_STATUS
|
||||
VideoPortGetAccessRanges(IN PVOID HwDeviceExtension,
|
||||
IN ULONG NumRequestedResources,
|
||||
IN PIO_RESOURCE_DESCRIPTOR RequestedResources OPTIONAL,
|
||||
IN ULONG NumAccessRanges,
|
||||
IN PVIDEO_ACCESS_RANGE AccessRanges,
|
||||
IN PVOID VendorId,
|
||||
IN PVOID DeviceId,
|
||||
IN PULONG Slot)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VP_STATUS
|
||||
VideoPortGetRegistryParameters(IN PVOID HwDeviceExtension,
|
||||
IN PWSTR ParameterName,
|
||||
IN UCHAR IsParameterFileName,
|
||||
IN PMINIPORT_GET_REGISTRY_ROUTINE GetRegistryRoutine,
|
||||
IN PVOID Context)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
ULONG
|
||||
VideoPortInitialize(IN PVOID Context1,
|
||||
IN PVOID Context2,
|
||||
IN PVIDEO_HW_INITIALIZATION_DATA HwInitializationData,
|
||||
IN PVOID HwContext)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VP_STATUS
|
||||
VideoPortInt10(IN PVOID HwDeviceExtension,
|
||||
IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortLogError(IN PVOID HwDeviceExtension,
|
||||
IN PVIDEO_REQUEST_PACKET Vrp OPTIONAL,
|
||||
IN VP_STATUS ErrorCode,
|
||||
IN ULONG UniqueId)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VP_STATUS
|
||||
VideoPortMapBankedMemory(IN PVOID HwDeviceExtension,
|
||||
IN PHYSICAL_ADDRESS PhysicalAddress,
|
||||
IN PULONG Length,
|
||||
IN PULONG InIoSpace,
|
||||
INOUT PVOID *VirtualAddress,
|
||||
IN ULONG BankLength,
|
||||
IN UCHAR ReadWriteBank,
|
||||
IN PBANKED_SECTION_ROUTINE BankRoutine,
|
||||
IN PVOID Context)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VP_STATUS
|
||||
VideoPortMapMemory(IN PVOID HwDeviceExtension,
|
||||
IN PHYSICAL_ADDRESS PhysicalAddress,
|
||||
IN PULONG Length,
|
||||
IN PULONG InIoSpace,
|
||||
INOUT PVOID *VirtualAddress)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortMoveMemory(OUT PVOID Destination,
|
||||
IN PVOID Source,
|
||||
IN ULONG Length)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
UCHAR
|
||||
VideoPortReadPortUchar(IN PUCHAR Port)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
USHORT
|
||||
VideoPortReadPortUshort(IN PUSHORT Port)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
ULONG
|
||||
VideoPortReadPortUlong(IN PULONG Port)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortReadPortBufferUchar(IN PUCHAR Port,
|
||||
OUT PUCHAR Buffer,
|
||||
IN ULONG Count)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortReadPortBufferUshort(IN PUSHORT Port,
|
||||
OUT PUSHORT Buffer,
|
||||
IN ULONG Count)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortReadPortBufferUlong(IN PULONG Port,
|
||||
OUT PULONG Buffer,
|
||||
IN ULONG Count)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
UCHAR
|
||||
VideoPortReadRegisterUchar(IN PUCHAR Register)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
USHORT
|
||||
VideoPortReadRegisterUshort(IN PUSHORT Register)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
ULONG
|
||||
VideoPortReadRegisterUlong(IN PULONG Register)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortReadRegisterBufferUchar(IN PUCHAR Register,
|
||||
OUT PUCHAR Buffer,
|
||||
IN ULONG Count)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortReadRegisterBufferUshort(IN PUSHORT Register,
|
||||
OUT PUSHORT Buffer,
|
||||
IN ULONG Count)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortReadRegisterBufferUlong(IN PULONG Register,
|
||||
OUT PULONG Buffer,
|
||||
IN ULONG Count)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
VideoPortScanRom(IN PVOID HwDeviceExtension,
|
||||
IN PUCHAR RomBase,
|
||||
IN ULONG RomLength,
|
||||
IN PUCHAR String)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
ULONG
|
||||
VideoPortSetBusData(IN PVOID HwDeviceExtension,
|
||||
IN BUS_DATA_TYPE BusDataType,
|
||||
IN ULONG SlotNumber,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Offset,
|
||||
IN ULONG Length)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VP_STATUS
|
||||
VideoPortSetRegistryParameters(IN PVOID HwDeviceExtension,
|
||||
IN PWSTR ValueName,
|
||||
IN PVOID ValueData,
|
||||
IN ULONG ValueLength)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VP_STATUS
|
||||
VideoPortSetTrappedEmulatorPorts(IN PVOID HwDeviceExtension,
|
||||
IN ULONG NumAccessRanges,
|
||||
IN PVIDEO_ACCESS_RANGE AccessRange)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortStallExecution(IN ULONG Microseconds)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortStartTimer(IN PVOID HwDeviceExtension)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortStopTimer(IN PVOID HwDeviceExtension)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
VideoPortSynchronizeExecution(IN PVOID HwDeviceExtension,
|
||||
IN VIDEO_SYNCHRONIZE_PRIORITY Priority,
|
||||
IN PMINIPORT_SYNCHRONIZE_ROUTINE SynchronizeRoutine,
|
||||
INOUT PVOID Context)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VP_STATUS
|
||||
VideoPortUnmapMemory(IN PVOID HwDeviceExtension,
|
||||
IN PVOID VirtualAddress,
|
||||
IN HANDLE ProcessHandle)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VP_STATUS
|
||||
VideoPortVerifyAccessRanges(IN PVOID HwDeviceExtension,
|
||||
IN ULONG NumAccessRanges,
|
||||
IN PVIDEO_ACCESS_RANGE AccessRanges)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortWritePortUchar(IN PUCHAR Port,
|
||||
IN UCHAR Value)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortWritePortUshort(IN PUSHORT Port,
|
||||
IN USHORT Value)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortWritePortUlong(IN PULONG Port,
|
||||
IN ULONG Value)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortWritePortBufferUchar(IN PUCHAR Port,
|
||||
IN PUCHAR Buffer,
|
||||
IN ULONG Count)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortWritePortBufferUshort(IN PUSHORT Port,
|
||||
IN PUSHORT Buffer,
|
||||
IN ULONG Count)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortWritePortBufferUlong(IN PULONG Port,
|
||||
IN PULONG Buffer,
|
||||
IN ULONG Count)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortWriteRegisterUchar(IN PUCHAR Register,
|
||||
IN UCHAR Value)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortWriteRegisterUshort(IN PUSHORT Register,
|
||||
IN USHORT Value)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortWriteRegisterUlong(IN PULONG Register,
|
||||
IN ULONG Value)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortWriteRegisterBufferUchar(IN PUCHAR Register,
|
||||
IN PUCHAR Buffer,
|
||||
IN ULONG Count)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortWriteRegisterBufferUshort(IN PUSHORT Register,
|
||||
IN PUSHORT Buffer,
|
||||
IN ULONG Count)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
VideoPortWriteRegisterBufferUlong(IN PULONG Register,
|
||||
IN PULONG Buffer,
|
||||
IN ULONG Count)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID VideoPortZeroMemory(OUT PVOID Destination,
|
||||
IN ULONG Length)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID VideoPortZeroDeviceMemory(OUT PVOID Destination,
|
||||
IN ULONG Length)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------- Nondiscardable statics
|
||||
|
||||
// VidDispatchOpenClose
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Answer requests for Open/Close calls: a null operation
|
||||
//
|
||||
// RUN LEVEL:
|
||||
// PASSIVE_LEVEL
|
||||
//
|
||||
// ARGUMENTS:
|
||||
// Standard dispatch arguments
|
||||
//
|
||||
// RETURNS:
|
||||
// NTSTATUS
|
||||
//
|
||||
|
||||
static NTSTATUS
|
||||
VidDispatchOpenClose(IN PDEVICE_OBJECT pDO,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||
Irp->IoStatus.Information = FILE_OPENED;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
// VidDispatchDeviceControl
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Answer requests for device control calls
|
||||
//
|
||||
// RUN LEVEL:
|
||||
// PASSIVE_LEVEL
|
||||
//
|
||||
// ARGUMENTS:
|
||||
// Standard dispatch arguments
|
||||
//
|
||||
// RETURNS:
|
||||
// NTSTATUS
|
||||
//
|
||||
|
||||
static NTSTATUS
|
||||
VidDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
|
234
reactos/include/ddk/ntddvid.h
Normal file
234
reactos/include/ddk/ntddvid.h
Normal file
|
@ -0,0 +1,234 @@
|
|||
/*
|
||||
* NTDDVID.H - Video Port and MiniPort driver interface
|
||||
*/
|
||||
|
||||
/*
|
||||
* the rough idea:
|
||||
* init:
|
||||
* miniport driver defines entrypoint thusly:
|
||||
* ULONG DriverEntry(PVOID Context1, PVOID Context2);
|
||||
* miniport allocates and initializes a VIDEO_HW_INIT_DATA struct
|
||||
* miniport calls VideoPortInitialize
|
||||
* video port driver handles init of DriverObject (Context1)
|
||||
* video port driver calls back into HwVidFindAdapter entry point
|
||||
* video port driver finishes up and returns the status code that
|
||||
* the miniport driver should return.
|
||||
* io requests:
|
||||
* video port driver reformats IRP into VRP
|
||||
* video port driver calls back into HwVidStartIO entry point
|
||||
* minimum IoControlCodes that must be handles by the miniport:
|
||||
* IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES
|
||||
* IOCTL_VIDEO_QUERY_AVAIL_MODES
|
||||
* IOCTL_VIDEO_SET_CURRENT_MODE
|
||||
* IOCTL_VIDEO_MAP_MEMORY
|
||||
* IOCTL_VIDEO_RESET_DEVICE
|
||||
* interrupts are handled the same as KM drivers.
|
||||
*/
|
||||
|
||||
#define VIDEO_MEMORY_SPACE_MEMORY 0x00
|
||||
#define VIDEO_MEMORY_SPACE_IO 0x01
|
||||
#define VIDEO_MEMORY_SPACE_USER_MODE 0x02
|
||||
#define VIDEO_MEMORY_SPACE_DENSE 0x04
|
||||
#define VIDEO_MEMORY_SPACE_P6CACHE 0x08
|
||||
|
||||
typedef LONG VP_STATUS, *PVP_STATUS;
|
||||
|
||||
typedef struct _STATUS_BLOCK
|
||||
{
|
||||
VP_STATUS Status;
|
||||
ULONG Information;
|
||||
} STATUS_BLOCK, *PSTATUS_BLOCK;
|
||||
|
||||
typedef struct _VIDEO_REQUEST_PACKET
|
||||
{
|
||||
ULONG IoControlCode;
|
||||
PSTATUS_BLOCK StatusBlock;
|
||||
PVOID InputBuffer;
|
||||
ULONG InputBufferLength;
|
||||
PVOID OutputBuffer;
|
||||
ULONG OutputBufferLength;
|
||||
} VIDEO_REQUEST_PACKET, *PVIDEO_REQUEST_PACKET;
|
||||
|
||||
typedef struct _VIDEO_PORT_CONFIG_INFO
|
||||
{
|
||||
ULONG Length;
|
||||
ULONG SystemIoBusNumber;
|
||||
INTERFACE_TYPE AdapterInterfaceType;
|
||||
ULONG BusInterruptLevel;
|
||||
ULONG BusInterruptVector;
|
||||
KINTERRUPT_MODE InterruptMode;
|
||||
ULONG NumEmulatorAccessEntries;
|
||||
PEMULATOR_ACCESS_ENTRY EmulatorAccessEntries;
|
||||
ULONG EmulatorAccessEntriesContext;
|
||||
PHYSICAL_ADDRESS VdmPhysicalVideoMemoryAddress;
|
||||
ULONG VdmPhysicalVideoMemoryLength;
|
||||
ULONG HardwareStateSize;
|
||||
ULONG DmaChannel;
|
||||
ULONG DmaPort;
|
||||
UCHAR DmaShareable;
|
||||
UCHAR InterruptShareable;
|
||||
} VIDEO_PORT_CONFIG_INFO, *PVIDEO_PORT_CONFIG_INFO;
|
||||
|
||||
typedef VP_STATUS (*PVIDEO_HW_FIND_ADAPTER) (PVOID HwDeviceExtension,
|
||||
PVOID HwContext,
|
||||
PWSTR ArgumentString,
|
||||
PVIDEO_PORT_CONFIG_INFO ConfigInfo,
|
||||
PUCHAR Again);
|
||||
typedef BOOLEAN (*PVIDEO_HW_INITIALIZE)(PVOID HwDeviceExtension);
|
||||
typedef BOOLEAN (*PVIDEO_HW_INTERRUPT)(PVOID HwDeviceExtension);
|
||||
typedef BOOLEAN (*PVIDEO_HW_START_IO)(PVOID HwDeviceExtension,
|
||||
PVIDEO_REQUEST_PACKET RequestPacket);
|
||||
typedef BOOLEAN (*PVIDEO_HW_RESET_HW)(PVOID HwDeviceExtension,
|
||||
ULONG Columns,
|
||||
ULONG Rows);
|
||||
typedef VOID (*PVIDEO_HW_TIMER)(PVOID HwDeviceExtension);
|
||||
|
||||
typedef struct _VIDEO_HW_INITIALIZATION_DATA
|
||||
{
|
||||
ULONG HwInitDataSize;
|
||||
INTERFACE_TYPE AdapterInterfaceType;
|
||||
PVIDEO_HW_FIND_ADAPTER HwFindAdapter;
|
||||
PVIDEO_HW_INITIALIZE HwInitialize;
|
||||
PVIDEO_HW_INTERRUPT HwInterrupt;
|
||||
PVIDEO_HW_START_IO HwStartIO;
|
||||
ULONG HwDeviceExtensionSize;
|
||||
ULONG StartingDeviceNumber;
|
||||
PVIDEO_HW_RESET_HW HwResetHw;
|
||||
PVIDEO_HW_TIMER HwTimer;
|
||||
} VIDEO_HW_INITIALIZATION_DATA, *PVIDEO_HW_INITIALIZATION_DATA;
|
||||
|
||||
typedef VP_STATUS (*PMINIPORT_GET_REGISTRY_ROUTINE)(PVOID HwDeviceExtension,
|
||||
PVOID Context,
|
||||
PWSTR ValueName,
|
||||
PVOID ValueData,
|
||||
ULONG ValueLength);
|
||||
typedef VP_STATUS (*PMINIPORT_QUERY_DEVICE_ROUTINE)(PVOID HwDeviceExtension,
|
||||
PVOID Context,
|
||||
VIDEO_DEVICE_DATA_TYPE DeviceDataType,
|
||||
PVOID Identifier,
|
||||
ULONG IdentiferLength,
|
||||
PVOID ConfigurationData,
|
||||
ULONG ConfigurationDataLength,
|
||||
PVOID ComponentInformation,
|
||||
ULONG ComponentInformationLength);
|
||||
typedef BOOLEAN (*PMINIPORT_SYNCHRONIZE_ROUTINE)(PVOID Context);
|
||||
|
||||
|
||||
ULONG VideoPortCompareMemory(IN PVOID Source1, IN PVOID Source2, IN ULONG Length);
|
||||
VOID VideoPortDebugPrint(IN ULONG DebugPrintLevel, IN PCHAR DebugMessage, ...);
|
||||
VP_STATUS VideoPortDisableInterrupt(IN PVOID HwDeviceExtension);
|
||||
VP_STATUS VideoPortEnableInterrupt(IN PVOID HwDeviceExtension);
|
||||
VOID VideoPortFreeDeviceBase(IN PVOID HwDeviceExtension, IN PVOID MappedAddress);
|
||||
ULONG VideoPortGetBusData(IN PVOID HwDeviceExtension,
|
||||
IN BUS_DATA_TYPE BusDataType,
|
||||
IN ULONG SlotNumber,
|
||||
OUT PVOID Buffer,
|
||||
IN ULONG Offset,
|
||||
IN ULONG Length);
|
||||
UCHAR VideoPortGetCurrentIrql(VOID);
|
||||
PVOID VideoPortGetDeviceBase(IN PVOID HwDeviceExtension,
|
||||
IN PHYSICAL_ADDRESS IoAddress,
|
||||
IN ULONG NumberOfUchars,
|
||||
IN UCHAR InIoSpace);
|
||||
VP_STATUS VideoPortGetDeviceData(IN PVOID HwDeviceExtension,
|
||||
IN VIDEO_DEVICE_DATA_TYPE DeviceDataType,
|
||||
IN PMINIPORT_QUERY_DEVICE_ROUTINE CallbackRoutine,
|
||||
IN PVOID Context);
|
||||
VP_STATUS VideoPortGetAccessRanges(IN PVOID HwDeviceExtension,
|
||||
IN ULONG NumRequestedResources,
|
||||
IN PIO_RESOURCE_DESCRIPTOR RequestedResources OPTIONAL,
|
||||
IN ULONG NumAccessRanges,
|
||||
IN PVIDEO_ACCESS_RANGE AccessRanges,
|
||||
IN PVOID VendorId,
|
||||
IN PVOID DeviceId,
|
||||
IN PULONG Slot);
|
||||
VP_STATUS VideoPortGetRegistryParameters(IN PVOID HwDeviceExtension,
|
||||
IN PWSTR ParameterName,
|
||||
IN UCHAR IsParameterFileName,
|
||||
IN PMINIPORT_GET_REGISTRY_ROUTINE GetRegistryRoutine,
|
||||
IN PVOID Context);
|
||||
ULONG VideoPortInitialize(IN PVOID Context1,
|
||||
IN PVOID Context2,
|
||||
IN PVIDEO_HW_INITIALIZATION_DATA HwInitializationData,
|
||||
IN PVOID HwContext);
|
||||
VP_STATUS VideoPortInt10(IN PVOID HwDeviceExtension,
|
||||
IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments);
|
||||
VOID VideoPortLogError(IN PVOID HwDeviceExtension,
|
||||
IN PVIDEO_REQUEST_PACKET Vrp OPTIONAL,
|
||||
IN VP_STATUS ErrorCode,
|
||||
IN ULONG UniqueId);
|
||||
VP_STATUS VideoPortMapBankedMemory(IN PVOID HwDeviceExtension,
|
||||
IN PHYSICAL_ADDRESS PhysicalAddress,
|
||||
IN PULONG Length,
|
||||
IN PULONG InIoSpace,
|
||||
INOUT PVOID *VirtualAddress,
|
||||
IN ULONG BankLength,
|
||||
IN UCHAR ReadWriteBank,
|
||||
IN PBANKED_SECTION_ROUTINE BankRoutine,
|
||||
IN PVOID Context);
|
||||
VP_STATUS VideoPortMapMemory(IN PVOID HwDeviceExtension,
|
||||
IN PHYSICAL_ADDRESS PhysicalAddress,
|
||||
IN PULONG Length,
|
||||
IN PULONG InIoSpace,
|
||||
INOUT PVOID *VirtualAddress);
|
||||
VOID VideoPortMoveMemory(OUT PVOID Destination,
|
||||
IN PVOID Source,
|
||||
IN ULONG Length);
|
||||
UCHAR VideoPortReadPortUchar(IN PUCHAR Port);
|
||||
USHORT VideoPortReadPortUshort(IN PUSHORT Port);
|
||||
ULONG VideoPortReadPortUlong(IN PULONG Port);
|
||||
VOID VideoPortReadPortBufferUchar(IN PUCHAR Port, OUT PUCHAR Buffer, IN ULONG Count);
|
||||
VOID VideoPortReadPortBufferUshort(IN PUSHORT Port, OUT PUSHORT Buffer, IN ULONG Count);
|
||||
VOID VideoPortReadPortBufferUlong(IN PULONG Port, OUT PULONG Buffer, IN ULONG Count);
|
||||
UCHAR VideoPortReadRegisterUchar(IN PUCHAR Register);
|
||||
USHORT VideoPortReadRegisterUshort(IN PUSHORT Register);
|
||||
ULONG VideoPortReadRegisterUlong(IN PULONG Register);
|
||||
VOID VideoPortReadRegisterBufferUchar(IN PUCHAR Register, OUT PUCHAR Buffer, IN ULONG Count);
|
||||
VOID VideoPortReadRegisterBufferUshort(IN PUSHORT Register, OUT PUSHORT Buffer, IN ULONG Count);
|
||||
VOID VideoPortReadRegisterBufferUlong(IN PULONG Register, OUT PULONG Buffer, IN ULONG Count);
|
||||
BOOLEAN VideoPortScanRom(IN PVOID HwDeviceExtension,
|
||||
IN PUCHAR RomBase,
|
||||
IN ULONG RomLength,
|
||||
IN PUCHAR String);
|
||||
ULONG VideoPortSetBusData(IN PVOID HwDeviceExtension,
|
||||
IN BUS_DATA_TYPE BusDataType,
|
||||
IN ULONG SlotNumber,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Offset,
|
||||
IN ULONG Length);
|
||||
VP_STATUS VideoPortSetRegistryParameters(IN PVOID HwDeviceExtension,
|
||||
IN PWSTR ValueName,
|
||||
IN PVOID ValueData,
|
||||
IN ULONG ValueLength);
|
||||
VP_STATUS VideoPortSetTrappedEmulatorPorts(IN PVOID HwDeviceExtension,
|
||||
IN ULONG NumAccessRanges,
|
||||
IN PVIDEO_ACCESS_RANGE AccessRange);
|
||||
VOID VideoPortStallExecution(IN ULONG Microseconds);
|
||||
VOID VideoPortStartTimer(IN PVOID HwDeviceExtension);
|
||||
VOID VideoPortStopTimer(IN PVOID HwDeviceExtension);
|
||||
BOOLEAN VideoPortSynchronizeExecution(IN PVOID HwDeviceExtension,
|
||||
IN VIDEO_SYNCHRONIZE_PRIORITY Priority,
|
||||
IN PMINIPORT_SYNCHRONIZE_ROUTINE SynchronizeRoutine,
|
||||
INOUT PVOID Context);
|
||||
VP_STATUS VideoPortUnmapMemory(IN PVOID HwDeviceExtension,
|
||||
IN PVOID VirtualAddress,
|
||||
IN HANDLE ProcessHandle);
|
||||
VP_STATUS VideoPortVerifyAccessRanges(IN PVOID HwDeviceExtension,
|
||||
IN ULONG NumAccessRanges,
|
||||
IN PVIDEO_ACCESS_RANGE AccessRanges);
|
||||
VOID VideoPortWritePortUchar(IN PUCHAR Port, IN UCHAR Value);
|
||||
VOID VideoPortWritePortUshort(IN PUSHORT Port, IN USHORT Value);
|
||||
VOID VideoPortWritePortUlong(IN PULONG Port, IN ULONG Value);
|
||||
VOID VideoPortWritePortBufferUchar(IN PUCHAR Port, IN PUCHAR Buffer, IN ULONG Count);
|
||||
VOID VideoPortWritePortBufferUshort(IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count);
|
||||
VOID VideoPortWritePortBufferUlong(IN PULONG Port, IN PULONG Buffer, IN ULONG Count);
|
||||
VOID VideoPortWriteRegisterUchar(IN PUCHAR Register, IN UCHAR Value);
|
||||
VOID VideoPortWriteRegisterUshort(IN PUSHORT Register, IN USHORT Value);
|
||||
VOID VideoPortWriteRegisterUlong(IN PULONG Register, IN ULONG Value);
|
||||
VOID VideoPortWriteRegisterBufferUchar(IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count);
|
||||
VOID VideoPortWriteRegisterBufferUshort(IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count);
|
||||
VOID VideoPortWriteRegisterBufferUlong(IN PULONG Register, IN PULONG Buffer, IN ULONG Count);
|
||||
VOID VideoPortZeroMemory(OUT PVOID Destination, IN ULONG Length);
|
||||
VOID VideoPortZeroDeviceMemory(OUT PVOID Destination, IN ULONG Length);
|
||||
|
||||
|
Loading…
Reference in a new issue