X86: Compute PCI config addresses correctly.
authorGabe Black <gblack@eecs.umich.edu>
Sun, 1 Feb 2009 08:11:49 +0000 (00:11 -0800)
committerGabe Black <gblack@eecs.umich.edu>
Sun, 1 Feb 2009 08:11:49 +0000 (00:11 -0800)
src/arch/x86/tlb.cc

index 6f1c1a03cd08f6656fc9bdffe21a41e9779eaddc..1009386d7fef1783ee2ab5f922ad04deb05201f3 100644 (file)
@@ -547,7 +547,8 @@ TLB::translate(RequestPtr &req, ThreadContext *tc, bool write, bool execute)
                     tc->readMiscRegNoEffect(MISCREG_PCI_CONFIG_ADDRESS);
                 if (bits(configAddress, 31, 31)) {
                     req->setPaddr(PhysAddrPrefixPciConfig |
-                            bits(configAddress, 30, 0));
+                            mbits(configAddress, 30, 2) |
+                            (IOPort & mask(2)));
                 }
             } else {
                 req->setPaddr(PhysAddrPrefixIO | IOPort);