first steps towards a QEMU target backend

- This commit only enables linking against QEMU.  The abstraction layer is
  completely dysfunctional at this time.
- QEMU's build system needs to be patched in order to create a static
  library.  This patch is currently not included in the Fail* repository.
- QEMU's JIT compilation may complicate or even preclude the implementation
  of some of Fail*'s backend abstractions.  Only a minimal subset (serial
  I/O, memory, memory writes, save/restore) is planned for the first phase.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1615 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hsc
2012-09-12 14:07:03 +00:00
parent f9c96ddf2d
commit e715149033
16 changed files with 395 additions and 22 deletions

View File

@ -0,0 +1,59 @@
#ifndef __QEMU_CONTROLLER_HPP__
#define __QEMU_CONTROLLER_HPP__
#include <string>
#include <cassert>
#include <iostream>
#include <iomanip>
#include <string.h>
#include "../SimulatorController.hpp"
#include "../Listener.hpp"
namespace fail {
class ExperimentFlow;
/**
* \class QEMUController
* Very rudimentary, QEMU-specific implementation of a SimulatorController.
*/
class QEMUController : public SimulatorController {
private:
public:
// Initialize the controller.
QEMUController();
~QEMUController();
/**
* I/O port communication handler. This method is called from QEMU. TODO.
* @param data the data transmitted
* @param port the port it was transmitted on
* @param out true if the I/O traffic has been outbound, false otherwise
*/
void onIOPort(unsigned char data, unsigned port, bool out) {}
/**
* Static internal handler for TimerListeners. TODO.
*/
static void onTimerTrigger(void *thisPtr) {}
/* ********************************************************************
* Simulator Controller & Access API:
* ********************************************************************/
/**
* Save simulator state. TODO.
* @param path Location to store state information
*/
void save(const std::string& path) {}
/**
* Restore simulator state. Clears all Listeners. TODO.
* @param path Location to previously saved state information
*/
void restore(const std::string& path) {}
/**
* Reboot simulator. Clears all Listeners. TODO.
*/
void reboot() {}
};
} // end-of-namespace: fail
#endif // __QEMU_CONTROLLER_HPP__