From 1031b824b975cec999c37cabc8c05c485a4ae5ca Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Fri, 24 Feb 2012 11:43:53 -0500 Subject: MEM: Move port creation to the memory object(s) construction This patch moves all port creation from the getPort method to be consistently done in the MemObject's constructor. This is possible thanks to the Swig interface passing the length of the vector ports. Previously there was a mix of: 1) creating the ports as members (at object construction time) and using getPort for the name resolution, or 2) dynamically creating the ports in the getPort call. This is now uniform. Furthermore, objects that would not be complete without a port have these ports as members rather than having pointers to dynamically allocated ports. This patch also enables an elaboration-time enumeration of all the ports in the system which can be used to determine the masterId. --- src/dev/alpha/tsunami_pchip.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dev/alpha') diff --git a/src/dev/alpha/tsunami_pchip.cc b/src/dev/alpha/tsunami_pchip.cc index f8c9104e2..f49f1e6b6 100644 --- a/src/dev/alpha/tsunami_pchip.cc +++ b/src/dev/alpha/tsunami_pchip.cc @@ -284,7 +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)); + pioPort.readBlob(pteAddr, (uint8_t*)&pteEntry, + sizeof(uint64_t)); dmaAddr = ((pteEntry & ~ULL(0x1)) << 12) | (busAddr & ULL(0x1fff)); -- cgit v1.2.3