From: Gabe Black Date: Tue, 12 May 2020 22:02:00 +0000 (-0700) Subject: x86: Set a physical address for local accesses. X-Git-Tag: v20.0.0.0~37 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4ce9da7a8665e481801fa2ef89c80ba8161ffcd2;p=gem5.git x86: Set a physical address for local accesses. This avoids problems when other parts of the simulator blindly try to retrieve the physical address. Change-Id: Ia13a2b85b9f919e1e81a6a0f67d10858e98244e5 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28987 Reviewed-by: Gabe Black Maintainer: Gabe Black Maintainer: Bobby R. Bruce Tested-by: kokoro --- diff --git a/src/arch/x86/tlb.cc b/src/arch/x86/tlb.cc index ceccba892..71ab56344 100644 --- a/src/arch/x86/tlb.cc +++ b/src/arch/x86/tlb.cc @@ -206,6 +206,7 @@ TLB::translateInt(bool read, RequestPtr req, ThreadContext *tc) if (!msrAddrToIndex(regNum, vaddr)) return std::make_shared(0); + req->setPaddr(req->getVaddr()); req->setLocalAccessor( [read,regNum](ThreadContext *tc, PacketPtr pkt) { @@ -223,6 +224,7 @@ TLB::translateInt(bool read, RequestPtr req, ThreadContext *tc) // space. assert(!(IOPort & ~0xFFFF)); if (IOPort == 0xCF8 && req->getSize() == 4) { + req->setPaddr(req->getVaddr()); req->setLocalAccessor( [read](ThreadContext *tc, PacketPtr pkt) { @@ -262,6 +264,7 @@ TLB::finalizePhysical(const RequestPtr &req, req->setFlags(Request::STRICT_ORDER); uint8_t func; PseudoInst::decodeAddrOffset(paddr - m5opRange.start(), func); + req->setPaddr(req->getVaddr()); req->setLocalAccessor( [func, mode](ThreadContext *tc, PacketPtr pkt) -> Cycles {