diff options
author | Geoffrey Blake <Geoffrey.Blake@arm.com> | 2016-05-12 11:47:43 -0500 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2017-11-17 10:54:24 +0000 |
commit | 62ae85c0a2db286bcf1c8df5ad8f97a8bd527a55 (patch) | |
tree | 611493f08e164caad33b067b30f7134bcb598684 /src/sim/System.py | |
parent | 463a4bb6cdaa16e22a4302bbc6301c6d90e524c8 (diff) | |
download | gem5-62ae85c0a2db286bcf1c8df5ad8f97a8bd527a55.tar.xz |
sim: Implement load_addr_mask auto-calculation
Recent Linux kernels for AArch64 have changed their start addresses
but we still want to relocate the kernel to 0x80080000 which
required hacking the load_addr_mask in Realview.py to be 0x7ffffff
from 0xfffffff to mask off the proper number of MSBs to load the
kernel in the desired location. To avoid having to make this change
in the future again, we auto-calculate the load_addr_mask if it is
specified as 0x0 in the System sim-object to find the most restrictive
address mask instead of having the configuration specify it. If the
configuration does specify the address mask, we use it instead of
auto-calculating.
Change-Id: I18aabb5d09945c6e3e3819c9c8036ea24b6c35cf
Signed-off-by: Geoffrey Blake <Geoffrey.Blake@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2323
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/sim/System.py')
-rw-r--r-- | src/sim/System.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/sim/System.py b/src/sim/System.py index 68761384b..f45decb6b 100644 --- a/src/sim/System.py +++ b/src/sim/System.py @@ -1,3 +1,15 @@ +# Copyright (c) 2017 ARM Limited +# All rights reserved. +# +# The license below extends only to copyright in the software and shall +# not be construed as granting a license to any other intellectual +# property including but not limited to intellectual property relating +# to a hardware implementation of the functionality of the software +# licensed hereunder. You may use the software subject to the license +# terms below provided that you ensure that this notice is replicated +# unmodified and in its entirety in all distributions of the software, +# modified or unmodified, in source code or in binary form. +# # Copyright (c) 2005-2007 The Regents of The University of Michigan # Copyright (c) 2011 Regents of the University of California # All rights reserved. @@ -96,8 +108,10 @@ class System(MemObject): kernel_extras = VectorParam.String([],"Additional object files to load") readfile = Param.String("", "file to read startup script from") symbolfile = Param.String("", "file to get the symbols from") - load_addr_mask = Param.UInt64(0xffffffffff, - "Address to mask loading binaries with") + load_addr_mask = Param.UInt64(0xffffffffffffffff, + "Address to mask loading binaries with, if 0, system " + "auto-calculates the mask to be the most restrictive, " + "otherwise it obeys a custom mask.") load_offset = Param.UInt64(0, "Address to offset loading binaries with") multi_thread = Param.Bool(False, |