UCHAR
VideoPortGetCurrentIrql(VOID)
{
- return KeGetCurrentIrql;
+ return KeGetCurrentIrql();
}
PVOID
IN ULONG NumberOfUchars,
IN UCHAR InIoSpace)
{
- UNIMPLEMENTED;
+ if (InIoSpace)
+ {
+ return MmMapIoSpace(IoAddress, NumberOfUChars, FALSE);
+ }
+ else
+ {
+ UNIMPLEMENTED;
+ return NULL;
+ }
}
VP_STATUS
/* 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 =
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
IN PVOID Source,
IN ULONG Length)
{
- UNIMPLEMENTED;
+ RtlMoveMemory(Destination, Source, Length);
}
UCHAR
IN ULONG Offset,
IN ULONG Length)
{
- UNIMPLEMENTED;
+ return HalSetBusDataByOffset(BusDataType,
+ 0,
+ SlotNumber,
+ Buffer,
+ Offset,
+ Length);
}
VP_STATUS
* 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