diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2006-03-30 18:06:00 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2006-03-30 18:06:00 -0500 |
commit | 5936c79ba0f3fd29ef2bbf41fcaddc78fcd9c75c (patch) | |
tree | 0497503600b01e23dd60a2802509d6bb48a27e99 /sim | |
parent | e196d20d9d047a869e1d853fd02077b1d909a576 (diff) | |
download | gem5-5936c79ba0f3fd29ef2bbf41fcaddc78fcd9c75c.tar.xz |
Add a functional port that is used to load the original binaries in FS
SE mode now has a port that goes to whatever toplevel mem object the
CPU sees that does the appropriate translation for syscall emulation
SConscript:
translating port is a syscall emu only source
arch/alpha/system.cc:
base/loader/object_file.cc:
base/loader/object_file.hh:
Use the new functional port to write the binaries into memory
cpu/cpu_exec_context.cc:
cpu/cpu_exec_context.hh:
cpu/simple/cpu.cc:
We aren't always going to be writing straight to memory with syscalls
support writing to a cache
mem/port.hh:
Add a simple unidirectional functional port that panics on any incoming requests
mem/translating_port.hh:
make translating port inherit from the simple port
sim/system.cc:
sim/system.hh:
Add a functional port that is used to load the original binaries
--HG--
extra : convert_revision : 9096866d0b23e3aceea68394abb76e63c0f8fd8d
Diffstat (limited to 'sim')
-rw-r--r-- | sim/system.cc | 12 | ||||
-rw-r--r-- | sim/system.hh | 5 |
2 files changed, 16 insertions, 1 deletions
diff --git a/sim/system.cc b/sim/system.cc index c1eaaf916..cfa316b11 100644 --- a/sim/system.cc +++ b/sim/system.cc @@ -36,6 +36,16 @@ System::System(Params *p) kernelSymtab = new SymbolTable; debugSymbolTable = new SymbolTable; + + /** + * Get a functional port to memory + */ + Port *mem_port; + mem_port = physmem->getPort("functional"); + functionalPort.setPeer(mem_port); + mem_port->setPeer(&functionalPort); + + /** * Load the kernel code into memory */ @@ -45,7 +55,7 @@ System::System(Params *p) fatal("Could not load kernel file %s", params()->kernel_path); // Load program sections into memory - kernel->loadSections(physmem, true); + kernel->loadSections(&functionalPort, LoadAddrMask); // setup entry points kernelStart = kernel->textBase(); diff --git a/sim/system.hh b/sim/system.hh index 0f82f81f5..11f8ac70a 100644 --- a/sim/system.hh +++ b/sim/system.hh @@ -36,6 +36,7 @@ #include "base/misc.hh" #include "base/statistics.hh" #include "cpu/pc_event.hh" +#include "mem/port.hh" #include "sim/sim_object.hh" #if FULL_SYSTEM #include "kern/system_events.hh" @@ -76,6 +77,10 @@ class System : public SimObject Platform *platform; uint64_t init_param; + /** Port to physical memory used for writing object files into ram at + * boot.*/ + FunctionalPort functionalPort; + /** kernel symbol table */ SymbolTable *kernelSymtab; |