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 <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -206,6 +206,7 @@ TLB::translateInt(bool read, RequestPtr req, ThreadContext *tc)
|
||||
if (!msrAddrToIndex(regNum, vaddr))
|
||||
return std::make_shared<GeneralProtection>(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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user