system.cc (9147:05137f17887e) system.cc (9172:2f2e4582014f)
1/*
2 * Copyright (c) 2011-2012 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

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

252 ++running;
253 }
254 return running;
255}
256
257void
258System::initState()
259{
1/*
2 * Copyright (c) 2011-2012 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

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

252 ++running;
253 }
254 return running;
255}
256
257void
258System::initState()
259{
260 int i;
261 if (FullSystem) {
260 if (FullSystem) {
262 for (i = 0; i < threadContexts.size(); i++)
261 for (int i = 0; i < threadContexts.size(); i++)
263 TheISA::startupCPU(threadContexts[i], i);
264 // Moved from the constructor to here since it relies on the
265 // address map being resolved in the interconnect
266 /**
267 * Load the kernel code into memory
268 */
269 if (params()->kernel != "") {
270 // Load program sections into memory
271 kernel->loadSections(physProxy, loadAddrMask);
272
273 DPRINTF(Loader, "Kernel start = %#x\n", kernelStart);
274 DPRINTF(Loader, "Kernel end = %#x\n", kernelEnd);
275 DPRINTF(Loader, "Kernel entry = %#x\n", kernelEntry);
276 DPRINTF(Loader, "Kernel loaded...\n");
277 }
278 }
279
280 activeCpus.clear();
262 TheISA::startupCPU(threadContexts[i], i);
263 // Moved from the constructor to here since it relies on the
264 // address map being resolved in the interconnect
265 /**
266 * Load the kernel code into memory
267 */
268 if (params()->kernel != "") {
269 // Load program sections into memory
270 kernel->loadSections(physProxy, loadAddrMask);
271
272 DPRINTF(Loader, "Kernel start = %#x\n", kernelStart);
273 DPRINTF(Loader, "Kernel end = %#x\n", kernelEnd);
274 DPRINTF(Loader, "Kernel entry = %#x\n", kernelEntry);
275 DPRINTF(Loader, "Kernel loaded...\n");
276 }
277 }
278
279 activeCpus.clear();
281
282 if (!FullSystem)
283 return;
284
285 for (i = 0; i < threadContexts.size(); i++)
286 TheISA::startupCPU(threadContexts[i], i);
287}
288
289void
290System::replaceThreadContext(ThreadContext *tc, int context_id)
291{
292 if (context_id >= threadContexts.size()) {
293 panic("replaceThreadContext: bad id, %d >= %d\n",
294 context_id, threadContexts.size());

--- 153 unchanged lines hidden ---
280}
281
282void
283System::replaceThreadContext(ThreadContext *tc, int context_id)
284{
285 if (context_id >= threadContexts.size()) {
286 panic("replaceThreadContext: bad id, %d >= %d\n",
287 context_id, threadContexts.size());

--- 153 unchanged lines hidden ---