PAGP_RESERVE_PHYSICAL callback function

The AgpReservePhysical function reserves a range of physical addresses on the system bus to which the AGP controller can respond.

Syntax

PAGP_RESERVE_PHYSICAL PagpReservePhysical;

PHYSICAL_ADDRESS PagpReservePhysical(
  IN PVOID HwDeviceExtension,
  IN ULONG Pages,
  IN VIDEO_PORT_CACHE_TYPE Caching,
  OUT PVOID *PhysicalReserveContext
)
{...}

Parameters

HwDeviceExtension

Pointer to the miniport driver's device extension.

Pages

Specifies the number of pages that the video port driver should reserve.

Caching

Specifies the type of caching that the system should use. This parameter can be set to one of the following values.

Value Meaning
VpNonCached The system should not cache the range of addresses.
VpWriteCombined The system should use write-combined (WC) caching. For information about WC caching, see the Write-Combining Memory in Video Miniport Drivers website article.
VpCached The system should use ordinary caching.

*PhysicalReserveContext

Specifies the location in which the video port driver writes a context handle that identifies the reserved physical address space.

Return Value

AgpReservePhysical returns the base address of the reserved physical address range if successful; otherwise, it returns NULL.

Remarks

Video miniport drivers that run on Microsoft Windows 2000 should always reserve a range whose size is a multiple of 64 kilobytes. Reserving a range that is not a multiple of 64 kilobytes can result in AgpReserveVirtual or AgpCommitVirtual returning an invalid virtual address.

On Microsoft Windows XP and later, AgpReservePhysical automatically expands the requested range to a multiple of 64 kilobytes.

Upon successful return, the AGP controller can respond to the reserved physical address range on the bus. However, the video miniport driver must first call AgpCommitPhysical to cause this memory to be committed before accessing it in order for the accessed results to be defined.

The miniport driver can call AgpReservePhysical several times to reserve many smaller address ranges rather than one big range.

The miniport driver should call AgpReleasePhysical to release the physical address range when it is no longer needed.

Requirements

   
Windows version Available in Windows 2000 and later versions of the Windows operating systems.
Target Platform Desktop
Header videoagp.h (include Video.h)
IRQL PASSIVE_LEVEL

See Also

AgpCommitPhysical

AgpReleasePhysical

AgpReserveVirtual