Deleted Added
sdiff udiff text old ( 12515:e3d1a64d0260 ) new ( 12680:91f4d6668b4f )
full compact
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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

130
131 // check if the cache line size is a value known to work
132 if (!(_cacheLineSize == 16 || _cacheLineSize == 32 ||
133 _cacheLineSize == 64 || _cacheLineSize == 128))
134 warn_once("Cache line size is neither 16, 32, 64 nor 128 bytes.\n");
135
136 // Get the generic system master IDs
137 MasterID tmp_id M5_VAR_USED;
138 tmp_id = getMasterId("writebacks");
139 assert(tmp_id == Request::wbMasterId);
140 tmp_id = getMasterId("functional");
141 assert(tmp_id == Request::funcMasterId);
142 tmp_id = getMasterId("interrupt");
143 assert(tmp_id == Request::intMasterId);
144
145 if (FullSystem) {
146 if (params()->kernel == "") {
147 inform("No kernel set for full system simulation. "
148 "Assuming you know what you're doing\n");
149 } else {
150 // Get the kernel code

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

487
488void
489printSystems()
490{
491 System::printSystems();
492}
493
494MasterID
495System::getMasterId(std::string master_name)
496{
497 // strip off system name if the string starts with it
498 if (startswith(master_name, name()))
499 master_name = master_name.erase(0, name().size() + 1);
500
501 // CPUs in switch_cpus ask for ids again after switching
502 for (int i = 0; i < masterIds.size(); i++) {
503 if (masterIds[i] == master_name) {
504 return i;
505 }
506 }
507
508 // Verify that the statistics haven't been enabled yet
509 // Otherwise objects will have sized their stat buckets and
510 // they will be too small
511
512 if (Stats::enabled()) {
513 fatal("Can't request a masterId after regStats(). "
514 "You must do so in init().\n");
515 }
516
517 masterIds.push_back(master_name);
518
519 return masterIds.size() - 1;
520}
521
522std::string
523System::getMasterName(MasterID master_id)
524{
525 if (master_id >= masterIds.size())
526 fatal("Invalid master_id passed to getMasterName()\n");
527
528 return masterIds[master_id];
529}
530
531System *
532SystemParams::create()
533{
534 return new System(this);
535}