Merge branch 'master' of ssh://vamos.informatik.uni-erlangen.de:29418/fail
This commit is contained in:
@ -6199,7 +6199,7 @@
|
||||
<dia:point val="1.8325,-5.93"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="obj_bb">
|
||||
<dia:rectangle val="1.8325,-6.73;14.3276,-4.33"/>
|
||||
<dia:rectangle val="1.8325,-6.73;13.8483,-5.13"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="meta">
|
||||
<dia:composite type="dict"/>
|
||||
@ -9786,8 +9786,8 @@
|
||||
</dia:attribute>
|
||||
<dia:attribute name="orth_points">
|
||||
<dia:point val="92.6981,36.05"/>
|
||||
<dia:point val="88.9755,36.05"/>
|
||||
<dia:point val="88.9755,40.565"/>
|
||||
<dia:point val="88.9754,36.05"/>
|
||||
<dia:point val="88.9754,40.565"/>
|
||||
<dia:point val="85.2528,40.565"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="orth_orient">
|
||||
@ -17241,7 +17241,7 @@
|
||||
<dia:real val="4.2000000000000002"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="name">
|
||||
<dia:string>#GenericTimerEvent#</dia:string>
|
||||
<dia:string>#TimerEvent#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="stereotype">
|
||||
<dia:string>##</dia:string>
|
||||
@ -18919,8 +18919,8 @@
|
||||
</dia:attribute>
|
||||
<dia:attribute name="orth_points">
|
||||
<dia:point val="137.873,39.5"/>
|
||||
<dia:point val="137.873,41.2937"/>
|
||||
<dia:point val="149.653,41.2937"/>
|
||||
<dia:point val="137.873,41.2938"/>
|
||||
<dia:point val="149.653,41.2938"/>
|
||||
<dia:point val="149.653,43.0875"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="orth_orient">
|
||||
@ -19135,16 +19135,16 @@
|
||||
<dia:point val="137.873,39.5"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="obj_bb">
|
||||
<dia:rectangle val="131.511,39.45;138.723,43.3875"/>
|
||||
<dia:rectangle val="131.51,39.45;138.723,43.3875"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="meta">
|
||||
<dia:composite type="dict"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="orth_points">
|
||||
<dia:point val="137.873,39.5"/>
|
||||
<dia:point val="137.873,41.4187"/>
|
||||
<dia:point val="131.561,41.4187"/>
|
||||
<dia:point val="131.561,43.3375"/>
|
||||
<dia:point val="137.873,41.4188"/>
|
||||
<dia:point val="131.56,41.4188"/>
|
||||
<dia:point val="131.56,43.3375"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="orth_orient">
|
||||
<dia:enum val="1"/>
|
||||
@ -20852,7 +20852,7 @@
|
||||
<dia:point val="112.602,45.4378"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="obj_bb">
|
||||
<dia:rectangle val="111.752,45.3877;141.618,52.6871"/>
|
||||
<dia:rectangle val="111.752,45.3878;141.618,52.6871"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="meta">
|
||||
<dia:composite type="dict"/>
|
||||
@ -21078,17 +21078,17 @@
|
||||
</dia:object>
|
||||
<dia:object type="UML - Realizes" version="1" id="O108">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="97.8094,45.2875"/>
|
||||
<dia:point val="97.8093,45.2875"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="obj_bb">
|
||||
<dia:rectangle val="96.9594,45.2375;106.651,53.7875"/>
|
||||
<dia:rectangle val="96.9593,45.2375;106.651,53.7875"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="meta">
|
||||
<dia:composite type="dict"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="orth_points">
|
||||
<dia:point val="97.8094,45.2875"/>
|
||||
<dia:point val="97.8094,49.5125"/>
|
||||
<dia:point val="97.8093,45.2875"/>
|
||||
<dia:point val="97.8093,49.5125"/>
|
||||
<dia:point val="106.601,49.5125"/>
|
||||
<dia:point val="106.601,53.7375"/>
|
||||
</dia:attribute>
|
||||
@ -21119,17 +21119,17 @@
|
||||
</dia:object>
|
||||
<dia:object type="UML - Realizes" version="1" id="O109">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="131.561,46.1879"/>
|
||||
<dia:point val="131.56,46.1879"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="obj_bb">
|
||||
<dia:rectangle val="106.551,46.1379;132.411,53.7372"/>
|
||||
<dia:rectangle val="106.551,46.1379;132.41,53.7372"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="meta">
|
||||
<dia:composite type="dict"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="orth_points">
|
||||
<dia:point val="131.561,46.1879"/>
|
||||
<dia:point val="131.561,49.9375"/>
|
||||
<dia:point val="131.56,46.1879"/>
|
||||
<dia:point val="131.56,49.9375"/>
|
||||
<dia:point val="106.601,49.9375"/>
|
||||
<dia:point val="106.601,53.6872"/>
|
||||
</dia:attribute>
|
||||
|
||||
@ -334,18 +334,18 @@ public:
|
||||
};
|
||||
|
||||
/**
|
||||
* \class GenericTimerEvent
|
||||
* \class TimerEvent
|
||||
* This event type is used to encapsulate timeout-specific data.
|
||||
*/
|
||||
class GenericTimerEvent : public BaseEvent {
|
||||
class TimerEvent : public BaseEvent {
|
||||
protected:
|
||||
timer_id_t m_Id; //!< internal timer id (sim-specific)
|
||||
public:
|
||||
/**
|
||||
* Creates a new timer event.
|
||||
*/
|
||||
GenericTimerEvent(timer_id_t id = INVALID_TIMER) : m_Id(id) { }
|
||||
~GenericTimerEvent() { }
|
||||
TimerEvent(timer_id_t id = INVALID_TIMER) : m_Id(id) { }
|
||||
~TimerEvent() { }
|
||||
/**
|
||||
* Retrieves the internal timer id. Maybe useful for debug output.
|
||||
* @return the timer id or \c INVALID_TIMER if the timer is invalid
|
||||
|
||||
@ -653,7 +653,7 @@ public:
|
||||
class TimerListener : public BaseListener {
|
||||
protected:
|
||||
unsigned m_Timeout; //!< timeout interval in microseconds
|
||||
GenericTimerEvent m_Data;
|
||||
TimerEvent m_Data;
|
||||
public:
|
||||
/**
|
||||
* Creates a new timer listener. This can be used to implement a timeout-
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#include "SALInst.hpp"
|
||||
#include "Event.hpp"
|
||||
#include "Listener.hpp"
|
||||
#include "util/CommandLine.hpp"
|
||||
|
||||
namespace fail {
|
||||
|
||||
@ -35,12 +36,16 @@ BaseListener* SimulatorController::resume(void)
|
||||
return m_LstList.getLastFired();
|
||||
}
|
||||
|
||||
void SimulatorController::startup()
|
||||
void SimulatorController::startup(int argc, char **argv)
|
||||
{
|
||||
// Some greetings to the user:
|
||||
std::cout << "[SimulatorController] Initializing..." << std::endl;
|
||||
// TODO: Log-Level?
|
||||
|
||||
if (argv) {
|
||||
CommandLine::Inst().collect_args(bx_startup_flags.argc, bx_startup_flags.argv);
|
||||
}
|
||||
|
||||
// Activate previously added experiments to allow initialization:
|
||||
initExperiments();
|
||||
}
|
||||
|
||||
@ -48,8 +48,11 @@ public:
|
||||
* This function needs to be invoked once the simulator starts, and
|
||||
* allows the SimulatorController to instantiate all needed experiment
|
||||
* components.
|
||||
*
|
||||
* @param argc main()'s argument counter
|
||||
* @param argv main()'s argument value vector
|
||||
*/
|
||||
void startup();
|
||||
void startup(int argc = 0, char **argv = 0);
|
||||
/**
|
||||
* Experiments need to hook here.
|
||||
*/
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
#include "BochsMemory.hpp"
|
||||
#include "../SALInst.hpp"
|
||||
#include "../Listener.hpp"
|
||||
#include "util/CommandLine.hpp"
|
||||
|
||||
namespace fail {
|
||||
|
||||
@ -174,9 +173,4 @@ ConcreteCPU& BochsController::detectCPU(BX_CPU_C* pCPU) const
|
||||
return getCPU(i);
|
||||
}
|
||||
|
||||
void BochsController::collectCommandLineArguments(int argc, char **argv) const
|
||||
{
|
||||
CommandLine::Inst().collect_args(bx_startup_flags.argc, bx_startup_flags.argv);
|
||||
}
|
||||
|
||||
} // end-of-namespace: fail
|
||||
|
||||
@ -150,20 +150,6 @@ public:
|
||||
* @see The uses SimulatorController::getCPU().
|
||||
*/
|
||||
ConcreteCPU& detectCPU(BX_CPU_C* pCPU) const;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Hack: Indirection for commandline argument collection
|
||||
*
|
||||
* This prevents CommandLine.hpp (and optionparser.h) from being pulled
|
||||
* inbe to every single Bochs translation unit via FailBochsInit.ah,
|
||||
* leading to compilation errors in some of them.
|
||||
* TODO: Move this upwards to SimulatorController?
|
||||
*
|
||||
* @param argc main()'s argument counter
|
||||
* @param argv main()'s argument value vector
|
||||
*/
|
||||
void collectCommandLineArguments(int argc, char **argv) const;
|
||||
};
|
||||
|
||||
} // end-of-namespace: fail
|
||||
|
||||
@ -10,8 +10,7 @@
|
||||
aspect FailBochsInit {
|
||||
advice call("int bxmain()") : before ()
|
||||
{
|
||||
fail::simulator.collectCommandLineArguments(bx_startup_flags.argc, bx_startup_flags.argv);
|
||||
fail::simulator.startup();
|
||||
fail::simulator.startup(bx_startup_flags.argc, bx_startup_flags.argv);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@ void Gem5Controller::startup()
|
||||
addCPU(cpu);
|
||||
}
|
||||
|
||||
// TODO pass on command-line parameters
|
||||
SimulatorController::startup();
|
||||
}
|
||||
|
||||
@ -29,6 +30,7 @@ Gem5Controller::~Gem5Controller()
|
||||
delete *it;
|
||||
it = m_CPUs.erase(it);
|
||||
}
|
||||
delete m_Mem;
|
||||
}
|
||||
|
||||
bool Gem5Controller::save(const std::string &path)
|
||||
|
||||
@ -14,6 +14,7 @@ aspect FailOVPInit {
|
||||
{
|
||||
std::cout << "OVP init aspect!" << std::endl;
|
||||
// TODO: Log-Level?
|
||||
// TODO pass on command-line parameters
|
||||
fail::simulator.startup();
|
||||
}
|
||||
};
|
||||
|
||||
@ -14,6 +14,7 @@ void fail_init(struct CPUX86State *env)
|
||||
{
|
||||
std::cout << "FailQEMU v" FAIL_VERSION << std::endl;
|
||||
fail::simulator.setCPUEnv(env);
|
||||
// TODO pass on command-line parameters
|
||||
fail::simulator.startup();
|
||||
}
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ void T32Controller::startup(){
|
||||
// Do some T32-specific startup
|
||||
addCPU(new ConcreteCPU(0));
|
||||
// Startup generic SimulatorController
|
||||
// TODO pass on command-line parameters
|
||||
SimulatorController::startup();
|
||||
}
|
||||
|
||||
|
||||
@ -23,6 +23,46 @@ public:
|
||||
* @return the current (E)FLAGS processor register content
|
||||
*/
|
||||
virtual regdata_t getFlagsRegister() const = 0;
|
||||
|
||||
/**
|
||||
* Returns \c true if the corresponding flag is set, or \c false
|
||||
* otherwise.
|
||||
*/
|
||||
virtual bool getCarryFlag() const = 0;
|
||||
virtual bool getParityFlag() const = 0;
|
||||
virtual bool getZeroFlag() const = 0;
|
||||
virtual bool getSignFlag() const = 0;
|
||||
virtual bool getOverflowFlag() const = 0;
|
||||
virtual bool getTrapFlag() const = 0;
|
||||
virtual bool getInterruptFlag() const = 0;
|
||||
virtual bool getDirectionFlag() const = 0;
|
||||
virtual unsigned getIOPrivilegeLevel() const = 0;
|
||||
virtual bool getNestedTaskFlag() const = 0;
|
||||
virtual bool getResumeFlag() const = 0;
|
||||
virtual bool getVMFlag() const = 0;
|
||||
virtual bool getAlignmentCheckFlag() const = 0;
|
||||
virtual bool getVInterruptFlag() const = 0;
|
||||
virtual bool getVInterruptPendingFlag() const = 0;
|
||||
virtual bool getIdentificationFlag() const = 0;
|
||||
/**
|
||||
* Sets/resets various status FLAGS.
|
||||
*/
|
||||
virtual void setCarryFlag(bool bit) = 0;
|
||||
virtual void setParityFlag(bool bit) = 0;
|
||||
virtual void setZeroFlag(bool bit) = 0;
|
||||
virtual void setSignFlag(bool bit) = 0;
|
||||
virtual void setOverflowFlag(bool bit) = 0;
|
||||
virtual void setTrapFlag(bool bit) = 0;
|
||||
virtual void setInterruptFlag(bool bit) = 0;
|
||||
virtual void setDirectionFlag(bool bit) = 0;
|
||||
virtual void setIOPrivilegeLevel(unsigned lvl) = 0;
|
||||
virtual void setNestedTaskFlag(bool bit) = 0;
|
||||
virtual void setResumeFlag(bool bit) = 0;
|
||||
virtual void setVMFlag(bool bit) = 0;
|
||||
virtual void setAlignmentCheckFlag(bool bit) = 0;
|
||||
virtual void setVInterruptFlag(bool bit) = 0;
|
||||
virtual void setVInterruptPendingFlag(bool bit) = 0;
|
||||
virtual void setIdentificationFlag(bool bit) = 0;
|
||||
};
|
||||
|
||||
} // end-of-namespace: fail
|
||||
|
||||
Reference in New Issue
Block a user