Lines Matching defs:req
206 TLB::checkCacheability(const RequestPtr &req, bool itb)
221 if (req->getPaddr() & PAddrUncachedBit43) {
223 if (PAddrIprSpace(req->getPaddr())) {
228 req->setFlags(Request::UNCACHEABLE | Request::STRICT_ORDER);
232 req->setPaddr(req->getPaddr() & PAddrUncachedMask);
237 if (req->isUncacheable() && itb)
375 TLB::translateInst(const RequestPtr &req, ThreadContext *tc)
378 if (FullSystem && PcPAL(req->getPC()))
379 req->setFlags(Request::PHYSICAL);
381 if (PcPAL(req->getPC())) {
383 req->setPaddr((req->getVaddr() & ~3) & PAddrImplMask);
388 if (req->getFlags() & Request::PHYSICAL) {
389 req->setPaddr(req->getVaddr());
392 if (!validVirtualAddress(req->getVaddr())) {
394 return std::make_shared<ItbAcvFault>(req->getVaddr());
400 if (VAddrSpaceEV6(req->getVaddr()) == 0x7e) {
405 return std::make_shared<ItbAcvFault>(req->getVaddr());
408 req->setPaddr(req->getVaddr() & PAddrImplMask);
411 if (req->getPaddr() & PAddrUncachedBit40)
412 req->setPaddr(req->getPaddr() | ULL(0xf0000000000));
414 req->setPaddr(req->getPaddr() & ULL(0xffffffffff));
418 TlbEntry *entry = lookup(VAddr(req->getVaddr()).vpn(),
423 return std::make_shared<ItbPageFault>(req->getVaddr());
426 req->setPaddr((entry->ppn << PageShift) +
427 (VAddr(req->getVaddr()).offset()
435 return std::make_shared<ItbAcvFault>(req->getVaddr());
443 if (req->getPaddr() & ~PAddrImplMask) {
447 return checkCacheability(req, true);
452 TLB::translateData(const RequestPtr &req, ThreadContext *tc, bool write)
460 if (req->getVaddr() & (req->getSize() - 1)) {
461 DPRINTF(TLB, "Alignment Fault on %#x, size = %d\n", req->getVaddr(),
462 req->getSize());
464 return std::make_shared<DtbAlignmentFault>(req->getVaddr(),
465 req->getFlags(),
469 if (PcPAL(req->getPC())) {
470 mode = (req->getFlags() & AlphaRequestFlags::ALTMODE) ?
476 if (req->getFlags() & Request::PHYSICAL) {
477 req->setPaddr(req->getVaddr());
480 if (!validVirtualAddress(req->getVaddr())) {
485 return std::make_shared<DtbPageFault>(req->getVaddr(),
486 req->getFlags(),
491 if (VAddrSpaceEV6(req->getVaddr()) == 0x7e) {
499 return std::make_shared<DtbAcvFault>(req->getVaddr(),
500 req->getFlags(),
504 req->setPaddr(req->getVaddr() & PAddrImplMask);
507 if (req->getPaddr() & PAddrUncachedBit40)
508 req->setPaddr(req->getPaddr() | ULL(0xf0000000000));
510 req->setPaddr(req->getPaddr() & ULL(0xffffffffff));
520 TlbEntry *entry = lookup(VAddr(req->getVaddr()).vpn(), asn);
527 return (req->getFlags() & AlphaRequestFlags::VPTE) ?
528 (Fault)(std::make_shared<PDtbMissFault>(req->getVaddr(),
529 req->getFlags(),
531 (Fault)(std::make_shared<NDtbMissFault>(req->getVaddr(),
532 req->getFlags(),
536 req->setPaddr((entry->ppn << PageShift) +
537 VAddr(req->getVaddr()).offset());
546 return std::make_shared<DtbPageFault>(req->getVaddr(),
547 req->getFlags(),
553 return std::make_shared<DtbPageFault>(req->getVaddr(),
554 req->getFlags(),
562 return std::make_shared<DtbAcvFault>(req->getVaddr(),
563 req->getFlags(),
569 return std::make_shared<DtbPageFault>(req->getVaddr(),
570 req->getFlags(),
583 if (req->getPaddr() & ~PAddrImplMask) {
587 return checkCacheability(req);
602 TLB::translateAtomic(const RequestPtr &req, ThreadContext *tc, Mode mode)
605 return translateInst(req, tc);
607 return translateData(req, tc, mode == Write);
611 TLB::translateTiming(const RequestPtr &req, ThreadContext *tc,
615 translation->finish(translateAtomic(req, tc, mode), req, tc, mode);
619 TLB::finalizePhysical(const RequestPtr &req, ThreadContext *tc,