Alpha System: override startup(), instead of loadState()
Alpha System was overriding loadState() function to setup some functional event. The system tried to read/write to memory before the Ruby memory had unserialized the state. With this patch, Alpha System overrides the startup() function, and sets up functional events in this function. This works because startup() is called after Ruby memory system has unserialized the memory state.
This commit is contained in:
parent
0b3897fc90
commit
649e377937
|
@ -134,21 +134,14 @@ AlphaSystem::initState()
|
|||
virtProxy.write(addr+0x58, data);
|
||||
} else
|
||||
panic("could not find hwrpb\n");
|
||||
|
||||
// Setup all the function events now that we have a system and a symbol
|
||||
// table
|
||||
setupFuncEvents();
|
||||
}
|
||||
|
||||
void
|
||||
AlphaSystem::loadState(Checkpoint *cp)
|
||||
AlphaSystem::startup()
|
||||
{
|
||||
System::loadState(cp);
|
||||
|
||||
// Setup all the function events now that we have a system and a symbol
|
||||
// table
|
||||
setupFuncEvents();
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -62,9 +62,9 @@ class AlphaSystem : public System
|
|||
virtual void serialize(std::ostream &os);
|
||||
virtual void unserialize(Checkpoint *cp, const std::string §ion);
|
||||
|
||||
/** Override loadState to provide a path to call setupFuncEvents()
|
||||
/** Override startup() to provide a path to call setupFuncEvents()
|
||||
*/
|
||||
virtual void loadState(Checkpoint *cp);
|
||||
virtual void startup();
|
||||
|
||||
/**
|
||||
* Set the m5AlphaAccess pointer in the console
|
||||
|
|
Loading…
Reference in a new issue