Hi All,
For some background, I’m working on creating a driver for a prototype
PCI card and have been running into problems accessing the card’s memory
space. So to rule out the driver, I have been attempting to access the
card directly via windbg.
From windbg I can read the pci configuration space ok and it appears
correct. I see from this that BAR0 is setup correctly with a physical
address, (which I verified from pte! and does indeed map to the correct
virtual address space via MmMapIoSpace in the driver).
However, when my driver reads a 32 bit register:
reg = READ_REGISTER_ULONG((PULONG)((ULONG_PTR)DevExt->BAR0 + Register))
it sees 0xFFFFFFFF, which is incorrect.
So, I have been using both the !dd, dd, and dd /p[uc] commands to try
and read from BAR0. Here are some results:
0: kd> N 16
base is 16
//////////////////////////////////////////////////////////////////////////////////
// This should be read physical memory location
// - with the physical address supplied - from BAR0
// - according to my understanding of windbg help
//////////////////////////////////////////////////////////////////////////////////
0: kd> !dd [uc] -m fceffc00 L1
0 f000eef3 f000eef3 f000e2c3 f000eef3
10 f000eef3 f000ff54 f00006e1 f0000689
20 9fc0002f f000e987 f000eef3 f000eef3
30 f000eef3 f000eef3 f000ef57 e9f90000
40 c0001729 f000f84d f000f841 f00080b8
50 f000b30e 9fc00020 f000e82e f000efd2
60 f000e000 f000e6f2 9fc0002a f000ff53
70 f000ff53 f000f0a4 f000efc7 c0002790
//////////////////////////////////////////////////////////////////////////////////
// This should also be read physical memory (with the /p option) ???
//////////////////////////////////////////////////////////////////////////////////
0: kd> dd /p[uc] fceffc00 L1
fceffc00 ffffffff
//////////////////////////////////////////////////////////////////////////////////
// This should be a standard virtual address read
// - supplied with the virtual address obtained from MmMapIoSpace
//////////////////////////////////////////////////////////////////////////////////
0: kd> dd 0xF7E89C00 L1
// TARGET MACHINE HANGS FOREVER - SO DOES WINDBG!
Ok, so anyone want to point out to me what I’m missing - since 2
commands exist to read physical memory and each returns something
different? Also, any guess why a typical virtual memory read is
probably hanging the bus? (Again - this is prototype hardware, so any
info will help me in determining if its bad hw or if I’m out in left field).
Thanks in Advance!!!
-Mike