drain.hh (10910:32f3d1c454ec) | drain.hh (10911:0ca18446a5bb) |
---|---|
1/* 2 * Copyright (c) 2012, 2015 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 --- 190 unchanged lines hidden (view full) --- 199 /** 200 * Resume execution after a successful drain. 201 * 202 * @note This method is normally only called from the simulation 203 * scripts. 204 */ 205 virtual void drainResume(); 206 | 1/* 2 * Copyright (c) 2012, 2015 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 --- 190 unchanged lines hidden (view full) --- 199 /** 200 * Resume execution after a successful drain. 201 * 202 * @note This method is normally only called from the simulation 203 * scripts. 204 */ 205 virtual void drainResume(); 206 |
207 /** 208 * Write back dirty buffers to memory using functional writes. 209 * 210 * After returning, an object implementing this method should have 211 * written all its dirty data back to memory. This method is 212 * typically used to prepare a system with caches for 213 * checkpointing. 214 */ 215 virtual void memWriteback() {}; 216 217 /** 218 * Invalidate the contents of memory buffers. 219 * 220 * When the switching to hardware virtualized CPU models, we need 221 * to make sure that we don't have any cached state in the system 222 * that might become stale when we return. This method is used to 223 * flush all such state back to main memory. 224 * 225 * @warn This does <i>not</i> cause any dirty state to be written 226 * back to memory. 227 */ 228 virtual void memInvalidate() {}; 229 | |
230 DrainState getDrainState() const { return _drainState; } 231 232 protected: 233 void setDrainState(DrainState new_state) { _drainState = new_state; } 234 235 private: 236 DrainState _drainState; 237}; 238 239DrainManager *createDrainManager(); 240void cleanupDrainManager(DrainManager *drain_manager); 241 242#endif | 207 DrainState getDrainState() const { return _drainState; } 208 209 protected: 210 void setDrainState(DrainState new_state) { _drainState = new_state; } 211 212 private: 213 DrainState _drainState; 214}; 215 216DrainManager *createDrainManager(); 217void cleanupDrainManager(DrainManager *drain_manager); 218 219#endif |