cpu.cc (5712:199d31b47f7b) | cpu.cc (5714:76abee886def) |
---|---|
1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 575 unchanged lines hidden (view full) --- 584 updateThreadPriority(); 585#endif 586} 587 588template <class Impl> 589void 590FullO3CPU<Impl>::init() 591{ | 1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 575 unchanged lines hidden (view full) --- 584 updateThreadPriority(); 585#endif 586} 587 588template <class Impl> 589void 590FullO3CPU<Impl>::init() 591{ |
592 if (!deferRegistration) { 593 registerThreadContexts(); 594 } | 592 BaseCPU::init(); |
595 596 // Set inSyscall so that the CPU doesn't squash when initially 597 // setting up registers. 598 for (int i = 0; i < number_of_threads; ++i) 599 thread[i]->inSyscall = true; 600 601 for (int tid=0; tid < number_of_threads; tid++) { 602#if FULL_SYSTEM 603 ThreadContext *src_tc = threadContexts[tid]; 604#else 605 ThreadContext *src_tc = thread[tid]->getTC(); 606#endif 607 // Threads start in the Suspended State 608 if (src_tc->status() != ThreadContext::Suspended) { 609 continue; 610 } 611 612#if FULL_SYSTEM | 593 594 // Set inSyscall so that the CPU doesn't squash when initially 595 // setting up registers. 596 for (int i = 0; i < number_of_threads; ++i) 597 thread[i]->inSyscall = true; 598 599 for (int tid=0; tid < number_of_threads; tid++) { 600#if FULL_SYSTEM 601 ThreadContext *src_tc = threadContexts[tid]; 602#else 603 ThreadContext *src_tc = thread[tid]->getTC(); 604#endif 605 // Threads start in the Suspended State 606 if (src_tc->status() != ThreadContext::Suspended) { 607 continue; 608 } 609 610#if FULL_SYSTEM |
613 TheISA::initCPU(src_tc, src_tc->cpuId()); | 611 TheISA::initCPU(src_tc, src_tc->contextId()); |
614#endif 615 } 616 617 // Clear inSyscall. 618 for (int i = 0; i < number_of_threads; ++i) 619 thread[i]->inSyscall = false; 620 621 // Initialize stages. --- 1121 unchanged lines hidden --- | 612#endif 613 } 614 615 // Clear inSyscall. 616 for (int i = 0; i < number_of_threads; ++i) 617 thread[i]->inSyscall = false; 618 619 // Initialize stages. --- 1121 unchanged lines hidden --- |