system.cc (9850:87d6b41749e9) system.cc (10037:5cac77888310)
1/*
2 * Copyright (c) 2011-2013 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

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

74
75System::System(Params *p)
76 : MemObject(p), _systemPort("system_port", this),
77 _numContexts(0),
78 pagePtr(0),
79 init_param(p->init_param),
80 physProxy(_systemPort, p->cache_line_size),
81 loadAddrMask(p->load_addr_mask),
1/*
2 * Copyright (c) 2011-2013 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

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

74
75System::System(Params *p)
76 : MemObject(p), _systemPort("system_port", this),
77 _numContexts(0),
78 pagePtr(0),
79 init_param(p->init_param),
80 physProxy(_systemPort, p->cache_line_size),
81 loadAddrMask(p->load_addr_mask),
82 loadAddrOffset(p->load_offset),
82 nextPID(0),
83 physmem(name() + ".physmem", p->memories),
84 memoryMode(p->mem_mode),
85 _cacheLineSize(p->cache_line_size),
86 workItemsBegin(0),
87 workItemsEnd(0),
88 numWorkIds(p->num_work_ids),
89 _params(p),

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

269 TheISA::startupCPU(threadContexts[i], i);
270 // Moved from the constructor to here since it relies on the
271 // address map being resolved in the interconnect
272 /**
273 * Load the kernel code into memory
274 */
275 if (params()->kernel != "") {
276 // Validate kernel mapping before loading binary
83 nextPID(0),
84 physmem(name() + ".physmem", p->memories),
85 memoryMode(p->mem_mode),
86 _cacheLineSize(p->cache_line_size),
87 workItemsBegin(0),
88 workItemsEnd(0),
89 numWorkIds(p->num_work_ids),
90 _params(p),

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

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
277 if (!(isMemAddr(kernelStart & loadAddrMask) &&
278 isMemAddr(kernelEnd & loadAddrMask))) {
278 if (!(isMemAddr((kernelStart & loadAddrMask) + loadAddrOffset) &&
279 isMemAddr((kernelEnd & loadAddrMask) + loadAddrOffset))) {
279 fatal("Kernel is mapped to invalid location (not memory). "
280 fatal("Kernel is mapped to invalid location (not memory). "
280 "kernelStart 0x(%x) - kernelEnd 0x(%x)\n", kernelStart,
281 kernelEnd);
281 "kernelStart 0x(%x) - kernelEnd 0x(%x) %#x:%#x\n", kernelStart,
282 kernelEnd, (kernelStart & loadAddrMask) + loadAddrOffset,
283 (kernelEnd & loadAddrMask) + loadAddrOffset);
282 }
283 // Load program sections into memory
284 }
285 // Load program sections into memory
284 kernel->loadSections(physProxy, loadAddrMask);
286 kernel->loadSections(physProxy, loadAddrMask, loadAddrOffset);
285
286 DPRINTF(Loader, "Kernel start = %#x\n", kernelStart);
287 DPRINTF(Loader, "Kernel end = %#x\n", kernelEnd);
288 DPRINTF(Loader, "Kernel entry = %#x\n", kernelEntry);
289 DPRINTF(Loader, "Kernel loaded...\n");
290 }
291 }
292

--- 178 unchanged lines hidden ---
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");
292 }
293 }
294

--- 178 unchanged lines hidden ---