root.cc (8901:bba76d164f9e) | root.cc (9048:950298f29140) |
---|---|
1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * Copyright (c) 2011 Advanced Micro Devices, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * 29 * Authors: Nathan Binkert 30 * Steve Reinhardt 31 * Gabe Black 32 */ 33 34#include "base/misc.hh" | 1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * Copyright (c) 2011 Advanced Micro Devices, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * 29 * Authors: Nathan Binkert 30 * Steve Reinhardt 31 * Gabe Black 32 */ 33 34#include "base/misc.hh" |
35#include "config/the_isa.hh" |
|
35#include "debug/TimeSync.hh" 36#include "sim/full_system.hh" 37#include "sim/root.hh" 38 39Root *Root::_root = NULL; 40 41/* 42 * This function is called periodically by an event in M5 and ensures that --- 73 unchanged lines hidden (view full) --- 116Root::initState() 117{ 118 timeSyncEnable(params()->time_sync_enable); 119} 120 121void 122Root::loadState(Checkpoint *cp) 123{ | 36#include "debug/TimeSync.hh" 37#include "sim/full_system.hh" 38#include "sim/root.hh" 39 40Root *Root::_root = NULL; 41 42/* 43 * This function is called periodically by an event in M5 and ensures that --- 73 unchanged lines hidden (view full) --- 117Root::initState() 118{ 119 timeSyncEnable(params()->time_sync_enable); 120} 121 122void 123Root::loadState(Checkpoint *cp) 124{ |
125 SimObject::loadState(cp); |
|
124 timeSyncEnable(params()->time_sync_enable); 125} 126 | 126 timeSyncEnable(params()->time_sync_enable); 127} 128 |
129void 130Root::serialize(std::ostream &os) 131{ 132 uint64_t cpt_ver = gem5CheckpointVersion; 133 SERIALIZE_SCALAR(cpt_ver); 134 SERIALIZE_SCALAR(FullSystem); 135 std::string isa = THE_ISA_STR; 136 SERIALIZE_SCALAR(isa); 137} 138 139void 140Root::unserialize(Checkpoint *cp, const std::string §ion) 141{ 142 uint64_t cpt_ver = 0; 143 UNSERIALIZE_OPT_SCALAR(cpt_ver); 144 if (cpt_ver < gem5CheckpointVersion) { 145 warn("**********************************************************\n"); 146 warn("!!!! Checkpoint ver %#x is older than current ver %#x !!!!\n", 147 cpt_ver, gem5CheckpointVersion); 148 warn("You might experience some issues when restoring and should run " 149 "the checkpoint upgrader (util/cpt_upgrade.py) on your " 150 "checkpoint\n"); 151 warn("**********************************************************\n"); 152 } else if (cpt_ver > gem5CheckpointVersion) { 153 warn("**********************************************************\n"); 154 warn("!!!! Checkpoint ver %#x is newer than current ver %#x !!!!\n", 155 cpt_ver, gem5CheckpointVersion); 156 warn("Running a new checkpoint with an older version of gem5 is not " 157 "supported. While it might work, you may experience incorrect " 158 "behavior or crashes.\n"); 159 warn("**********************************************************\n"); 160 } 161} 162 163 |
|
127bool FullSystem; 128unsigned int FullSystemInt; 129 130Root * 131RootParams::create() 132{ 133 static bool created = false; 134 if (created) 135 panic("only one root object allowed!"); 136 137 created = true; 138 139 FullSystem = full_system; 140 FullSystemInt = full_system ? 1 : 0; 141 142 return new Root(this); 143} | 164bool FullSystem; 165unsigned int FullSystemInt; 166 167Root * 168RootParams::create() 169{ 170 static bool created = false; 171 if (created) 172 panic("only one root object allowed!"); 173 174 created = true; 175 176 FullSystem = full_system; 177 FullSystemInt = full_system ? 1 : 0; 178 179 return new Root(this); 180} |