system.cc (8852:c744483edfcf) | system.cc (8885:52bbd95b31ed) |
---|---|
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 --- 103 unchanged lines hidden (view full) --- 112 MasterID tmp_id M5_VAR_USED; 113 tmp_id = getMasterId("writebacks"); 114 assert(tmp_id == Request::wbMasterId); 115 tmp_id = getMasterId("functional"); 116 assert(tmp_id == Request::funcMasterId); 117 tmp_id = getMasterId("interrupt"); 118 assert(tmp_id == Request::intMasterId); 119 | 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 --- 103 unchanged lines hidden (view full) --- 112 MasterID tmp_id M5_VAR_USED; 113 tmp_id = getMasterId("writebacks"); 114 assert(tmp_id == Request::wbMasterId); 115 tmp_id = getMasterId("functional"); 116 assert(tmp_id == Request::funcMasterId); 117 tmp_id = getMasterId("interrupt"); 118 assert(tmp_id == Request::intMasterId); 119 |
120 if (FullSystem) { 121 if (params()->kernel == "") { 122 inform("No kernel set for full system simulation. " 123 "Assuming you know what you're doing if not SPARC ISA\n"); 124 } else { 125 // Get the kernel code 126 kernel = createObjectFile(params()->kernel); 127 inform("kernel located at: %s", params()->kernel); 128 129 if (kernel == NULL) 130 fatal("Could not load kernel file %s", params()->kernel); 131 132 // setup entry points 133 kernelStart = kernel->textBase(); 134 kernelEnd = kernel->bssBase() + kernel->bssSize(); 135 kernelEntry = kernel->entryPoint(); 136 137 // load symbols 138 if (!kernel->loadGlobalSymbols(kernelSymtab)) 139 fatal("could not load kernel symbols\n"); 140 141 if (!kernel->loadLocalSymbols(kernelSymtab)) 142 fatal("could not load kernel local symbols\n"); 143 144 if (!kernel->loadGlobalSymbols(debugSymbolTable)) 145 fatal("could not load kernel symbols\n"); 146 147 if (!kernel->loadLocalSymbols(debugSymbolTable)) 148 fatal("could not load kernel local symbols\n"); 149 150 // Loading only needs to happen once and after memory system is 151 // connected so it will happen in initState() 152 } 153 } 154 155 // increment the number of running systms 156 numSystemsRunning++; 157 |
|
120} 121 122System::~System() 123{ 124 delete kernelSymtab; 125 delete kernel; 126 127 for (uint32_t j = 0; j < numWorkIds; j++) --- 99 unchanged lines hidden (view full) --- 227 if (FullSystem) { 228 for (i = 0; i < threadContexts.size(); i++) 229 TheISA::startupCPU(threadContexts[i], i); 230 // Moved from the constructor to here since it relies on the 231 // address map being resolved in the interconnect 232 /** 233 * Load the kernel code into memory 234 */ | 158} 159 160System::~System() 161{ 162 delete kernelSymtab; 163 delete kernel; 164 165 for (uint32_t j = 0; j < numWorkIds; j++) --- 99 unchanged lines hidden (view full) --- 265 if (FullSystem) { 266 for (i = 0; i < threadContexts.size(); i++) 267 TheISA::startupCPU(threadContexts[i], i); 268 // Moved from the constructor to here since it relies on the 269 // address map being resolved in the interconnect 270 /** 271 * Load the kernel code into memory 272 */ |
235 if (params()->kernel == "") { 236 inform("No kernel set for full system simulation. " 237 "Assuming you know what you're doing...\n"); 238 } else { 239 // Load kernel code 240 kernel = createObjectFile(params()->kernel); 241 inform("kernel located at: %s", params()->kernel); 242 243 if (kernel == NULL) 244 fatal("Could not load kernel file %s", params()->kernel); 245 | 273 if (params()->kernel != "") { |
246 // Load program sections into memory 247 kernel->loadSections(physProxy, loadAddrMask); 248 | 274 // Load program sections into memory 275 kernel->loadSections(physProxy, loadAddrMask); 276 |
249 // setup entry points 250 kernelStart = kernel->textBase(); 251 kernelEnd = kernel->bssBase() + kernel->bssSize(); 252 kernelEntry = kernel->entryPoint(); 253 254 // load symbols 255 if (!kernel->loadGlobalSymbols(kernelSymtab)) 256 fatal("could not load kernel symbols\n"); 257 258 if (!kernel->loadLocalSymbols(kernelSymtab)) 259 fatal("could not load kernel local symbols\n"); 260 261 if (!kernel->loadGlobalSymbols(debugSymbolTable)) 262 fatal("could not load kernel symbols\n"); 263 264 if (!kernel->loadLocalSymbols(debugSymbolTable)) 265 fatal("could not load kernel local symbols\n"); 266 | |
267 DPRINTF(Loader, "Kernel start = %#x\n", kernelStart); 268 DPRINTF(Loader, "Kernel end = %#x\n", kernelEnd); 269 DPRINTF(Loader, "Kernel entry = %#x\n", kernelEntry); 270 DPRINTF(Loader, "Kernel loaded...\n"); 271 } 272 } 273 | 277 DPRINTF(Loader, "Kernel start = %#x\n", kernelStart); 278 DPRINTF(Loader, "Kernel end = %#x\n", kernelEnd); 279 DPRINTF(Loader, "Kernel entry = %#x\n", kernelEntry); 280 DPRINTF(Loader, "Kernel loaded...\n"); 281 } 282 } 283 |
274 // increment the number of running systms 275 numSystemsRunning++; 276 | |
277 activeCpus.clear(); 278 279 if (!FullSystem) 280 return; 281 282 for (i = 0; i < threadContexts.size(); i++) 283 TheISA::startupCPU(threadContexts[i], i); 284} --- 165 unchanged lines hidden --- | 284 activeCpus.clear(); 285 286 if (!FullSystem) 287 return; 288 289 for (i = 0; i < threadContexts.size(); i++) 290 TheISA::startupCPU(threadContexts[i], i); 291} --- 165 unchanged lines hidden --- |