1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 187 unchanged lines hidden (view full) --- 196PhysicalMemory::doFunctionalAccess(Packet *pkt) 197{ 198 assert(pkt->getAddr() + pkt->getSize() <= params()->addrRange.size()); 199 200 if (pkt->isRead()) { 201 if (pkt->req->isLocked()) { 202 trackLoadLocked(pkt->req); 203 } |
204 DPRINTF(MemoryAccess, "Performing Read of size %i on address 0x%x\n", 205 pkt->getSize(), pkt->getAddr()); |
206 memcpy(pkt->getPtr<uint8_t>(), 207 pmemAddr + pkt->getAddr() - params()->addrRange.start, 208 pkt->getSize()); 209 } 210 else if (pkt->isWrite()) { 211 if (writeOK(pkt->req)) { |
212 DPRINTF(MemoryAccess, "Performing Write of size %i on address 0x%x\n", 213 pkt->getSize(), pkt->getAddr()); |
214 memcpy(pmemAddr + pkt->getAddr() - params()->addrRange.start, 215 pkt->getPtr<uint8_t>(), pkt->getSize()); 216 } 217 } 218 else if (pkt->isInvalidate()) { 219 //upgrade or invalidate 220 pkt->flags |= SATISFIED; 221 } --- 221 unchanged lines hidden --- |