diff options
author | Kevin Lim <ktlim@umich.edu> | 2006-07-14 17:54:43 -0400 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2006-07-14 17:54:43 -0400 |
commit | 31ac8e733765ee37411d92ea3b7c308affef087a (patch) | |
tree | f2b677c660d83978d9a9a83ca934c3d9bb1215ba /src/dev/pcidev.cc | |
parent | 138a4faf2894ff7d22585b8398ae87f8e6aad9a1 (diff) | |
parent | 07186de5a1b1df55a31329b2ca9c53ad168438ff (diff) | |
download | gem5-31ac8e733765ee37411d92ea3b7c308affef087a.tar.xz |
Merge ktlim@zizzer:/bk/newmem
into zamp.eecs.umich.edu:/z/ktlim2/clean/newmem-merge
configs/test/fs.py:
configs/test/test.py:
SCCS merged
--HG--
extra : convert_revision : 7b2dbcd5881fac01dec38001c4131e73b5be52b5
Diffstat (limited to 'src/dev/pcidev.cc')
-rw-r--r-- | src/dev/pcidev.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/dev/pcidev.cc b/src/dev/pcidev.cc index 62a7324ad..e81e0d1ee 100644 --- a/src/dev/pcidev.cc +++ b/src/dev/pcidev.cc @@ -56,8 +56,8 @@ using namespace std; PciDev::PciConfigPort::PciConfigPort(PciDev *dev, int busid, int devid, int funcid, Platform *p) - : PioPort(dev,p,"-pciconf"), device(dev), busId(busid), deviceId(devid), - functionId(funcid) + : PioPort(dev,p->system,"-pciconf"), device(dev), platform(p), + busId(busid), deviceId(devid), functionId(funcid) { configAddr = platform->calcConfigAddr(busId, deviceId, functionId); } @@ -132,6 +132,18 @@ PciDev::init() PioDevice::init(); } +unsigned int +PciDev::drain(Event *de) +{ + unsigned int count; + count = pioPort->drain(de) + dmaPort->drain(de) + configPort->drain(de); + if (count) + changeState(Draining); + else + changeState(Drained); + return count; +} + Tick PciDev::readConfig(Packet *pkt) { |