From: Gabe Black Date: Wed, 3 Oct 2007 01:25:10 +0000 (-0700) Subject: SPARC,Remote GDB: Flesh out the acc function for SE mode. X-Git-Tag: m5_2.0_beta4~73^2~3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=48041fdc531a535a45c86d61675ec7f654629fb3;p=gem5.git SPARC,Remote GDB: Flesh out the acc function for SE mode. --HG-- extra : convert_revision : eada066ab64701b5c53e7351dfffbdc0e0d4f344 --- diff --git a/src/arch/sparc/remote_gdb.cc b/src/arch/sparc/remote_gdb.cc index 85b0c03a3..67cc5b0d1 100644 --- a/src/arch/sparc/remote_gdb.cc +++ b/src/arch/sparc/remote_gdb.cc @@ -130,8 +130,10 @@ #include "config/full_system.hh" #include "cpu/thread_context.hh" #include "cpu/static_inst.hh" +#include "mem/page_table.hh" #include "mem/physical.hh" #include "mem/port.hh" +#include "sim/process.hh" #include "sim/system.hh" using namespace std; @@ -150,11 +152,20 @@ bool RemoteGDB::acc(Addr va, size_t len) { //@Todo In NetBSD, this function checks if all addresses - //from va to va + len have valid page mape entries. Not + //from va to va + len have valid page map entries. Not //sure how this will work for other OSes or in general. +#if FULL_SYSTEM if (va) return true; return false; +#else + TlbEntry entry; + //Check to make sure the first byte is mapped into the processes address + //space. + if (context->getProcessPtr()->pTable->lookup(va, entry)) + return true; + return false; +#endif } ///////////////////////////////////////////////////////////