From f2642e205549efefb7391de32b189e94e5503ddc Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Mon, 23 Aug 2010 11:18:39 -0500 Subject: Loader: Make the load address mask be a parameter of the system rather than a constant. This allows one two different OS requirements for the same ISA to be handled. Some OSes are compiled for a virtual address and need to be loaded into physical memory that starts at address 0, while other bare metal tools generate images that start at address 0. --- src/sim/system.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/sim/system.cc') diff --git a/src/sim/system.cc b/src/sim/system.cc index c7f5b2d08..45e06616d 100644 --- a/src/sim/system.cc +++ b/src/sim/system.cc @@ -66,6 +66,7 @@ System::System(Params *p) init_param(p->init_param), functionalPort(p->name + "-fport"), virtPort(p->name + "-vport"), + loadAddrMask(p->load_addr_mask), #else page_ptr(0), next_PID(0), @@ -109,7 +110,7 @@ System::System(Params *p) fatal("Could not load kernel file %s", params()->kernel); // Load program sections into memory - kernel->loadSections(&functionalPort, LoadAddrMask); + kernel->loadSections(&functionalPort, loadAddrMask); // setup entry points kernelStart = kernel->textBase(); -- cgit v1.2.3