62 Irp->IoStatus.Information = 0;
72 sizeof(
Stack->Parameters));
106 TRACE_(VIDEOPRT,
"AgpCommitPhysical - PhysicalContext: 0x%x Pages: %d, Offset: 0x%x\n",
107 PhysicalContext, Pages,
Offset);
119 WARN_(VIDEOPRT,
"Warning: AgpBusInterface->CommitMemory failed (Status = 0x%x)\n",
137 TRACE_(VIDEOPRT,
"AgpFreePhysical - PhysicalContext: 0x%x Pages: %d, Offset: 0x%x\n",
138 PhysicalContext, Pages,
Offset);
148 WARN_(VIDEOPRT,
"Warning: AgpBusInterface->FreeMemory failed (Status = 0x%x)\n",
163 TRACE_(VIDEOPRT,
"AgpReleasePhysical - PhysicalContext: 0x%x\n", PhysicalContext);
174 WARN_(VIDEOPRT,
"Warning: AgpBusInterface->ReleaseMemory failed (Status = 0x%x)\n",
196 TRACE_(VIDEOPRT,
"AgpReservePhysical - Pages: %d, Caching: 0x%x\n", Pages, Caching);
210 WARN_(VIDEOPRT,
"Invalid caching type %d!\n", Caching);
218 if (AgpMapping ==
NULL)
220 WARN_(VIDEOPRT,
"Out of memory! Couldn't allocate AGP mapping structure!\n");
234 WARN_(VIDEOPRT,
"Warning: AgpBusInterface->ReserveMemory failed (Status = 0x%x)\n",
242 *PhysicalContext = (
PVOID)AgpMapping;
259 TRACE_(VIDEOPRT,
"AgpCommitVirtual - VirtualContext: 0x%x Pages: %d, Offset: 0x%x\n",
260 VirtualContext, Pages,
Offset);
291 WARN_(VIDEOPRT,
"Warning: ZwFreeVirtualMemory() failed: Status = 0x%x\n",
Status);
306 WARN_(VIDEOPRT,
"Warning: IntVideoPortMapPhysicalMemory() failed: Status = 0x%x\n",
Status);
313 WARN_(VIDEOPRT,
"Warning: ZwAllocateVirtualMemory() failed: Status = 0x%x\n",
Status);
341 TRACE_(VIDEOPRT,
"AgpFreeVirtual - VirtualContext: 0x%x Pages: %d, Offset: 0x%x\n",
342 VirtualContext, Pages,
Offset);
361 WARN_(VIDEOPRT,
"Warning: ZwUnmapViewOfSection() failed: Status = 0x%x\n",
Status);
373 WARN_(VIDEOPRT,
"Warning: ZwAllocateVirtualMemory() failed: Status = 0x%x\n",
Status);
392 TRACE_(VIDEOPRT,
"AgpReleaseVirtual - VirtualContext: 0x%x\n", VirtualContext);
410 WARN_(VIDEOPRT,
"Warning: ZwFreeVirtualMemory() failed: Status = 0x%x\n",
Status);
430 TRACE_(VIDEOPRT,
"AgpReserveVirtual - ProcessHandle: 0x%x PhysicalContext: 0x%x\n",
439 if (VirtualMapping ==
NULL)
441 WARN_(VIDEOPRT,
"Out of memory! Couldn't allocate AGP virtual mapping structure!\n");
457 MappedAddress =
NULL;
463 WARN_(VIDEOPRT,
"ZwAllocateVirtualMemory() failed: Status = 0x%x\n",
Status);
473 *VirtualContext = (
PVOID)VirtualMapping;
474 return MappedAddress;
486 TRACE_(VIDEOPRT,
"AgpSetRate - Rate: %d\n", Rate);
524 WARN_(VIDEOPRT,
"DeviceExtension->NextDeviceObject is NULL!\n");
540 &GUID_AGP_TARGET_BUS_INTERFACE_STANDARD;
545 WARN_(VIDEOPRT,
"IopInitiatePnpIrp() failed! (Status 0x%x)\n",
Status);
548 INFO_(VIDEOPRT,
"Got AGP driver interface!\n");
VOID NTAPI IntAgpFreeVirtual(IN PVOID HwDeviceExtension, IN PVOID VirtualContext, IN ULONG Pages, IN ULONG Offset)
PVOID NTAPI IntAgpReserveVirtual(IN PVOID HwDeviceExtension, IN HANDLE ProcessHandle, IN PVOID PhysicalContext, OUT PVOID *VirtualContext)
BOOLEAN NTAPI IntAgpSetRate(IN PVOID HwDeviceExtension, IN ULONG Rate)
BOOLEAN NTAPI IntAgpCommitPhysical(IN PVOID HwDeviceExtension, IN PVOID PhysicalContext, IN ULONG Pages, IN ULONG Offset)
NTSTATUS IopInitiatePnpIrp(PDEVICE_OBJECT DeviceObject, PIO_STATUS_BLOCK IoStatusBlock, UCHAR MinorFunction, PIO_STACK_LOCATION Stack OPTIONAL)
VOID NTAPI IntAgpFreePhysical(IN PVOID HwDeviceExtension, IN PVOID PhysicalContext, IN ULONG Pages, IN ULONG Offset)
VOID NTAPI IntAgpReleasePhysical(IN PVOID HwDeviceExtension, IN PVOID PhysicalContext)
PVOID NTAPI IntAgpCommitVirtual(IN PVOID HwDeviceExtension, IN PVOID VirtualContext, IN ULONG Pages, IN ULONG Offset)
PHYSICAL_ADDRESS NTAPI IntAgpReservePhysical(IN PVOID HwDeviceExtension, IN ULONG Pages, IN VIDEO_PORT_CACHE_TYPE Caching, OUT PVOID *PhysicalContext)
VOID NTAPI IntAgpReleaseVirtual(IN PVOID HwDeviceExtension, IN PVOID VirtualContext)
NTSTATUS NTAPI IntAgpGetInterface(IN PVOID HwDeviceExtension, IN OUT PINTERFACE Interface)
#define STATUS_NOT_SUPPORTED
#define NT_SUCCESS(StatCode)
_In_ PIO_STACK_LOCATION IrpSp
#define ExAllocatePoolWithTag(hernya, size, tag)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define ExFreePoolWithTag(_P, _T)
static OUT PIO_STATUS_BLOCK IoStatusBlock
_In_ HANDLE ProcessHandle
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
struct _AGP_BUS_INTERFACE_STANDARD AGP_BUS_INTERFACE_STANDARD
#define AGP_BUS_INTERFACE_V2
#define AGP_BUS_INTERFACE_V1
_In_ ULONG _In_ ULONG Offset
PDEVICE_OBJECT NTAPI IoGetAttachedDeviceReference(PDEVICE_OBJECT DeviceObject)
PIRP NTAPI IoBuildSynchronousFsdRequest(IN ULONG MajorFunction, IN PDEVICE_OBJECT DeviceObject, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER StartingOffset, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
struct _INTERFACE * PINTERFACE
#define VIDEO_PORT_AGP_INTERFACE_VERSION_1
#define VIDEO_PORT_AGP_INTERFACE_VERSION_2
struct _VIDEO_PORT_AGP_INTERFACE_2 * PVIDEO_PORT_AGP_INTERFACE_2
PULONG MinorVersion OPTIONAL
PINTERFACE_REFERENCE InterfaceReference
PAGP_BUS_FREE_MEMORY FreeMemory
PAGP_BUS_RELEASE_MEMORY ReleaseMemory
PINTERFACE_DEREFERENCE InterfaceDereference
PAGP_BUS_COMMIT_MEMORY CommitMemory
PAGP_BUS_RESERVE_MEMORY ReserveMemory
PAGP_BUS_SET_RATE SetRate
union _IO_STACK_LOCATION::@1580 Parameters
struct _IO_STACK_LOCATION::@3979::@4005 QueryInterface
OUT PAGP_COMMIT_VIRTUAL AgpCommitVirtual
OUT PAGP_COMMIT_PHYSICAL AgpCommitPhysical
OUT PAGP_RESERVE_VIRTUAL AgpReserveVirtual
OUT PINTERFACE_DEREFERENCE InterfaceDereference
OUT PAGP_RESERVE_PHYSICAL AgpReservePhysical
OUT PAGP_FREE_VIRTUAL AgpFreeVirtual
OUT PAGP_SET_RATE AgpSetRate
OUT ULONGLONG AgpAllocationLimit
OUT PAGP_RELEASE_VIRTUAL AgpReleaseVirtual
OUT PINTERFACE_REFERENCE InterfaceReference
OUT PAGP_FREE_PHYSICAL AgpFreePhysical
OUT PAGP_RELEASE_PHYSICAL AgpReleasePhysical
PHYSICAL_ADDRESS PhysicalAddress
PVIDEO_PORT_AGP_MAPPING AgpMapping
PDEVICE_OBJECT NextDeviceObject
AGP_BUS_INTERFACE_STANDARD AgpInterface
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
#define STATUS_UNSUCCESSFUL
enum _VIDEO_PORT_CACHE_TYPE VIDEO_PORT_CACHE_TYPE
struct _VIDEO_PORT_AGP_MAPPING * PVIDEO_PORT_AGP_MAPPING
struct _VIDEO_PORT_AGP_VIRTUAL_MAPPING * PVIDEO_PORT_AGP_VIRTUAL_MAPPING
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_In_ UCHAR _In_ UCHAR MinorFunction
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
NTSTATUS NTAPI IntVideoPortMapPhysicalMemory(IN HANDLE Process, IN PHYSICAL_ADDRESS PhysicalAddress, IN ULONG SizeInBytes, IN ULONG Protect, IN OUT PVOID *VirtualAddress OPTIONAL)
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
#define IRP_MN_QUERY_INTERFACE
enum _MEMORY_CACHING_TYPE MEMORY_CACHING_TYPE
#define ObDereferenceObject