1/*
2 * Copyright (c) 2012-2014 ARM Limited
2 * Copyright (c) 2012-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

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

190 threads[tid]->startup();
191 pipeline->wakeupFetch(tid);
192 }
193}
194
195DrainState
196MinorCPU::drain()
197{
198 // Deschedule any power gating event (if any)
199 deschedulePowerGatingEvent();
200
201 if (switchedOut()) {
202 DPRINTF(Drain, "Minor CPU switched out, draining not needed.\n");
203 return DrainState::Drained;
204 }
205
206 DPRINTF(Drain, "MinorCPU drain\n");
207
208 /* Need to suspend all threads and wait for Execute to idle.

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

238
239 DPRINTF(Drain, "MinorCPU drainResume\n");
240
241 if (!system->isTimingMode()) {
242 fatal("The Minor CPU requires the memory system to be in "
243 "'timing' mode.\n");
244 }
245
243 for (ThreadID tid = 0; tid < numThreads; tid++)
246 for (ThreadID tid = 0; tid < numThreads; tid++){
247 wakeup(tid);
248 }
249
250 pipeline->drainResume();
251
252 // Reschedule any power gating event (if any)
253 schedulePowerGatingEvent();
254}
255
256void
257MinorCPU::memWriteback()
258{
259 DPRINTF(Drain, "MinorCPU memWriteback\n");
260}
261

--- 96 unchanged lines hidden ---