Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
how to read the memory space of pci express device in windows xp?
I found PCIe baseaddress 0xF0000000 to use RW-Everything.exe but i don't access 0xF0000000.
I tried to read 0xF0000000 then result 0x00000000.
if result is valid, then result is 8086xxxx.
I use to READ_PORT_ULONG((PULONG)0xF000000).

I don't know read method to 0xF0000000
0xF0000000 is mempry space
Posted

I don't think you can do this in a User Mode program (all normal programs run in User Mode). For a start, a pointer with value 0xF0000000 doesn't necessarily point to that hardware address.

First, check there isn't another way of doing what you want. Are you certain there isn't some kind of SDK or code library for the device that'll do this for you. Working directly with hardware at that low a level is a pain.

Otherwise, you are going to need to look at the Windows Driver Kit:

http://www.microsoft.com/whdc/devtools/wdk/default.mspx[^]

This will let you produce software, probably working in Kernel Mode, that can directly access your hardware. However, you could essentially end up writing a full device driver, with all the extra work and problems that entails. Having looked in to this myself, I strongly suggest you see if you have an SDK or library available.
 
Share this answer
 
I could read data at memory space 0xF0008000 in some PC with WindowsXP + SP3.
I tried to read mapped virtual address of physical address using MmMaploSpace()
But I couldn't read data at memory space 0xF0008000 in some PC with WindowsXP + SP3.
When I read at this address in the PC, the system is hang.
I don't know why some system is hang.
I attached my code. please refer and give me advices.
If you know how to read PCI Express extended configuration spaces, please let me know.
I would like to read extended configuration spaces of ICH chip in mainboard.
Thanks.
Best Regards,

sample code

{
PVOID pvk;
PHYSICAL_ADDRESS phyAddr;
ULONG pcieMemData = 0;

phyAddr.QuadPart=(ULONGLONG)0xF0008000;;

//get mapped kernel address
pvk=MmMapIoSpace(phyAddr, 0x300, MmNonCached);

pcieMemData = READ_REGISTER_ULONG((PULONG)(pvk)); ß this point hang

KdPrint((“pcieMemData=0x%x addr =0x%x \n”, pcieMemData, pvk));
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900