summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDam Sunwoo <dam.sunwoo@arm.com>2012-05-10 18:04:27 -0500
committerDam Sunwoo <dam.sunwoo@arm.com>2012-05-10 18:04:27 -0500
commitf2f7fa1a1c23da74c6ca8da8e6539f3330b06da4 (patch)
tree9ef84a5e87837d3602f53ed4a7953d9289271e18
parent041b93242883dc604f193e912497350f55800ee3 (diff)
downloadgem5-f2f7fa1a1c23da74c6ca8da8e6539f3330b06da4.tar.xz
ARM: guard masked symbol tables by default
Symbol tables masked with the loadAddrMask create redundant entries that could conflict with kernel function events that rely on the original addresses. This patch guards the creation of those masked symbol tables by default, with an option to enable them when needed (for early-stage kernel debugging, etc.)
-rw-r--r--src/arch/arm/ArmSystem.py1
-rw-r--r--src/arch/arm/linux/system.cc10
2 files changed, 7 insertions, 4 deletions
diff --git a/src/arch/arm/ArmSystem.py b/src/arch/arm/ArmSystem.py
index f4aedaf98..a86fc8822 100644
--- a/src/arch/arm/ArmSystem.py
+++ b/src/arch/arm/ArmSystem.py
@@ -65,3 +65,4 @@ class LinuxArmSystem(ArmSystem):
machine_type = Param.ArmMachineType('RealView_PBX',
"Machine id from http://www.arm.linux.org.uk/developer/machines/")
atags_addr = Param.Addr(0x100, "Address where default atags structure should be written")
+ early_kernel_symbols = Param.Bool(False, "enable early kernel symbol tables before MMU")
diff --git a/src/arch/arm/linux/system.cc b/src/arch/arm/linux/system.cc
index 0d9e73a53..d537717ec 100644
--- a/src/arch/arm/linux/system.cc
+++ b/src/arch/arm/linux/system.cc
@@ -114,10 +114,12 @@ LinuxArmSystem::initState()
ArmSystem::initState();
// Load symbols at physical address, we might not want
- // to do this perminately, for but early bootup work
- // it is helpfulp.
- kernel->loadGlobalSymbols(kernelSymtab, loadAddrMask);
- kernel->loadGlobalSymbols(debugSymbolTable, loadAddrMask);
+ // to do this permanently, for but early bootup work
+ // it is helpful.
+ if (params()->early_kernel_symbols) {
+ kernel->loadGlobalSymbols(kernelSymtab, loadAddrMask);
+ kernel->loadGlobalSymbols(debugSymbolTable, loadAddrMask);
+ }
// Setup boot data structure
AtagCore *ac = new AtagCore;