On Sat, Oct 11, 2008 at 11:56 PM, ron minnich rminnich@gmail.com wrote:
and PCI IO address mask is 0x3FFF, right ?
I think so, unless it is 3fff<<3
Yes, in the register, it is shifted by 3 bytes
Then we just need C code :-)
That is another story...
Here is the python script, I have tested it on my SN25p / opteron 165
I attached the output from a run under legacy BIOS: $ AMDK8MemMap.py -i > output.txt
with a $ lspci -xxx -s 0:0:18.1 > lspci.txt for reference
Could someone double check I did not misinterpreted the doc in the decoding of the registers.
I would be interested in having the output of the tool and the lspci, like above, from something more interesting, like a Tyan 2 or 4 processors motherboard. I'm also interested in --test output.
Try --help to have the list of available options.
I did not use the "Fam 0Fh" 32559.pdf documentation, because I only have an opteron 939 to test on. But after a quick glance, it all looks the same, so it should work as-is.
I'd also like comments, and any ideas for further improvements.
If this is useful, it is: Signed-off-by: Vincent Legoll vincent.legoll@gmail.com and could go somewhere in the utils directory...