changes to support VGA miniport driver

svn path=/trunk/; revision=517
This commit is contained in:
Rex Jolliff 1999-05-26 00:39:11 +00:00
parent 36a7c3cf0d
commit d89e0df163
2 changed files with 39 additions and 6 deletions

View file

@ -106,7 +106,7 @@ VideoPortGetBusData(IN PVOID HwDeviceExtension,
UCHAR UCHAR
VideoPortGetCurrentIrql(VOID) VideoPortGetCurrentIrql(VOID)
{ {
return KeGetCurrentIrql; return KeGetCurrentIrql();
} }
PVOID PVOID
@ -114,8 +114,16 @@ VideoPortGetDeviceBase(IN PVOID HwDeviceExtension,
IN PHYSICAL_ADDRESS IoAddress, IN PHYSICAL_ADDRESS IoAddress,
IN ULONG NumberOfUchars, IN ULONG NumberOfUchars,
IN UCHAR InIoSpace) IN UCHAR InIoSpace)
{
if (InIoSpace)
{
return MmMapIoSpace(IoAddress, NumberOfUChars, FALSE);
}
else
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
return NULL;
}
} }
VP_STATUS VP_STATUS
@ -217,7 +225,9 @@ VideoPortInitialize(IN PVOID Context1,
/* FIXME: Allocate hardware resources for device */ /* FIXME: Allocate hardware resources for device */
/* Allocate interrupt for device */ /* Allocate interrupt for device */
if (HwInitializationData->HwInterrupt != NULL) if (HwInitializationData->HwInterrupt != NULL &&
!(ConfigInfo.BusInterruptLevel == 0 &&
ConfigInfo.BusInterruptVector == 0))
{ {
ExtensionData->IRQL = ConfigInfo.BusInterruptLevel; ExtensionData->IRQL = ConfigInfo.BusInterruptLevel;
ExtensionData->Interrupt = ExtensionData->Interrupt =
@ -310,16 +320,27 @@ VideoPortMapMemory(IN PVOID HwDeviceExtension,
IN PULONG Length, IN PULONG Length,
IN PULONG InIoSpace, IN PULONG InIoSpace,
OUT PVOID *VirtualAddress) OUT PVOID *VirtualAddress)
{
if (*InIoSpace)
{
*VirtualAddress = MmMapIoSpace(PhyiscalAddress, Length, FALSE);
return *VirtualAddress != NULL ? STATUS_SUCCESS : STATUS_INSUFFICFIENT_RESOURCES;
}
else
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
return STATUS_SUCCESS;
}
VOID VOID
VideoPortMoveMemory(OUT PVOID Destination, VideoPortMoveMemory(OUT PVOID Destination,
IN PVOID Source, IN PVOID Source,
IN ULONG Length) IN ULONG Length)
{ {
UNIMPLEMENTED; RtlMoveMemory(Destination, Source, Length);
} }
UCHAR UCHAR
@ -423,7 +444,12 @@ VideoPortSetBusData(IN PVOID HwDeviceExtension,
IN ULONG Offset, IN ULONG Offset,
IN ULONG Length) IN ULONG Length)
{ {
UNIMPLEMENTED; return HalSetBusDataByOffset(BusDataType,
0,
SlotNumber,
Buffer,
Offset,
Length);
} }
VP_STATUS VP_STATUS

View file

@ -27,6 +27,13 @@
* interrupts are handled the same as KM drivers. * interrupts are handled the same as KM drivers.
*/ */
typedef enum _VP_STATUS
{
NO_ERROR,
ERROR_DEV_NOT_EXIST,
ERROR_INVALID_PARAMETER
} VP_STATUS, *PVP_STATUS;
#define VIDEO_MEMORY_SPACE_MEMORY 0x00 #define VIDEO_MEMORY_SPACE_MEMORY 0x00
#define VIDEO_MEMORY_SPACE_IO 0x01 #define VIDEO_MEMORY_SPACE_IO 0x01
#define VIDEO_MEMORY_SPACE_USER_MODE 0x02 #define VIDEO_MEMORY_SPACE_USER_MODE 0x02