system.cc (10255:b71e6c577768) system.cc (10282:3ea92bc6393b)
1/*
1/*
2 * Copyright (c) 2011-2013 ARM Limited
2 * Copyright (c) 2011-2014 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

--- 258 unchanged lines hidden (view full) ---

269 for (int i = 0; i < threadContexts.size(); i++)
270 TheISA::startupCPU(threadContexts[i], i);
271 // Moved from the constructor to here since it relies on the
272 // address map being resolved in the interconnect
273 /**
274 * Load the kernel code into memory
275 */
276 if (params()->kernel != "") {
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

--- 258 unchanged lines hidden (view full) ---

269 for (int i = 0; i < threadContexts.size(); i++)
270 TheISA::startupCPU(threadContexts[i], i);
271 // Moved from the constructor to here since it relies on the
272 // address map being resolved in the interconnect
273 /**
274 * Load the kernel code into memory
275 */
276 if (params()->kernel != "") {
277 // Validate kernel mapping before loading binary
278 if (!(isMemAddr((kernelStart & loadAddrMask) + loadAddrOffset) &&
279 isMemAddr((kernelEnd & loadAddrMask) + loadAddrOffset))) {
280 fatal("Kernel is mapped to invalid location (not memory). "
281 "kernelStart 0x(%x) - kernelEnd 0x(%x) %#x:%#x\n", kernelStart,
282 kernelEnd, (kernelStart & loadAddrMask) + loadAddrOffset,
283 (kernelEnd & loadAddrMask) + loadAddrOffset);
277 if (params()->kernel_addr_check) {
278 // Validate kernel mapping before loading binary
279 if (!(isMemAddr((kernelStart & loadAddrMask) +
280 loadAddrOffset) &&
281 isMemAddr((kernelEnd & loadAddrMask) +
282 loadAddrOffset))) {
283 fatal("Kernel is mapped to invalid location (not memory). "
284 "kernelStart 0x(%x) - kernelEnd 0x(%x) %#x:%#x\n",
285 kernelStart,
286 kernelEnd, (kernelStart & loadAddrMask) +
287 loadAddrOffset,
288 (kernelEnd & loadAddrMask) + loadAddrOffset);
289 }
284 }
285 // Load program sections into memory
286 kernel->loadSections(physProxy, loadAddrMask, loadAddrOffset);
287
288 DPRINTF(Loader, "Kernel start = %#x\n", kernelStart);
289 DPRINTF(Loader, "Kernel end = %#x\n", kernelEnd);
290 DPRINTF(Loader, "Kernel entry = %#x\n", kernelEntry);
291 DPRINTF(Loader, "Kernel loaded...\n");

--- 178 unchanged lines hidden ---
290 }
291 // Load program sections into memory
292 kernel->loadSections(physProxy, loadAddrMask, loadAddrOffset);
293
294 DPRINTF(Loader, "Kernel start = %#x\n", kernelStart);
295 DPRINTF(Loader, "Kernel end = %#x\n", kernelEnd);
296 DPRINTF(Loader, "Kernel entry = %#x\n", kernelEntry);
297 DPRINTF(Loader, "Kernel loaded...\n");

--- 178 unchanged lines hidden ---