55 *AccessRangeCount = 0;
62 DeviceExtension->SystemIoBusNumber,
63 DeviceExtension->SystemIoSlotNumber,
72 DriverExtension->InitializationData.HwGetLegacyResources(PciConfig.VendorID,
79 *AccessRanges =
DriverExtension->InitializationData.HwLegacyResourceList;
80 *AccessRangeCount =
DriverExtension->InitializationData.HwLegacyResourceCount;
83 INFO_(VIDEOPRT,
"Got %d legacy access ranges\n", *AccessRangeCount);
98 ULONG AccessRangeCount, ListSize,
i;
111 if (!AccessRangeCount)
114 return Irp->IoStatus.Status;
132 ResList->
List[0].
Count += AccessRangeCount;
137 Irp->IoStatus.Information = 0;
157 ResList->
List[0].
Count = AccessRangeCount;
162 for (
i = 0;
i < AccessRangeCount;
i++)
165 CurrentDescriptor->
Option = 0;
167 if (AccessRanges[
i].RangeInIoSpace)
175 CurrentDescriptor->
Flags = 0;
182 CurrentDescriptor->
u.
Port.Alignment = 1;
193 CurrentDescriptor->
u.
Memory.Alignment = 1;
214 if (DeviceExtension->IsLegacyDevice || DeviceExtension->IsLegacyDetect || DeviceExtension->IsVgaDetect)
217 DeviceExtension->DriverObject,
219 DeviceExtension->PhysicalDeviceObject,
221 sizeof(EmptyResourceList),
227 "VideoPortReleaseResources (Detect) failed with 0x%08lx ; ConflictDetected: %s\n",
228 Status, ConflictDetected ?
"TRUE" :
"FALSE");
234 DeviceExtension->DriverObject,
237 DeviceExtension->PhysicalDeviceObject,
239 sizeof(EmptyResourceList),
245 "VideoPortReleaseResources (Usage) failed with 0x%08lx ; ConflictDetected: %s\n",
246 Status, ConflictDetected ?
"TRUE" :
"FALSE");
276 WARN_(VIDEOPRT,
"ZwOpenSection() failed! (0x%x)\n",
Status);
282 Status = ZwMapViewOfSection(hMemObj,
295 WARN_(VIDEOPRT,
"ZwMapViewOfSection() failed! (0x%x)\n",
Status);
310 if (!Res || Res->
Count == 0)
313 for (Desc =
Full->PartialResourceList.PartialDescriptors;
314 Desc < Full->PartialResourceList.PartialDescriptors +
Full->PartialResourceList.Count;
319 if (Desc->
u.
Port.Start.QuadPart == Range->RangeStart.QuadPart &&
320 Desc->
u.
Port.Length == Range->RangeLength)
325 if (Desc->
u.
Memory.Start.QuadPart == Range->RangeStart.QuadPart &&
326 Desc->
u.
Memory.Length == Range->RangeLength)
349 INFO_(VIDEOPRT,
"- IoAddress: %lx\n", IoAddress.u.LowPart);
350 INFO_(VIDEOPRT,
"- NumberOfUchars: %lx\n", NumberOfUchars);
351 INFO_(VIDEOPRT,
"- InIoSpace: %x\n", InIoSpace);
353 InIoSpace &= ~VIDEO_MEMORY_SPACE_DENSE;
357 INFO_(VIDEOPRT,
"ProcessHandle is not NULL (0x%x) but InIoSpace does not have "
358 "VIDEO_MEMORY_SPACE_USER_MODE set! Setting "
359 "VIDEO_MEMORY_SPACE_USER_MODE.\n",
365 INFO_(VIDEOPRT,
"ProcessHandle is NULL (0x%x) but InIoSpace does have "
366 "VIDEO_MEMORY_SPACE_USER_MODE set! Setting ProcessHandle "
367 "to NtCurrentProcess()\n",
373 !
IsListEmpty(&DeviceExtension->AddressMappingListHead))
375 Entry = DeviceExtension->AddressMappingListHead.Flink;
376 while (
Entry != &DeviceExtension->AddressMappingListHead)
383 NumberOfUchars <= AddressMapping->NumberOfUchars)
399 DeviceExtension->AdapterInterfaceType,
400 DeviceExtension->SystemIoBusNumber,
430 MappedAddress =
NULL;
438 ERR_(VIDEOPRT,
"IntVideoPortMapPhysicalMemory() failed! (0x%x)\n", NtStatus);
443 INFO_(VIDEOPRT,
"Mapped user address = 0x%08x\n", MappedAddress);
453 if (MappedAddress !=
NULL)
466 if (AddressMapping ==
NULL)
467 return MappedAddress;
476 &DeviceExtension->AddressMappingListHead,
477 &AddressMapping->
List);
480 return MappedAddress;
484 "Couldn't map video memory. IoAddress: 0x%lx, NumberOfUchars: 0x%lx, InIoSpace: 0x%x\n",
485 IoAddress.u.LowPart, NumberOfUchars, InIoSpace);
501 Entry = DeviceExtension->AddressMappingListHead.Flink;
502 while (
Entry != &DeviceExtension->AddressMappingListHead)
534 WARN_(VIDEOPRT,
"Warning: Mapping for address 0x%p not found!\n", MappedAddress);
551 TRACE_(VIDEOPRT,
"VideoPortGetDeviceBase\n");
570 TRACE_(VIDEOPRT,
"VideoPortFreeDeviceBase\n");
592 TRACE_(VIDEOPRT,
"VideoPortMapBankedMemory\n");
613 TRACE_(VIDEOPRT,
"VideoPortMapMemory\n");
638 TRACE_(VIDEOPRT,
"VideoPortFreeDeviceBase\n");
707 ULONG FunctionNumber;
711 UINT AssignedCount = 0;
720 ULONG LegacyAccessRangeCount;
726 TRACE_(VIDEOPRT,
"VideoPortGetAccessRanges(%d, %p, %d, %p)\n",
727 NumRequestedResources, RequestedResources, NumAccessRanges, AccessRanges);
733 if (NumRequestedResources == 0)
756 VendorIdToFind = VendorId !=
NULL ? *(
PUSHORT)VendorId : 0;
757 DeviceIdToFind = DeviceId !=
NULL ? *(
PUSHORT)DeviceId : 0;
759 if (VendorIdToFind == 0 && DeviceIdToFind == 0)
765 INFO_(VIDEOPRT,
"Looking for VendorId 0x%04x DeviceId 0x%04x\n",
766 VendorIdToFind, DeviceIdToFind);
771 PciSlotNumber.
u.
bits.Reserved = 0;
775 for (FunctionNumber = 0; FunctionNumber <
PCI_MAX_FUNCTION; FunctionNumber++)
777 INFO_(VIDEOPRT,
"- Function number: %d\n", FunctionNumber);
778 PciSlotNumber.
u.
bits.FunctionNumber = FunctionNumber;
789 INFO_(VIDEOPRT,
"- Slot 0x%02x (Device %d Function %d) VendorId 0x%04x "
792 PciSlotNumber.
u.
bits.DeviceNumber,
793 PciSlotNumber.
u.
bits.FunctionNumber,
797 if ((VendorIdToFind == 0 ||
Config.VendorID == VendorIdToFind) &&
798 (DeviceIdToFind == 0 ||
Config.DeviceID == DeviceIdToFind))
800 DeviceAndVendorFound =
TRUE;
805 if (DeviceAndVendorFound)
810 WARN_(VIDEOPRT,
"Didn't find device.\n");
825 WARN_(VIDEOPRT,
"HalAssignSlotResources failed with status %x.\n",
Status);
833 &LegacyAccessRanges, &LegacyAccessRangeCount);
837 if (NumAccessRanges < LegacyAccessRangeCount)
839 ERR_(VIDEOPRT,
"Too many legacy access ranges found\n");
844 AssignedCount = LegacyAccessRangeCount;
861 ResReqList->
List[0].
Count = NumRequestedResources;
892 INFO_(VIDEOPRT,
"InterfaceType %u BusNumber List %u Device BusNumber %u Version %u Revision %u\n",
907 AssignedCount >= NumAccessRanges)
909 ERR_(VIDEOPRT,
"Too many access ranges found\n");
914 INFO_(VIDEOPRT,
"Memory range starting at 0x%08x length 0x%08x\n",
916 AccessRanges[AssignedCount].RangeStart =
Descriptor->u.Memory.Start;
917 AccessRanges[AssignedCount].RangeLength =
Descriptor->u.Memory.Length;
918 AccessRanges[AssignedCount].RangeInIoSpace = 0;
919 AccessRanges[AssignedCount].RangeVisible = 0;
920 AccessRanges[AssignedCount].RangeShareable =
922 AccessRanges[AssignedCount].RangePassive = 0;
927 INFO_(VIDEOPRT,
"Port range starting at 0x%04x length %d\n",
929 AccessRanges[AssignedCount].RangeStart =
Descriptor->u.Port.Start;
930 AccessRanges[AssignedCount].RangeLength =
Descriptor->u.Port.Length;
931 AccessRanges[AssignedCount].RangeInIoSpace = 1;
932 AccessRanges[AssignedCount].RangeVisible = 0;
933 AccessRanges[AssignedCount].RangeShareable =
935 AccessRanges[AssignedCount].RangePassive = 0;
991 ULONG ResourceListSize;
997 TRACE_(VIDEOPRT,
"VideoPortVerifyAccessRanges\n");
1000 if (NumAccessRanges && !AccessRanges)
1005 if (NumAccessRanges == 0)
1039 sizeof(PciCommand));
1042 for (
i = 0;
i < NumAccessRanges;
i++)
1044 if (AccessRanges[
i].RangeInIoSpace)
1048 WARN_(VIDEOPRT,
"PCI I/O space disabled; refusing access range claim\n");
1056 WARN_(VIDEOPRT,
"PCI memory space disabled; refusing access range claim\n");
1066 for (
i = 0;
i < NumAccessRanges; ++
i)
1088 WARN_(VIDEOPRT,
"ExAllocatePool() failed\n");
1097 ResourceList->List[0].PartialResourceList.Revision = 1;
1098 ResourceList->List[0].PartialResourceList.Count = Needed;
1101 for (
i = 0;
i < NumAccessRanges; ++
i)
1109 PartialDescriptor = &
ResourceList->List[0].PartialResourceList.PartialDescriptors[
j++];
1110 if (AccessRanges[
i].RangeInIoSpace)
1113 PartialDescriptor->
u.
Port.Start = AccessRanges[
i].RangeStart;
1114 PartialDescriptor->
u.
Port.Length = AccessRanges[
i].RangeLength;
1119 PartialDescriptor->
u.
Memory.Start = AccessRanges[
i].RangeStart;
1120 PartialDescriptor->
u.
Memory.Length = AccessRanges[
i].RangeLength;
1124 PartialDescriptor->
Flags = 0;
1154 INFO_(VIDEOPRT,
"VGA detect->usage fallback: Status=0x%lx Conflict=%d fbStatus=0x%lx fbConflict=%d\n",
1155 Status, ConflictDetected, fbStatus, fbConflict);
1157 ConflictDetected = fbConflict;
1198 if (NumAccessRanges)
1228 TRACE_(VIDEOPRT,
"VideoPortGetDeviceData\n");
1244 TRACE_(VIDEOPRT,
"VideoPortAllocatePool\n");
1270 TRACE_(VIDEOPRT,
"VideoPortAllocateBuffer\n");
1284 TRACE_(VIDEOPRT,
"VideoPortReleaseBuffer\n");
1327 pVrp->OutputBuffer =
NULL;
1341 pVrp->OutputBuffer =
Buffer;
1342 pVrp->OutputBufferLength = pVrp->InputBufferLength;
1399 TRACE_(VIDEOPRT,
"VideoPortGetBusData\n");
1403 if (BusDataType !=
Cmos)
1434 TRACE_(VIDEOPRT,
"VideoPortSetBusData\n");
1438 if (BusDataType !=
Cmos)
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
_In_ PCHAR _In_ ULONG DeviceNumber
#define ERROR_DEV_NOT_EXIST
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INVALID_FUNCTION
#define NT_SUCCESS(StatCode)
#define ERROR_INVALID_PARAMETER
NTHALAPI NTSTATUS NTAPI HalAssignSlotResources(PUNICODE_STRING, PUNICODE_STRING, PDRIVER_OBJECT, PDEVICE_OBJECT, INTERFACE_TYPE, ULONG, ULONG, PCM_RESOURCE_LIST *)
NTHALAPI ULONG NTAPI HalGetBusData(BUS_DATA_TYPE, ULONG, ULONG, PVOID, ULONG)
#define RemoveEntryList(Entry)
#define InsertHeadList(ListHead, Entry)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define IsListEmpty(ListHead)
#define ExAllocatePool(type, size)
_Must_inspect_result_ _In_ PFLT_GET_OPERATION_STATUS_CALLBACK CallbackRoutine
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
ULONG NTAPI HalSetBusDataByOffset(IN BUS_DATA_TYPE BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
BOOLEAN NTAPI HalTranslateBusAddress(IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress)
ULONG NTAPI HalGetBusDataByOffset(IN BUS_DATA_TYPE BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
NTSTATUS NTAPI IoReportResourceUsage(_In_opt_ PUNICODE_STRING DriverClassName, _In_ PDRIVER_OBJECT DriverObject, _In_reads_bytes_opt_(DriverListSize) PCM_RESOURCE_LIST DriverList, _In_opt_ ULONG DriverListSize, _In_opt_ PDEVICE_OBJECT DeviceObject, _In_reads_bytes_opt_(DeviceListSize) PCM_RESOURCE_LIST DeviceList, _In_opt_ ULONG DeviceListSize, _In_ BOOLEAN OverrideConflict, _Out_ PBOOLEAN ConflictDetected)
Reports hardware resources in the \Registry\Machine\Hardware\ResourceMap tree, so that a subsequently...
NTSTATUS NTAPI IoAssignResources(_In_ PUNICODE_STRING RegistryPath, _In_opt_ PUNICODE_STRING DriverClassName, _In_ PDRIVER_OBJECT DriverObject, _In_opt_ PDEVICE_OBJECT DeviceObject, _In_opt_ PIO_RESOURCE_REQUIREMENTS_LIST RequestedResources, _Inout_ PCM_RESOURCE_LIST *AllocatedResources)
VOID NTAPI MmUnmapIoSpace(IN PVOID BaseAddress, IN SIZE_T NumberOfBytes)
PVOID NTAPI MmMapIoSpace(IN PHYSICAL_ADDRESS PhysicalAddress, IN SIZE_T NumberOfBytes, IN MEMORY_CACHING_TYPE CacheType)
VOID NTAPI MmProbeAndLockPages(IN PMDL Mdl, IN KPROCESSOR_MODE AccessMode, IN LOCK_OPERATION Operation)
VOID NTAPI MmUnlockPages(IN PMDL Mdl)
#define ExFreePoolWithTag(_P, _T)
#define InitializeObjectAttributes(p, n, a, r, s)
_Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PCM_RESOURCE_LIST * AllocatedResources
#define CM_RESOURCE_MEMORY_READ_WRITE
#define CM_RESOURCE_PORT_PASSIVE_DECODE
#define CM_RESOURCE_PORT_10_BIT_DECODE
NTSYSAPI NTSTATUS NTAPI ZwOpenSection(_Out_ PHANDLE SectionHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
_In_ HANDLE ProcessHandle
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
#define _In_reads_opt_(s)
#define SECTION_ALL_ACCESS
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
#define NtCurrentProcess()
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
PVOID NTAPI IoGetDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress)
LONG NTAPI KeReleaseMutex(IN PKMUTEX Mutex, IN BOOLEAN Wait)
#define STATUS_CONFLICTING_ADDRESSES
PPCI_DRIVER_EXTENSION DriverExtension
NTSTATUS NTAPI IoReportResourceForDetection(IN PDRIVER_OBJECT DriverObject, IN PCM_RESOURCE_LIST DriverList OPTIONAL, IN ULONG DriverListSize OPTIONAL, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PCM_RESOURCE_LIST DeviceList OPTIONAL, IN ULONG DeviceListSize OPTIONAL, OUT PBOOLEAN ConflictDetected)
struct _CM_RESOURCE_LIST CM_RESOURCE_LIST
#define CmResourceTypeMemory
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR CM_PARTIAL_RESOURCE_DESCRIPTOR
#define CmResourceTypePort
#define CmResourceTypeInterrupt
struct _IO_RESOURCE_DESCRIPTOR * PIO_RESOURCE_DESCRIPTOR
enum _BUS_DATA_TYPE BUS_DATA_TYPE
VOID(NTAPI * PBANKED_SECTION_ROUTINE)(IN ULONG ReadBank, IN ULONG WriteBank, IN PVOID Context)
struct _IO_RESOURCE_DESCRIPTOR IO_RESOURCE_DESCRIPTOR
#define VIDEO_RANGE_10_BIT_DECODE
#define VIDEO_MEMORY_SPACE_USER_MODE
enum _DMA_FLAGS DMA_FLAGS
enum _VP_POOL_TYPE VP_POOL_TYPE
VP_STATUS(NTAPI * PMINIPORT_QUERY_DEVICE_ROUTINE)(IN PVOID HwDeviceExtension, IN PVOID Context, IN VIDEO_DEVICE_DATA_TYPE DeviceDataType, IN PVOID Identifier, IN ULONG IdentifierLength, IN PVOID ConfigurationData, IN ULONG ConfigurationDataLength, IN OUT PVOID ComponentInformation, IN ULONG ComponentInformationLength)
#define VIDEO_MEMORY_SPACE_P6CACHE
enum _VIDEO_DEVICE_DATA_TYPE VIDEO_DEVICE_DATA_TYPE
#define VIDEO_RANGE_PASSIVE_DECODE
struct _VIDEO_ACCESS_RANGE VIDEO_ACCESS_RANGE
enum _VP_LOCK_OPERATION VP_LOCK_OPERATION
PULONG MinorVersion OPTIONAL
base of all file and directory entries
CM_PARTIAL_RESOURCE_LIST PartialResourceList
INTERFACE_TYPE InterfaceType
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@432::@437 Memory
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@432::@434 Port
union _CM_PARTIAL_RESOURCE_DESCRIPTOR::@432 u
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]
CM_FULL_RESOURCE_DESCRIPTOR List[1]
PDEVICE_OBJECT DeviceObject
struct _IO_RESOURCE_DESCRIPTOR::@2250::@2251 Port
struct _IO_RESOURCE_DESCRIPTOR::@2250::@2252 Memory
union _IO_RESOURCE_DESCRIPTOR::@2250 u
IO_RESOURCE_DESCRIPTOR Descriptors[1]
INTERFACE_TYPE InterfaceType
struct _PCI_SLOT_NUMBER::@4345::@4346 bits
union _PCI_SLOT_NUMBER::@4345 u
PHYSICAL_ADDRESS RangeStart
PHYSICAL_ADDRESS IoAddress
PDEVICE_OBJECT PhysicalDeviceObject
PCM_RESOURCE_LIST AllocatedResources
INTERFACE_TYPE AdapterInterfaceType
UNICODE_STRING RegistryPath
PDRIVER_OBJECT DriverObject
#define RTL_CONSTANT_STRING(s)
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_NO_SUCH_DEVICE
struct _LARGE_INTEGER::@2502 u
PVIDEO_PORT_DEVICE_EXTENSION VgaDeviceExtension
PVIDEO_ACCESS_RANGE VgaRanges
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
struct _VIDEO_PORT_DEVICE_EXTENSTION * PVIDEO_PORT_DEVICE_EXTENSION
#define TAG_VIDEO_PORT_BUFFER
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
_Must_inspect_result_ _In_ WDFCMRESLIST List
_In_ WDFIORESREQLIST _In_ ULONG SlotNumber
VOID NTAPI VideoPortFreeDeviceBase(IN PVOID HwDeviceExtension, IN PVOID MappedAddress)
VP_STATUS NTAPI VideoPortGetAccessRanges(_In_ PVOID HwDeviceExtension, _In_opt_ ULONG NumRequestedResources, _In_reads_opt_(NumRequestedResources) PIO_RESOURCE_DESCRIPTOR RequestedResources, _In_ ULONG NumAccessRanges, _Out_writes_(NumAccessRanges) PVIDEO_ACCESS_RANGE AccessRanges, _In_ PVOID VendorId, _In_ PVOID DeviceId, _Out_ PULONG Slot)
Retrieves bus-relative (mainly PCI) hardware resources access ranges and, if possible,...
NTSTATUS NTAPI IntVideoPortMapPhysicalMemory(IN HANDLE Process, IN PHYSICAL_ADDRESS PhysicalAddress, IN ULONG SizeInBytes, IN ULONG Protect, IN OUT PVOID *VirtualAddress OPTIONAL)
VOID NTAPI VideoPortUnlockBuffer(IN PVOID HwDeviceExtension, IN PVOID Mdl)
static UNICODE_STRING VideoClassName
ULONG NTAPI VideoPortSetBusData(IN PVOID HwDeviceExtension, IN BUS_DATA_TYPE BusDataType, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
static BOOLEAN IntAccessRangeIsInAllocatedResources(_In_ PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension, _In_ PVIDEO_ACCESS_RANGE Range)
VP_STATUS NTAPI VideoPortMapMemory(IN PVOID HwDeviceExtension, IN PHYSICAL_ADDRESS PhysicalAddress, IN PULONG Length, IN PULONG InIoSpace, OUT PVOID *VirtualAddress)
VP_STATUS NTAPI VideoPortMapBankedMemory(IN PVOID HwDeviceExtension, IN PHYSICAL_ADDRESS PhysicalAddress, IN PULONG Length, IN PULONG InIoSpace, OUT PVOID *VirtualAddress, IN ULONG BankLength, IN UCHAR ReadWriteBank, IN PBANKED_SECTION_ROUTINE BankRoutine, IN PVOID Context)
PVOID NTAPI VideoPortLockBuffer(IN PVOID HwDeviceExtension, IN PVOID BaseAddress, IN ULONG Length, IN VP_LOCK_OPERATION Operation)
PVOID NTAPI IntVideoPortMapMemory(IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension, IN PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfUchars, IN ULONG InIoSpace, IN HANDLE ProcessHandle, OUT VP_STATUS *Status)
VOID NTAPI VideoPortFreePool(IN PVOID HwDeviceExtension, IN PVOID Ptr)
static BOOLEAN IntIsVgaSaveDriver(IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension)
VOID NTAPI IntVideoPortUnmapMemory(IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension, IN PVOID MappedAddress)
ULONG NTAPI VideoPortGetBusData(IN PVOID HwDeviceExtension, IN BUS_DATA_TYPE BusDataType, IN ULONG SlotNumber, OUT PVOID Buffer, IN ULONG Offset, IN ULONG Length)
VP_STATUS NTAPI VideoPortGetDeviceData(IN PVOID HwDeviceExtension, IN VIDEO_DEVICE_DATA_TYPE DeviceDataType, IN PMINIPORT_QUERY_DEVICE_ROUTINE CallbackRoutine, IN PVOID Context)
VP_STATUS NTAPI VideoPortVerifyAccessRanges(_In_ PVOID HwDeviceExtension, _In_opt_ ULONG NumAccessRanges, _In_reads_opt_(NumAccessRanges) PVIDEO_ACCESS_RANGE AccessRanges)
Claims or releases a range of hardware resources and checks for conflicts.
PVOID NTAPI VideoPortAllocatePool(IN PVOID HwDeviceExtension, IN VP_POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag)
VP_STATUS NTAPI VideoPortSetTrappedEmulatorPorts(IN PVOID HwDeviceExtension, IN ULONG NumAccessRanges, IN PVIDEO_ACCESS_RANGE AccessRange)
NTSTATUS NTAPI IntVideoPortFilterResourceRequirements(IN PDEVICE_OBJECT DeviceObject, IN PIO_STACK_LOCATION IrpStack, IN PIRP Irp)
VP_STATUS NTAPI VideoPortUnmapMemory(IN PVOID HwDeviceExtension, IN PVOID VirtualAddress, IN HANDLE ProcessHandle)
VP_STATUS NTAPI VideoPortAllocateBuffer(IN PVOID HwDeviceExtension, IN ULONG Size, OUT PVOID *Buffer)
VOID NTAPI VideoPortReleaseBuffer(IN PVOID HwDeviceExtension, IN PVOID Ptr)
VOID IntVideoPortReleaseResources(_In_ PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension)
PVOID NTAPI VideoPortGetDeviceBase(IN PVOID HwDeviceExtension, IN PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfUchars, IN UCHAR InIoSpace)
BOOLEAN NTAPI VideoPortLockPages(IN PVOID HwDeviceExtension, IN OUT PVIDEO_REQUEST_PACKET pVrp, IN PEVENT pUEvent, IN PEVENT pDisplayEvent, IN DMA_FLAGS DmaFlags)
NTSTATUS NTAPI IntVideoPortGetLegacyResources(IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension, OUT PVIDEO_ACCESS_RANGE *AccessRanges, OUT PULONG AccessRangeCount)
@ CmResourceShareDeviceExclusive
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG _Out_ PPHYSICAL_ADDRESS TranslatedAddress
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG AddressSpace
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
#define PCI_ENABLE_IO_SPACE
#define PCI_ENABLE_MEMORY_SPACE
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
struct _IO_RESOURCE_REQUIREMENTS_LIST IO_RESOURCE_REQUIREMENTS_LIST
#define KeWaitForMutexObject
#define PAGE_WRITECOMBINE
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T _In_ SECTION_INHERIT _In_ ULONG _In_ ULONG Protect