summaryrefslogtreecommitdiff
path: root/src/sim/system.cc
diff options
context:
space:
mode:
authorDam Sunwoo <dam.sunwoo@arm.com>2014-08-13 06:57:35 -0400
committerDam Sunwoo <dam.sunwoo@arm.com>2014-08-13 06:57:35 -0400
commit74a4926fe0a92502ca98ca7656dca478d88eb2f1 (patch)
treea6a98f34d41aa121fe20f0d57c73da3f4967a79c /src/sim/system.cc
parent41d069ef6a46dddf118a7e480d27e70cc47d029d (diff)
downloadgem5-74a4926fe0a92502ca98ca7656dca478d88eb2f1.tar.xz
sim: remove kernel mapping check for baremetal workloads
Baremetal workloads are specified using the "kernel" parameter, but don't always have the correct address mappings. This patch adds a boolean flag to the system and bypasses the kernel addr mapping checks when running in baremetal mode.
Diffstat (limited to 'src/sim/system.cc')
-rw-r--r--src/sim/system.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/sim/system.cc b/src/sim/system.cc
index 88d2a1625..9cd79cac0 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2013 ARM Limited
+ * Copyright (c) 2011-2014 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -274,13 +274,19 @@ System::initState()
* Load the kernel code into memory
*/
if (params()->kernel != "") {
- // Validate kernel mapping before loading binary
- if (!(isMemAddr((kernelStart & loadAddrMask) + loadAddrOffset) &&
- isMemAddr((kernelEnd & loadAddrMask) + loadAddrOffset))) {
- fatal("Kernel is mapped to invalid location (not memory). "
- "kernelStart 0x(%x) - kernelEnd 0x(%x) %#x:%#x\n", kernelStart,
- kernelEnd, (kernelStart & loadAddrMask) + loadAddrOffset,
- (kernelEnd & loadAddrMask) + loadAddrOffset);
+ if (params()->kernel_addr_check) {
+ // Validate kernel mapping before loading binary
+ if (!(isMemAddr((kernelStart & loadAddrMask) +
+ loadAddrOffset) &&
+ isMemAddr((kernelEnd & loadAddrMask) +
+ loadAddrOffset))) {
+ fatal("Kernel is mapped to invalid location (not memory). "
+ "kernelStart 0x(%x) - kernelEnd 0x(%x) %#x:%#x\n",
+ kernelStart,
+ kernelEnd, (kernelStart & loadAddrMask) +
+ loadAddrOffset,
+ (kernelEnd & loadAddrMask) + loadAddrOffset);
+ }
}
// Load program sections into memory
kernel->loadSections(physProxy, loadAddrMask, loadAddrOffset);