diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2012-02-24 11:46:39 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2012-02-24 11:46:39 -0500 |
commit | 485d103255c0f64ebf697650c899fe7a80db1d6d (patch) | |
tree | 3826b9e0a3d340a4318bb4900ded5742734824aa /src/dev | |
parent | 9e3c8de30bafe33f35e4b9e82fb49418941f8cb7 (diff) | |
download | gem5-485d103255c0f64ebf697650c899fe7a80db1d6d.tar.xz |
MEM: Move all read/write blob functions from Port to PortProxy
This patch moves the readBlob/writeBlob/memsetBlob from the Port class
to the PortProxy class, thus making a clear separation of the basic
port functionality (recv/send functional/atomic/timing), and the
higher-level functional accessors available on the port proxies.
There are only a few places in the code base where the blob functions
were used on ports, and they are all for peeking into the memory
system without making a normal memory access (in the memtest, and the
malta and tsunami pchip). The memtest also exemplifies how easy it is
to create a non-translating proxy if desired. The malta and tsunami
pchip used a slave port to perform a functional read, and this is now
changed to rely on the physProxy of the system (to which they already
have a pointer).
Diffstat (limited to 'src/dev')
-rw-r--r-- | src/dev/alpha/tsunami_pchip.cc | 4 | ||||
-rwxr-xr-x | src/dev/mips/malta_pchip.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/dev/alpha/tsunami_pchip.cc b/src/dev/alpha/tsunami_pchip.cc index f49f1e6b6..fcd06c582 100644 --- a/src/dev/alpha/tsunami_pchip.cc +++ b/src/dev/alpha/tsunami_pchip.cc @@ -284,8 +284,8 @@ TsunamiPChip::translatePciToDma(Addr busAddr) baMask = (wsm[i] & (ULL(0xfff) << 20)) | (ULL(0x7f) << 13); pteAddr = (tba[i] & tbaMask) | ((busAddr & baMask) >> 10); - pioPort.readBlob(pteAddr, (uint8_t*)&pteEntry, - sizeof(uint64_t)); + sys->physProxy.readBlob(pteAddr, (uint8_t*)&pteEntry, + sizeof(uint64_t)); dmaAddr = ((pteEntry & ~ULL(0x1)) << 12) | (busAddr & ULL(0x1fff)); diff --git a/src/dev/mips/malta_pchip.cc b/src/dev/mips/malta_pchip.cc index fe00f98dd..076fdfe84 100755 --- a/src/dev/mips/malta_pchip.cc +++ b/src/dev/mips/malta_pchip.cc @@ -283,8 +283,8 @@ MaltaPChip::translatePciToDma(Addr busAddr) baMask = (wsm[i] & (ULL(0xfff) << 20)) | (ULL(0x7f) << 13); pteAddr = (tba[i] & tbaMask) | ((busAddr & baMask) >> 10); - pioPort.readBlob(pteAddr, (uint8_t*)&pteEntry, - sizeof(uint64_t)); + sys->physProxy.readBlob(pteAddr, (uint8_t*)&pteEntry, + sizeof(uint64_t)); dmaAddr = ((pteEntry & ~ULL(0x1)) << 12) | (busAddr & ULL(0x1fff)); |