summaryrefslogtreecommitdiff
path: root/src/arch/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/sparc')
-rw-r--r--src/arch/sparc/process.cc8
-rw-r--r--src/arch/sparc/process.hh4
-rw-r--r--src/arch/sparc/system.cc28
3 files changed, 11 insertions, 29 deletions
diff --git a/src/arch/sparc/process.cc b/src/arch/sparc/process.cc
index 1c020c6b1..048c7e957 100644
--- a/src/arch/sparc/process.cc
+++ b/src/arch/sparc/process.cc
@@ -204,14 +204,6 @@ SparcProcess::argsInit(int pageSize)
// maintain double word alignment of the stack pointer.
uint64_t align = 16;
- // Patch the ld_bias for dynamic executables.
- updateBias();
-
- // load object file into target memory
- objFile->loadSegments(initVirtMem);
- if (objFile->getInterpreter())
- objFile->getInterpreter()->loadSegments(initVirtMem);
-
enum hardwareCaps
{
M5_HWCAP_SPARC_FLUSH = 1,
diff --git a/src/arch/sparc/process.hh b/src/arch/sparc/process.hh
index f8f19f290..0ef34352b 100644
--- a/src/arch/sparc/process.hh
+++ b/src/arch/sparc/process.hh
@@ -78,7 +78,7 @@ class Sparc32Process : public SparcProcess
Sparc32Process(ProcessParams * params, ObjectFile *objFile)
: SparcProcess(params, objFile, 0)
{
- Addr brk_point = objFile->maxSegmentAddr();
+ Addr brk_point = image.maxAddr();
brk_point = roundUp(brk_point, SparcISA::PageBytes);
// Reserve 8M for main stack.
@@ -122,7 +122,7 @@ class Sparc64Process : public SparcProcess
Sparc64Process(ProcessParams * params, ObjectFile *objFile)
: SparcProcess(params, objFile, 2047)
{
- Addr brk_point = objFile->maxSegmentAddr();
+ Addr brk_point = image.maxAddr();
brk_point = roundUp(brk_point, SparcISA::PageBytes);
Addr max_stack_size = 8 * 1024 * 1024;
diff --git a/src/arch/sparc/system.cc b/src/arch/sparc/system.cc
index e9615b00c..255cc1453 100644
--- a/src/arch/sparc/system.cc
+++ b/src/arch/sparc/system.cc
@@ -136,25 +136,15 @@ SparcSystem::initState()
// Call the initialisation of the super class
System::initState();
- // Load reset binary into memory
- reset->setLoadOffset(params()->reset_addr);
- reset->loadSegments(physProxy);
- // Load the openboot binary
- openboot->setLoadOffset(params()->openboot_addr);
- openboot->loadSegments(physProxy);
- // Load the hypervisor binary
- hypervisor->setLoadOffset(params()->hypervisor_addr);
- hypervisor->loadSegments(physProxy);
- // Load the nvram image
- nvram->setLoadOffset(params()->nvram_addr);
- nvram->loadSegments(physProxy);
- // Load the hypervisor description image
- hypervisor_desc->setLoadOffset(params()->hypervisor_desc_addr);
- hypervisor_desc->loadSegments(physProxy);
- // Load the partition description image
- partition_desc->setLoadOffset(params()->partition_desc_addr);
- partition_desc->loadSegments(physProxy);
-
+ reset->buildImage().offset(params()->reset_addr).write(physProxy);
+ openboot->buildImage().offset(params()->openboot_addr).write(physProxy);
+ hypervisor->buildImage().
+ offset(params()->hypervisor_addr).write(physProxy);
+ nvram->buildImage().offset(params()->nvram_addr).write(physProxy);
+ hypervisor_desc->buildImage().
+ offset(params()->hypervisor_desc_addr).write(physProxy);
+ partition_desc->buildImage().
+ offset(params()->partition_desc_addr).write(physProxy);
// @todo any fixup code over writing data in binaries on setting break
// events on functions should happen here.