NDIS_STATUS
NdisMMapIoSpace(
OUT PVOID *VirtualAddress,
IN NDIS_HANDLE MiniportAdapterHandle,
IN NDIS_PHYSICAL_ADDRESS PhysicalAddress,
IN UINT Length
);
NdisMMapIoSpace maps a given bus-relative “physical” range of device RAM or registers onto a system-space virtual range.
NdisMMapIoSpace can return any of the following status values:
This function is called by drivers of NICs that have on-board memory or a bank of device registers appearing in the I/O space of the host. For example, the driver of a NIC that uses PIO calls NdisMMapIoSpace.
A successful call to NdisMMapIoSpace claims hardware resources in the registry for the driver’s NIC. Consequently, only MiniportInitialize functions call NdisMMapIoSpace.
NdisMMapIoSpace sets the variable at VirtualAddress to NULL if it does not return NDIS_STATUS_SUCCESS.
MiniportInitialize either gets the PhysicalAddress value from the driver’s Parameters registry key or by calling a bus-type-specific NdisXxx configuration function. The given physical address range must fall within the I/O space of the current platform. It is a programming error to call NdisMMapIoSpace with a host physical memory address.
A miniport must call the reciprocal NdisMUnmapIoSpace to release its claim on system resources if MiniportInitialize subsequently fails to initialize the NIC, if its NIC is removed from the machine, and/or when the driver is unloading.
Callers of NdisMMapIoSpace run at IRQL PASSIVE_LEVEL.
MiniportHalt, MiniportInitialize, NdisMUnmapIoSpace, NdisOpenConfiguration, NdisReadEisaSlotInformation, NdisReadMcaPosInformation, NdisReadPciSlotInformation, NdisReadRegisterUchar, NdisReadRegisterUlong, NdisReadRegisterUshort, NdisWriteRegisterUchar, NdisWriteRegisterUlong, NdisWriteRegisterUshort