From 62ae85c0a2db286bcf1c8df5ad8f97a8bd527a55 Mon Sep 17 00:00:00 2001 From: Geoffrey Blake Date: Thu, 12 May 2016 11:47:43 -0500 Subject: 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 Reviewed-by: Curtis Dunham Signed-off-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/2323 Reviewed-by: Jason Lowe-Power --- src/dev/arm/RealView.py | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/dev') diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py index 08145bf66..699b7dfb7 100644 --- a/src/dev/arm/RealView.py +++ b/src/dev/arm/RealView.py @@ -369,7 +369,6 @@ class RealView(Platform): self.nvmem.port = mem_bus.master cur_sys.boot_loader = loc('boot.arm') cur_sys.atags_addr = 0x100 - cur_sys.load_addr_mask = 0xfffffff cur_sys.load_offset = 0 @@ -746,7 +745,6 @@ class VExpress_EMM(RealView): if not cur_sys.boot_loader: cur_sys.boot_loader = loc('boot_emm.arm') cur_sys.atags_addr = 0x8000000 - cur_sys.load_addr_mask = 0xfffffff cur_sys.load_offset = 0x80000000 class VExpress_EMM64(VExpress_EMM): @@ -764,7 +762,6 @@ class VExpress_EMM64(VExpress_EMM): if not cur_sys.boot_loader: cur_sys.boot_loader = loc('boot_emm.arm64') cur_sys.atags_addr = 0x8000000 - cur_sys.load_addr_mask = 0xfffffff cur_sys.load_offset = 0x80000000 @@ -936,9 +933,6 @@ Interrupts: if not cur_sys.boot_loader: cur_sys.boot_loader = [ loc('boot_emm.arm64'), loc('boot_emm.arm') ] cur_sys.atags_addr = 0x8000000 - # the old load_add_mask 0xfffffff works for 32-bit kernel - # but not the 64-bit one. The new value 0x7ffffff works for both - cur_sys.load_addr_mask = 0x7ffffff cur_sys.load_offset = 0x80000000 # Setup m5ops. It's technically not a part of the boot -- cgit v1.2.3