FIXMEs and comments updated due to last architecture-related changes
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@2005 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -2,9 +2,6 @@
|
||||
|
||||
namespace fail {
|
||||
|
||||
// FIXME: Bochs specific? If not, at least get rid of this global variable.
|
||||
int interrupt_to_fire = -1;
|
||||
|
||||
void CPUArchitecture::addRegister(Register* reg)
|
||||
{
|
||||
assert(!reg->isAssigned() && "FATAL ERROR: The register is already assigned!");
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
|
||||
namespace fail {
|
||||
|
||||
// FIXME: Bochs specific? If not, at least get rid of this global variable.
|
||||
int interrupt_to_fire = -1;
|
||||
|
||||
bool CPUState::isSuppressedInterrupt(unsigned interruptNum)
|
||||
@ -11,12 +10,14 @@ bool CPUState::isSuppressedInterrupt(unsigned interruptNum)
|
||||
if ((m_SuppressedInterrupts[i] == interruptNum ||
|
||||
m_SuppressedInterrupts[i] == ANY_INTERRUPT) &&
|
||||
interruptNum != (unsigned)interrupt_to_fire + 32) {
|
||||
// FIXME: This should be dead code...(?)
|
||||
if ((int)interruptNum == interrupt_to_fire + 32) {
|
||||
interrupt_to_fire = -1;
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// FIXME: This is simulator-(x86)-specific stuff... (?)
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -25,7 +26,9 @@ bool CPUState::addSuppressedInterrupt(unsigned interruptNum)
|
||||
// Check if already existing:
|
||||
if (isSuppressedInterrupt(interruptNum+32))
|
||||
return false; // already added: nothing to do here
|
||||
|
||||
|
||||
// FIXME: addSuppressedInterrupt(ANY_INTERRUPT) can still be called more
|
||||
// than once. This is not handled by the if-statement above.
|
||||
if (interruptNum == ANY_INTERRUPT)
|
||||
m_SuppressedInterrupts.push_back(interruptNum);
|
||||
else
|
||||
|
||||
@ -19,10 +19,11 @@ namespace fail {
|
||||
* about an event reported by the simulator backend.
|
||||
*/
|
||||
class BaseEvent {
|
||||
protected:
|
||||
ConcreteCPU* m_CPU; //!< the CPU object that triggered the event
|
||||
public:
|
||||
BaseEvent(ConcreteCPU* cpu = NULL) : m_CPU(cpu) { }
|
||||
virtual ~BaseEvent() { }
|
||||
|
||||
/**
|
||||
* Returns a pointer to the CPU that triggered this event.
|
||||
* @return triggering CPU
|
||||
@ -33,8 +34,6 @@ public:
|
||||
* @param cpu new CPU which caused this event
|
||||
*/
|
||||
void setTriggerCPU(ConcreteCPU* cpu) { m_CPU = cpu; }
|
||||
protected:
|
||||
ConcreteCPU* m_CPU;
|
||||
};
|
||||
// ----------------------------------------------------------------------------
|
||||
// Specialized events:
|
||||
@ -54,6 +53,7 @@ public:
|
||||
* the subclasses.
|
||||
* @param trigger the triggering address of the breakpoint event
|
||||
* @param address_space the address space identifier for this event
|
||||
* @param cpu the Fail* CPU object that triggered the breakpoint
|
||||
*/
|
||||
BPEvent(address_t trigger, address_t address_space, ConcreteCPU* cpu = NULL)
|
||||
: BaseEvent(cpu), m_TriggerInstrPtr(trigger), m_AddressSpace(address_space) { }
|
||||
@ -114,7 +114,7 @@ public:
|
||||
* @param width width of memory access (= # Bytes)
|
||||
* @param triggerIP the instruction pointer that actually triggered the memory access
|
||||
* @param type the type of memory access (r, w, rw)
|
||||
* @param cpu the cpu that triggered the event
|
||||
* @param cpu the CPU that triggered the event
|
||||
*/
|
||||
MemAccessEvent(address_t triggerAddr, size_t width, address_t triggerIP, access_type_t type,
|
||||
ConcreteCPU* cpu = NULL)
|
||||
@ -221,7 +221,7 @@ public:
|
||||
* @param nmi the new NMI (non maskable interrupt) flag state
|
||||
* @param triggerNum system and type specific number identifying the requestet
|
||||
* "trouble-type"
|
||||
* @param cpu the cpu that triggered the event
|
||||
* @param cpu the CPU that triggered the event
|
||||
*/
|
||||
InterruptEvent(bool nmi, int triggerNum, ConcreteCPU* cpu = NULL)
|
||||
: TroubleEvent(triggerNum, cpu), m_IsNMI(nmi) { }
|
||||
@ -277,7 +277,7 @@ public:
|
||||
/**
|
||||
* Initialises an IOPortEvent
|
||||
* @param data the data which has been communicated through the I/O port
|
||||
* @param cpu the cpu that triggered the event
|
||||
* @param cpu the CPU that triggered the event
|
||||
*/
|
||||
IOPortEvent(unsigned char data = 0, ConcreteCPU* cpu = NULL) : BaseEvent(cpu), m_Data(data) { }
|
||||
/**
|
||||
|
||||
@ -105,6 +105,7 @@ public:
|
||||
* @param port the port used for communications
|
||||
*/
|
||||
void onGuestSystem(char data, unsigned port);
|
||||
// FIXME: ConcreteCPU* cpu is missing here...
|
||||
/**
|
||||
* (Conditional) Jump-instruction handler.
|
||||
* @param cpu the CPU that did the jump
|
||||
|
||||
Reference in New Issue
Block a user