diff --git a/CMakeLists.txt b/CMakeLists.txt index 9016c0ee..f6c250a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,7 @@ OPTION( BUILD_BOCHS "Build Bochs Variant?" ON) OPTION( BUILD_GEM5 "Build gem5 Variant?" OFF) OPTION( BUILD_QEMU "Build QEMU Variant?" OFF) OPTION( BUILD_T32 "Build Lauterbach Trace32 Variant?" OFF) +OPTION( BUILD_PANDA "Build Pandaboard ES + Flyswatter2 Variant?" OFF) OPTION( BUILD_X86 "Build for x86 guests?" ON) OPTION( BUILD_ARM "Build for ARM guests?" OFF) @@ -59,6 +60,8 @@ elseif(BUILD_T32) include_directories(debuggers/t32/include src/core) add_subdirectory(debuggers/t32) add_subdirectory(scripts/t32cmm) +elseif(BUILD_PANDA) + include_directories(debuggers/openocd/src debuggers/openocd/jimtcl src/core) endif(BUILD_BOCHS) ## Tell the linker where to find the Fail* libraries @@ -79,4 +82,5 @@ include(bochs) include(gem5) include(qemu) include(t32) +include(panda) diff --git a/src/core/comm/CMakeLists.txt b/src/core/comm/CMakeLists.txt index 8f353689..2672a757 100644 --- a/src/core/comm/CMakeLists.txt +++ b/src/core/comm/CMakeLists.txt @@ -9,6 +9,7 @@ set(PROTOS FailControlMessage.proto DatabaseCampaignMessage.proto TracePlugin.proto + HopChain.proto ) #### PROTOBUFS #### diff --git a/src/core/config/VariantConfig.hpp.in b/src/core/config/VariantConfig.hpp.in index 45f7cefe..19cffea6 100644 --- a/src/core/config/VariantConfig.hpp.in +++ b/src/core/config/VariantConfig.hpp.in @@ -5,6 +5,7 @@ #cmakedefine BUILD_GEM5 #cmakedefine BUILD_QEMU #cmakedefine BUILD_T32 +#cmakedefine BUILD_PANDA #cmakedefine T32_MOCK_API #cmakedefine BUILD_X86 diff --git a/src/core/sal/CMakeLists.txt b/src/core/sal/CMakeLists.txt index a3ee96d7..2d565940 100644 --- a/src/core/sal/CMakeLists.txt +++ b/src/core/sal/CMakeLists.txt @@ -57,6 +57,26 @@ elseif(BUILD_T32) arm/ArmDisassembler.cc ) endif(BUILD_ARM) +elseif(BUILD_PANDA) + include_directories(${PROJECT_SOURCE_DIR}/debuggers/openocd) + set(SRCS + CPU.cc + CPUState.cc + Listener.cc + ListenerManager.cc + SALConfig.cc + Register.cc + SimulatorController.cc + panda/PandaController.cc + panda/PandaArmCPU.cc + panda/PandaListener.cc + ) + if(BUILD_ARM) + set(SRCS ${SRCS} + panda/PandaArmCPU.cc + arm/ArmArchitecture.cc #why is this necessary? + ) + endif(BUILD_ARM) endif(BUILD_BOCHS) if(BUILD_X86) diff --git a/src/core/sal/ConcreteCPU.hpp b/src/core/sal/ConcreteCPU.hpp index f7d40c6d..20645a91 100644 --- a/src/core/sal/ConcreteCPU.hpp +++ b/src/core/sal/ConcreteCPU.hpp @@ -18,6 +18,9 @@ #else #error Active config currently not supported! #endif +#elif defined BUILD_PANDA + #include "panda/PandaConfig.hpp" + #include "panda/PandaArmCPU.hpp" #else #error SAL Config Target not defined #endif diff --git a/src/core/sal/SALConfig.cc b/src/core/sal/SALConfig.cc index 29354f1f..81ab92a6 100644 --- a/src/core/sal/SALConfig.cc +++ b/src/core/sal/SALConfig.cc @@ -5,7 +5,8 @@ namespace fail { // Flag initialization depends on the current selected simulator // (For now, the initialization values are all the same): #if defined BUILD_BOCHS || defined BUILD_GEM5 || \ - defined BUILD_T32 || defined BUILD_QEMU + defined BUILD_T32 || defined BUILD_QEMU || \ + defined BUILD_PANDA const address_t ADDR_INV = static_cast (0); const address_t ANY_ADDR = static_cast (-1); const unsigned ANY_INSTR = static_cast (-1); diff --git a/src/core/sal/SALConfig.hpp b/src/core/sal/SALConfig.hpp index 23ef54d9..9ca90b74 100644 --- a/src/core/sal/SALConfig.hpp +++ b/src/core/sal/SALConfig.hpp @@ -14,6 +14,8 @@ #include "qemu/QEMUConfig.hpp" #elif defined BUILD_T32 #include "t32/T32Config.hpp" +#elif defined BUILD_PANDA + #include "panda/PandaConfig.hpp" #else #error SAL Config Target not defined #endif diff --git a/src/core/sal/SALInst.hpp b/src/core/sal/SALInst.hpp index 464e663a..9bee43c5 100644 --- a/src/core/sal/SALInst.hpp +++ b/src/core/sal/SALInst.hpp @@ -36,6 +36,14 @@ namespace fail { typedef T32Controller ConcreteSimulatorController; //!< concrete simulator (type) } +#elif defined BUILD_PANDA + +#include "panda/PandaController.hpp" + +namespace fail { +typedef PandaController ConcreteSimulatorController; //!< concrete simulator (type) +} + #else #error SAL Instance not defined