1/* 2 * Copyright (c) 2011-2014,2017 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 --- 33 unchanged lines hidden (view full) --- 42 * Lisa Hsu 43 * Nathan Binkert 44 * Ali Saidi 45 * Rick Strong 46 */ 47 48#include "sim/system.hh" 49 |
50#include <algorithm> 51 |
52#include "arch/remote_gdb.hh" 53#include "arch/utility.hh" 54#include "base/loader/object_file.hh" 55#include "base/loader/symtab.hh" 56#include "base/str.hh" 57#include "base/trace.hh" 58#include "config/use_kvm.hh" 59#if USE_KVM --- 24 unchanged lines hidden (view full) --- 84using namespace TheISA; 85 86vector<System *> System::systemList; 87 88int System::numSystemsRunning = 0; 89 90System::System(Params *p) 91 : MemObject(p), _systemPort("system_port", this), |
92 multiThread(p->multi_thread), 93 pagePtr(0), 94 init_param(p->init_param), 95 physProxy(_systemPort, p->cache_line_size), 96 kernelSymtab(nullptr), 97 kernel(nullptr), 98 loadAddrMask(p->load_addr_mask), 99 loadAddrOffset(p->load_offset), --- 152 unchanged lines hidden (view full) --- 252 253 if (threadContexts.size() <= id) 254 threadContexts.resize(id + 1); 255 256 fatal_if(threadContexts[id], 257 "Cannot have two CPUs with the same id (%d)\n", id); 258 259 threadContexts[id] = tc; |
260 261#if THE_ISA != NULL_ISA 262 int port = getRemoteGDBPort(); 263 if (port) { 264 RemoteGDB *rgdb = new RemoteGDB(this, tc, port + id); 265 rgdb->listen(); 266 267 BaseCPU *cpu = tc->getCpuPtr(); --- 14 unchanged lines hidden (view full) --- 282 activeCpus.push_back(false); 283 284 return id; 285} 286 287int 288System::numRunningContexts() 289{ |
290 return std::count_if( 291 threadContexts.cbegin(), 292 threadContexts.cend(), 293 [] (ThreadContext* tc) { 294 return tc->status() != ThreadContext::Halted; 295 } 296 ); |
297} 298 299void 300System::initState() 301{ 302 if (FullSystem) { 303 for (int i = 0; i < threadContexts.size(); i++) 304 TheISA::startupCPU(threadContexts[i], i); --- 231 unchanged lines hidden --- |