1/* 2 * Copyright (c) 2002-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; --- 412 unchanged lines hidden (view full) --- 421 Fault fault; 422 const int asid = 0; 423 const ThreadID tid = 0; 424 const Addr pc = thread->readPC(); 425 unsigned block_size = dcachePort.peerBlockSize(); 426 int data_size = sizeof(T); 427 BaseTLB::Mode mode = BaseTLB::Read; 428 |
429 if (traceData) { 430 traceData->setAddr(addr); 431 } 432 |
433 RequestPtr req = new Request(asid, addr, data_size, 434 flags, pc, _cpuId, tid); 435 436 Addr split_addr = roundDown(addr + data_size - 1, block_size); 437 assert(split_addr <= addr || split_addr - addr < block_size); 438 439 // This will need a new way to tell if it's hooked up to a cache or not. 440 if (req->isUncacheable()) --- 18 unchanged lines hidden (view full) --- 459 } else { 460 WholeTranslationState *state = 461 new WholeTranslationState(req, (uint8_t *)(new T), NULL, mode); 462 DataTranslation<TimingSimpleCPU> *translation 463 = new DataTranslation<TimingSimpleCPU>(this, state); 464 thread->dtb->translateTiming(req, tc, translation, mode); 465 } 466 |
467 return NoFault; 468} 469 470#ifndef DOXYGEN_SHOULD_SKIP_THIS 471 472template 473Fault 474TimingSimpleCPU::read(Addr addr, Twin64_t &data, unsigned flags); --- 67 unchanged lines hidden (view full) --- 542{ 543 const int asid = 0; 544 const ThreadID tid = 0; 545 const Addr pc = thread->readPC(); 546 unsigned block_size = dcachePort.peerBlockSize(); 547 int data_size = sizeof(T); 548 BaseTLB::Mode mode = BaseTLB::Write; 549 |
550 if (traceData) { 551 traceData->setAddr(addr); 552 traceData->setData(data); 553 } 554 |
555 RequestPtr req = new Request(asid, addr, data_size, 556 flags, pc, _cpuId, tid); 557 558 Addr split_addr = roundDown(addr + data_size - 1, block_size); 559 assert(split_addr <= addr || split_addr - addr < block_size); 560 561 // This will need a new way to tell if it's hooked up to a cache or not. 562 if (req->isUncacheable()) --- 20 unchanged lines hidden (view full) --- 583 } else { 584 WholeTranslationState *state = 585 new WholeTranslationState(req, (uint8_t *)dataP, res, mode); 586 DataTranslation<TimingSimpleCPU> *translation = 587 new DataTranslation<TimingSimpleCPU>(this, state); 588 thread->dtb->translateTiming(req, tc, translation, mode); 589 } 590 |
591 // Translation faults will be returned via finishTranslation() |
592 return NoFault; 593} 594 595 596#ifndef DOXYGEN_SHOULD_SKIP_THIS 597template 598Fault 599TimingSimpleCPU::write(Twin32_t data, Addr addr, --- 482 unchanged lines hidden --- |