summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
Diffstat (limited to 'sim')
-rw-r--r--sim/process.cc8
-rw-r--r--sim/syscall_emul.hh24
-rw-r--r--sim/system.cc4
-rw-r--r--sim/system.hh6
4 files changed, 21 insertions, 21 deletions
diff --git a/sim/process.cc b/sim/process.cc
index ad8cb2e96..26d6bf708 100644
--- a/sim/process.cc
+++ b/sim/process.cc
@@ -42,8 +42,8 @@
#include "encumbered/cpu/full/thread.hh"
#include "encumbered/eio/eio.hh"
#include "mem/page_table.hh"
-#include "mem/functional/physical.hh"
-#include "mem/functional/proxy.hh"
+#include "mem/memory.hh"
+#include "mem/proxy.hh"
#include "sim/builder.hh"
#include "sim/fake_syscall.hh"
#include "sim/process.hh"
@@ -154,7 +154,7 @@ Process::startup()
if (execContexts.empty())
fatal("Process %s is not associated with any CPUs!\n", name());
- initVirtMem = new ProxyMemory<FunctionalMemory>(system->physmem, pTable);
+ initVirtMem = new ProxyMemory<Memory>(system->physmem, pTable);
// first exec context for this process... initialize & enable
ExecContext *xc = execContexts[0];
@@ -245,7 +245,7 @@ DEFINE_SIM_OBJECT_CLASS_NAME("Process", Process)
static void
copyStringArray(vector<string> &strings, Addr array_ptr, Addr data_ptr,
- FunctionalMemory *func)
+ Memory *func)
{
for (int i = 0; i < strings.size(); ++i) {
func->prot_write(array_ptr, (uint8_t*)&data_ptr, sizeof(Addr));
diff --git a/sim/syscall_emul.hh b/sim/syscall_emul.hh
index 185ada2c5..bdaae9015 100644
--- a/sim/syscall_emul.hh
+++ b/sim/syscall_emul.hh
@@ -43,7 +43,7 @@
#include <sys/uio.h>
#include "base/intmath.hh" // for RoundUp
-#include "mem/functional/functional.hh"
+#include "mem/port.hh"
#include "targetarch/isa_traits.hh" // for Addr
#include "base/trace.hh"
@@ -103,18 +103,18 @@ class BaseBufferArg {
//
// copy data into simulator space (read from target memory)
//
- virtual bool copyIn(FunctionalMemory *mem)
+ virtual bool copyIn(Port *memport)
{
- mem->access(Read, addr, bufPtr, size);
+ memport->readBlobFunctional(addr, bufPtr, size);
return true; // no EFAULT detection for now
}
//
// copy data out of simulator space (write to target memory)
//
- virtual bool copyOut(FunctionalMemory *mem)
+ virtual bool copyOut(Port *memport)
{
- mem->access(Write, addr, bufPtr, size);
+ memport->writeBlobFunctional(addr, bufPtr, size);
return true; // no EFAULT detection for now
}
@@ -314,7 +314,7 @@ openFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (xc->mem->readString(path, xc->getSyscallArg(0)) != No_Fault)
+ if (xc->mem->readStringFunctional(path, xc->getSyscallArg(0)) != No_Fault)
return -EFAULT;
if (path == "/dev/sysdev0") {
@@ -361,7 +361,7 @@ chmodFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (xc->mem->readString(path, xc->getSyscallArg(0)) != No_Fault)
+ if (xc->mem->readStringFunctional(path, xc->getSyscallArg(0)) != No_Fault)
return -EFAULT;
uint32_t mode = xc->getSyscallArg(1);
@@ -414,7 +414,7 @@ statFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (xc->mem->readString(path, xc->getSyscallArg(0)) != No_Fault)
+ if (xc->mem->readStringFunctional(path, xc->getSyscallArg(0)) != No_Fault)
return -EFAULT;
struct stat hostBuf;
@@ -461,7 +461,7 @@ lstatFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (xc->mem->readString(path, xc->getSyscallArg(0)) != No_Fault)
+ if (xc->mem->readStringFunctional(path, xc->getSyscallArg(0)) != No_Fault)
return -EFAULT;
struct stat hostBuf;
@@ -483,7 +483,7 @@ lstat64Func(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (xc->mem->readString(path, xc->getSyscallArg(0)) != No_Fault)
+ if (xc->mem->readStringFunctional(path, xc->getSyscallArg(0)) != No_Fault)
return -EFAULT;
struct stat64 hostBuf;
@@ -530,7 +530,7 @@ statfsFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (xc->mem->readString(path, xc->getSyscallArg(0)) != No_Fault)
+ if (xc->mem->readStringFunctional(path, xc->getSyscallArg(0)) != No_Fault)
return -EFAULT;
struct statfs hostBuf;
@@ -700,7 +700,7 @@ utimesFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (xc->mem->readString(path, xc->getSyscallArg(0)) != No_Fault)
+ if (xc->mem->readStringFunctional(path, xc->getSyscallArg(0)) != No_Fault)
return -EFAULT;
TypedBufferArg<typename OS::timeval [2]> tp(xc->getSyscallArg(1));
diff --git a/sim/system.cc b/sim/system.cc
index a79038308..07eb81c71 100644
--- a/sim/system.cc
+++ b/sim/system.cc
@@ -29,7 +29,7 @@
#include "base/loader/object_file.hh"
#include "base/loader/symtab.hh"
#include "cpu/exec_context.hh"
-#include "mem/functional/physical.hh"
+#include "mem/memory.hh"
#include "sim/builder.hh"
#include "sim/system.hh"
#include "base/trace.hh"
@@ -410,7 +410,7 @@ printSystems()
BEGIN_DECLARE_SIM_OBJECT_PARAMS(System)
- SimObjectParam<PhysicalMemory *> physmem;
+ SimObjectParam<Memory *> physmem;
#if FULL_SYSTEM
Param<Tick> boot_cpu_frequency;
diff --git a/sim/system.hh b/sim/system.hh
index 6602f8582..8922373cc 100644
--- a/sim/system.hh
+++ b/sim/system.hh
@@ -44,7 +44,7 @@ class BaseCPU;
class ExecContext;
class MemoryController;
class ObjectFile;
-class PhysicalMemory;
+class Memory;
#if FULL_SYSTEM
class Platform;
@@ -56,7 +56,7 @@ namespace Kernel { class Binning; }
class System : public SimObject
{
public:
- PhysicalMemory *physmem;
+ Memory *physmem;
PCEventQueue pcEventQueue;
std::vector<ExecContext *> execContexts;
@@ -176,7 +176,7 @@ class System : public SimObject
struct Params
{
std::string name;
- PhysicalMemory *physmem;
+ Memory *physmem;
#if FULL_SYSTEM
Tick boot_cpu_frequency;