1/* 2 * Copyright 2014 Google, Inc. 3 * Copyright (c) 2012-2013,2015,2017 ARM Limited 4 * All rights reserved. 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 416 unchanged lines hidden (view full) --- 425 Request::Flags flags, uint64_t *res) 426{ 427 SimpleExecContext& t_info = *threadInfo[curThread]; 428 SimpleThread* thread = t_info.thread; 429 static uint8_t zero_array[64] = {}; 430 431 if (data == NULL) { 432 assert(size <= 64); |
433 assert(flags & Request::STORE_NO_DATA); |
434 // This must be a cache block cleaning request 435 data = zero_array; 436 } 437 438 // use the CPU's statically allocated write request and packet objects 439 Request *req = &data_write_req; 440 441 if (traceData) --- 15 unchanged lines hidden (view full) --- 457 while (1) { 458 req->setVirt(0, addr, size, flags, dataMasterId(), thread->pcState().instAddr()); 459 460 // translate to physical address 461 Fault fault = thread->dtb->translateAtomic(req, thread->getTC(), BaseTLB::Write); 462 463 // Now do the access. 464 if (fault == NoFault) { |
465 bool do_access = true; // flag to suppress cache access 466 467 if (req->isLLSC()) { |
468 do_access = TheISA::handleLockedWrite(thread, req, dcachePort.cacheBlockMask); 469 } else if (req->isSwap()) { |
470 if (req->isCondSwap()) { 471 assert(res); 472 req->setExtraData(*res); 473 } 474 } 475 476 if (do_access && !req->getFlags().isSet(Request::NO_ACCESS)) { |
477 Packet pkt(req, Packet::makeWriteCmd(req)); |
478 pkt.dataStatic(data); 479 480 if (req->isMmappedIpr()) { 481 dcache_latency += 482 TheISA::handleIprWrite(thread->getTC(), &pkt); 483 } else { 484 if (fastmem && system->isMemAddr(pkt.getAddr())) 485 system->getPhysMem().access(&pkt); --- 215 unchanged lines hidden --- |