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/arch/alpha/AlphaSystem.py | 1 + src/arch/alpha/isa_traits.hh | 3 --- src/arch/alpha/system.cc | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/arch/alpha') diff --git a/src/arch/alpha/AlphaSystem.py b/src/arch/alpha/AlphaSystem.py index a19aeb763..f6d9eb4c6 100644 --- a/src/arch/alpha/AlphaSystem.py +++ b/src/arch/alpha/AlphaSystem.py @@ -35,6 +35,7 @@ class AlphaSystem(System): pal = Param.String("file that contains palcode") system_type = Param.UInt64("Type of system we are emulating") system_rev = Param.UInt64("Revision of system we are emulating") + load_addr_mask = 0xffffffffff class LinuxAlphaSystem(AlphaSystem): type = 'LinuxAlphaSystem' diff --git a/src/arch/alpha/isa_traits.hh b/src/arch/alpha/isa_traits.hh index a5a8bf5a0..349332170 100644 --- a/src/arch/alpha/isa_traits.hh +++ b/src/arch/alpha/isa_traits.hh @@ -76,9 +76,6 @@ const Addr K0SegEnd = ULL(0xfffffdffffffffff); const Addr K1SegBase = ULL(0xfffffe0000000000); const Addr K1SegEnd = ULL(0xffffffffffffffff); -// For loading... XXX This maybe could be USegEnd?? --ali -const Addr LoadAddrMask = ULL(0xffffffffff); - //////////////////////////////////////////////////////////////////////// // // Interrupt levels diff --git a/src/arch/alpha/system.cc b/src/arch/alpha/system.cc index 33db98b9b..2c5570d46 100644 --- a/src/arch/alpha/system.cc +++ b/src/arch/alpha/system.cc @@ -65,8 +65,8 @@ AlphaSystem::AlphaSystem(Params *p) // Load program sections into memory - pal->loadSections(&functionalPort, LoadAddrMask); - console->loadSections(&functionalPort, LoadAddrMask); + pal->loadSections(&functionalPort, loadAddrMask); + console->loadSections(&functionalPort, loadAddrMask); // load symbols if (!console->loadGlobalSymbols(consoleSymtab)) -- cgit v1.2.3