21,600
社区成员
发帖
与我相关
我的任务
分享
AddressSpace = 0x0;
memAddr.QuadPart = PciData->u.type0.BaseAddresses[0];
if (!RtTranslateBusAddress (
PCIBus, // bus interface type
busNumber, // bus number (zero based)
memAddr, // bus-relative address
&AddressSpace, // specifies port number or a memory address
&tranMemAddr // pointer to the translated address
) )
{
vMemBase0 = NULL;
}
else
{
vMemBase0 = (PUCHAR)RtMapMemory (
tranMemAddr, // base of the physical address range to map
256, // the length of address range in bytes 256 bytes
0 // whether or not to use cache
);
RtWprintf( L"Memory allocated: AddressSpace 0x%X\n",AddressSpace);
}