summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorRon Dreslinski <rdreslin@umich.edu>2006-02-20 23:56:10 -0500
committerRon Dreslinski <rdreslin@umich.edu>2006-02-20 23:56:10 -0500
commit33913542859fa2bef15765009ae33d5e724bb0b0 (patch)
tree0a21e20c5e18eb64ff74e2abff61298d3379653e /base
parentd96de69abc02b40e1dec4843a7a7b7e30749f4fa (diff)
downloadgem5-33913542859fa2bef15765009ae33d5e724bb0b0.tar.xz
Make loaders use translation port instead of proxy memory.
Also start compiling Simple CPU again. SConscript: Start Compiling Simple CPU as well 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: sim/process.cc: sim/process.hh: Convert loaders to used translation port instead of proxy memory --HG-- extra : convert_revision : 63275071f6a0e0d71935641205b203d94381ee44
Diffstat (limited to 'base')
-rw-r--r--base/loader/aout_object.cc8
-rw-r--r--base/loader/aout_object.hh2
-rw-r--r--base/loader/ecoff_object.cc8
-rw-r--r--base/loader/ecoff_object.hh2
-rw-r--r--base/loader/elf_object.cc8
-rw-r--r--base/loader/elf_object.hh2
-rw-r--r--base/loader/object_file.hh4
7 files changed, 17 insertions, 17 deletions
diff --git a/base/loader/aout_object.cc b/base/loader/aout_object.cc
index 18a0eaa5e..54bf81aaf 100644
--- a/base/loader/aout_object.cc
+++ b/base/loader/aout_object.cc
@@ -30,7 +30,7 @@
#include "base/loader/aout_object.hh"
-#include "mem/memory.hh"
+#include "mem/translating_port.hh"
#include "base/loader/symtab.hh"
#include "base/trace.hh" // for DPRINTF
@@ -78,7 +78,7 @@ AoutObject::AoutObject(const string &_filename, int _fd,
bool
-AoutObject::loadSections(Memory *mem, bool loadPhys)
+AoutObject::loadSections(TranslatingPort *memPort, bool loadPhys)
{
Addr textAddr = text.baseAddr;
Addr dataAddr = data.baseAddr;
@@ -91,9 +91,9 @@ AoutObject::loadSections(Memory *mem, bool loadPhys)
// Since we don't really have an MMU and all memory is
// zero-filled, there's no need to set up the BSS segment.
if (text.size != 0)
- mem->prot_write(textAddr, fileData + N_TXTOFF(*execHdr), text.size);
+ memPort->writeBlobFunctional(textAddr, fileData + N_TXTOFF(*execHdr), text.size);
if (data.size != 0)
- mem->prot_write(dataAddr, fileData + N_DATOFF(*execHdr), data.size);
+ memPort->writeBlobFunctional(dataAddr, fileData + N_DATOFF(*execHdr), data.size);
return true;
}
diff --git a/base/loader/aout_object.hh b/base/loader/aout_object.hh
index 44061c660..359866dc5 100644
--- a/base/loader/aout_object.hh
+++ b/base/loader/aout_object.hh
@@ -46,7 +46,7 @@ class AoutObject : public ObjectFile
public:
virtual ~AoutObject() {}
- virtual bool loadSections(Memory *mem, bool loadPhys = false);
+ virtual bool loadSections(TranslatingPort *memPort, bool loadPhys = false);
virtual bool loadGlobalSymbols(SymbolTable *symtab);
virtual bool loadLocalSymbols(SymbolTable *symtab);
diff --git a/base/loader/ecoff_object.cc b/base/loader/ecoff_object.cc
index 7df2cfa97..a18ecc026 100644
--- a/base/loader/ecoff_object.cc
+++ b/base/loader/ecoff_object.cc
@@ -30,7 +30,7 @@
#include "base/loader/ecoff_object.hh"
-#include "mem/memory.hh"
+#include "mem/translating_port.hh"
#include "base/loader/symtab.hh"
#include "base/trace.hh" // for DPRINTF
@@ -82,7 +82,7 @@ EcoffObject::EcoffObject(const string &_filename, int _fd,
bool
-EcoffObject::loadSections(Memory *mem, bool loadPhys)
+EcoffObject::loadSections(TranslatingPort *memPort, bool loadPhys)
{
Addr textAddr = text.baseAddr;
Addr dataAddr = data.baseAddr;
@@ -94,8 +94,8 @@ EcoffObject::loadSections(Memory *mem, bool loadPhys)
// Since we don't really have an MMU and all memory is
// zero-filled, there's no need to set up the BSS segment.
- mem->prot_write(textAddr, fileData + ECOFF_TXTOFF(execHdr), text.size);
- mem->prot_write(dataAddr, fileData + ECOFF_DATOFF(execHdr), data.size);
+ memPort->writeBlobFunctional(textAddr, fileData + ECOFF_TXTOFF(execHdr), text.size);
+ memPort->writeBlobFunctional(dataAddr, fileData + ECOFF_DATOFF(execHdr), data.size);
return true;
}
diff --git a/base/loader/ecoff_object.hh b/base/loader/ecoff_object.hh
index c39aa9a3a..39b161bfc 100644
--- a/base/loader/ecoff_object.hh
+++ b/base/loader/ecoff_object.hh
@@ -50,7 +50,7 @@ class EcoffObject : public ObjectFile
public:
virtual ~EcoffObject() {}
- virtual bool loadSections(Memory *mem, bool loadPhys = false);
+ virtual bool loadSections(TranslatingPort *memPort, bool loadPhys = false);
virtual bool loadGlobalSymbols(SymbolTable *symtab);
virtual bool loadLocalSymbols(SymbolTable *symtab);
diff --git a/base/loader/elf_object.cc b/base/loader/elf_object.cc
index fcac6c7f8..aeb81cb76 100644
--- a/base/loader/elf_object.cc
+++ b/base/loader/elf_object.cc
@@ -43,7 +43,7 @@
#include "base/loader/elf_object.hh"
-#include "mem/memory.hh"
+#include "mem/translating_port.hh"
#include "base/loader/symtab.hh"
#include "base/trace.hh" // for DPRINTF
@@ -170,7 +170,7 @@ ElfObject::ElfObject(const string &_filename, int _fd,
bool
-ElfObject::loadSections(Memory *mem, bool loadPhys)
+ElfObject::loadSections(TranslatingPort *memPort, bool loadPhys)
{
Addr textAddr = text.baseAddr;
Addr dataAddr = data.baseAddr;
@@ -183,9 +183,9 @@ ElfObject::loadSections(Memory *mem, bool loadPhys)
// Since we don't really have an MMU and all memory is
// zero-filled, there's no need to set up the BSS segment.
if (text.size != 0)
- mem->prot_write(textAddr, fileTextBits, text.size);
+ memPort->writeBlobFunctional(textAddr, fileTextBits, text.size);
if (data.size != 0)
- mem->prot_write(dataAddr, fileDataBits, data.size);
+ memPort->writeBlobFunctional(dataAddr, fileDataBits, data.size);
return true;
}
diff --git a/base/loader/elf_object.hh b/base/loader/elf_object.hh
index 324fe9535..3e93c30b7 100644
--- a/base/loader/elf_object.hh
+++ b/base/loader/elf_object.hh
@@ -48,7 +48,7 @@ class ElfObject : public ObjectFile
public:
virtual ~ElfObject() {}
- virtual bool loadSections(Memory *mem, bool loadPhys = false);
+ virtual bool loadSections(TranslatingPort *memPort, bool loadPhys = false);
virtual bool loadGlobalSymbols(SymbolTable *symtab);
virtual bool loadLocalSymbols(SymbolTable *symtab);
diff --git a/base/loader/object_file.hh b/base/loader/object_file.hh
index 091e5493c..1d750e341 100644
--- a/base/loader/object_file.hh
+++ b/base/loader/object_file.hh
@@ -31,7 +31,7 @@
#include "targetarch/isa_traits.hh" // for Addr
-class Memory;
+class TranslatingPort;
class SymbolTable;
class ObjectFile
@@ -67,7 +67,7 @@ class ObjectFile
void close();
- virtual bool loadSections(Memory *mem, bool loadPhys = false) = 0;
+ virtual bool loadSections(TranslatingPort *memPort, bool loadPhys = false) = 0;
virtual bool loadGlobalSymbols(SymbolTable *symtab) = 0;
virtual bool loadLocalSymbols(SymbolTable *symtab) = 0;