From e196d20d9d047a869e1d853fd02077b1d909a576 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Thu, 30 Mar 2006 15:59:49 -0500 Subject: Make TranslatingPort be a type of Port rather than something special arch/alpha/arguments.cc: rather than returning 0, put a panic in... it will actually make us fix this rather than scratching our respective heads base/loader/object_file.cc: base/loader/object_file.hh: Object loader now takes a port rather than a translating port cpu/cpu_exec_context.cc: cpu/cpu_exec_context.hh: sim/process.cc: Make translating port a type of port rather than anything special cpu/simple/cpu.cc: no need to grab a port from the cpu anymore mem/physical.cc: add an additional type of port to physicalmemory called "functional" Only used for functional accesses (loading binaries/syscall emu) mem/port.hh: make readBlok/writeBlob virtual so translating port can do the translation first mem/translating_port.cc: mem/translating_port.hh: Make TranslatingPort inherit from Port sim/system.cc: header file that doesn't exit removed --HG-- extra : convert_revision : 89b08f6146bba61f5605678d736055feab2fe6f7 --- base/loader/object_file.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'base/loader/object_file.hh') diff --git a/base/loader/object_file.hh b/base/loader/object_file.hh index 309089728..b47e1981b 100644 --- a/base/loader/object_file.hh +++ b/base/loader/object_file.hh @@ -33,7 +33,7 @@ #include "sim/host.hh" // for Addr -class TranslatingPort; +class Port; class SymbolTable; class ObjectFile @@ -72,7 +72,7 @@ class ObjectFile void close(); - virtual bool loadSections(TranslatingPort *memPort, bool loadPhys = false); + virtual bool loadSections(Port *memPort, bool loadPhys = false); virtual bool loadGlobalSymbols(SymbolTable *symtab) = 0; virtual bool loadLocalSymbols(SymbolTable *symtab) = 0; @@ -94,7 +94,7 @@ class ObjectFile Section data; Section bss; - bool loadSection(Section *sec, TranslatingPort *memPort, bool loadPhys); + bool loadSection(Section *sec, Port *memPort, bool loadPhys); void setGlobalPointer(Addr global_ptr) { globalPtr = global_ptr; } public: -- cgit v1.2.3 From 5936c79ba0f3fd29ef2bbf41fcaddc78fcd9c75c Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Thu, 30 Mar 2006 18:06:00 -0500 Subject: 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 --- base/loader/object_file.hh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'base/loader/object_file.hh') diff --git a/base/loader/object_file.hh b/base/loader/object_file.hh index b47e1981b..b43989cb5 100644 --- a/base/loader/object_file.hh +++ b/base/loader/object_file.hh @@ -29,6 +29,7 @@ #ifndef __OBJECT_FILE_HH__ #define __OBJECT_FILE_HH__ +#include #include #include "sim/host.hh" // for Addr @@ -72,7 +73,8 @@ class ObjectFile void close(); - virtual bool loadSections(Port *memPort, bool loadPhys = false); + virtual bool loadSections(Port *memPort, Addr addrMask = + std::numeric_limits::max()); virtual bool loadGlobalSymbols(SymbolTable *symtab) = 0; virtual bool loadLocalSymbols(SymbolTable *symtab) = 0; @@ -94,7 +96,7 @@ class ObjectFile Section data; Section bss; - bool loadSection(Section *sec, Port *memPort, bool loadPhys); + bool loadSection(Section *sec, Port *memPort, Addr addrMask); void setGlobalPointer(Addr global_ptr) { globalPtr = global_ptr; } public: -- cgit v1.2.3