summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2006-02-15 17:52:49 -0500
committerSteve Reinhardt <stever@eecs.umich.edu>2006-02-15 17:52:49 -0500
commitb8a2d1e5c78eac41125a0be0bc2b5d5fe4714684 (patch)
tree5d9fbf42459bc67d17cbfeaf36cda53a0068d308 /sim
parent091e6b72cf9f6c81b44d1d871c34907ad2615e6c (diff)
downloadgem5-b8a2d1e5c78eac41125a0be0bc2b5d5fe4714684.tar.xz
More progress toward compiling... partly by
fixing things, partly by ignoring CPU models that don't currently compile. SConscript: Split sources for fast, simple, and o3 CPU models into separate source lists. For now none of these are included in the base source list, so you won't get any CPU models at all... but we still can't compile the other stuff so it's not an issue. Also get rid of obsolete encumbered/mem file. base/loader/aout_object.cc: base/loader/aout_object.hh: base/loader/ecoff_object.cc: base/loader/ecoff_object.hh: base/loader/elf_object.cc: base/loader/elf_object.hh: base/loader/object_file.hh: cpu/exec_context.cc: sim/process.cc: sim/system.cc: sim/system.hh: FunctionalMemory -> Memory cpu/pc_event.hh: Get rid of unused badpc. cpu/simple/cpu.cc: cpu/simple/cpu.hh: Move Port functions into .cc file. mem/port.hh: Make recvAddressRangesQuery panic by default instead of being abstract... do CPUs need to implement this? mem/request.hh: Add prefetch flags. sim/syscall_emul.hh: Start to fix... --HG-- extra : convert_revision : ece53b3855f20916caaa381598ac37e8c7adfba7
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;