mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
changes to support VGA miniport driver
svn path=/trunk/; revision=517
This commit is contained in:
parent
36a7c3cf0d
commit
d89e0df163
2 changed files with 39 additions and 6 deletions
|
@ -106,7 +106,7 @@ VideoPortGetBusData(IN PVOID HwDeviceExtension,
|
|||
UCHAR
|
||||
VideoPortGetCurrentIrql(VOID)
|
||||
{
|
||||
return KeGetCurrentIrql;
|
||||
return KeGetCurrentIrql();
|
||||
}
|
||||
|
||||
PVOID
|
||||
|
@ -115,7 +115,15 @@ VideoPortGetDeviceBase(IN PVOID HwDeviceExtension,
|
|||
IN ULONG NumberOfUchars,
|
||||
IN UCHAR InIoSpace)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
if (InIoSpace)
|
||||
{
|
||||
return MmMapIoSpace(IoAddress, NumberOfUChars, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
VP_STATUS
|
||||
|
@ -217,7 +225,9 @@ VideoPortInitialize(IN PVOID Context1,
|
|||
/* FIXME: Allocate hardware resources 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->Interrupt =
|
||||
|
@ -311,7 +321,18 @@ VideoPortMapMemory(IN PVOID HwDeviceExtension,
|
|||
IN PULONG InIoSpace,
|
||||
OUT PVOID *VirtualAddress)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
if (*InIoSpace)
|
||||
{
|
||||
*VirtualAddress = MmMapIoSpace(PhyiscalAddress, Length, FALSE);
|
||||
|
||||
return *VirtualAddress != NULL ? STATUS_SUCCESS : STATUS_INSUFFICFIENT_RESOURCES;
|
||||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
VOID
|
||||
|
@ -319,7 +340,7 @@ VideoPortMoveMemory(OUT PVOID Destination,
|
|||
IN PVOID Source,
|
||||
IN ULONG Length)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
RtlMoveMemory(Destination, Source, Length);
|
||||
}
|
||||
|
||||
UCHAR
|
||||
|
@ -423,7 +444,12 @@ VideoPortSetBusData(IN PVOID HwDeviceExtension,
|
|||
IN ULONG Offset,
|
||||
IN ULONG Length)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return HalSetBusDataByOffset(BusDataType,
|
||||
0,
|
||||
SlotNumber,
|
||||
Buffer,
|
||||
Offset,
|
||||
Length);
|
||||
}
|
||||
|
||||
VP_STATUS
|
||||
|
|
|
@ -27,6 +27,13 @@
|
|||
* 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_IO 0x01
|
||||
#define VIDEO_MEMORY_SPACE_USER_MODE 0x02
|
||||
|
|
Loading…
Reference in a new issue