From ca17c793e7dd411c2de7a4b01d41b841275858d4 Mon Sep 17 00:00:00 2001 From: friemel Date: Wed, 22 Aug 2012 14:20:26 +0000 Subject: [PATCH] Fail* now builds with hsc-simple as experiment for gem5. git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1503 8c4709b5-6ec9-48aa-a5cd-a96041d1645a --- CMakeLists.txt | 1 - src/core/sal/bochs/Breakpoints.ah | 2 ++ src/core/sal/bochs/RestoreState.ah | 2 ++ src/core/sal/bochs/SaveState.ah | 2 ++ src/core/sal/gem5/Gem5Config.hpp | 4 ++-- src/core/sal/gem5/SConscript | 3 +-- src/experiments/hsc-simple/experiment.cc | 2 +- 7 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d6aad65a..e145d1eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,6 @@ if(BUILD_BOCHS) include_directories(simulators/bochs/instrument/stubs simulators/bochs) elseif(BUILD_GEM5) include_directories(simulators/gem5/src simulators/gem5/build/ARM) - add_definitions(-std=c++0x) elseif(BUILD_OVP) add_subdirectory(simulators/ovp) endif(BUILD_BOCHS) diff --git a/src/core/sal/bochs/Breakpoints.ah b/src/core/sal/bochs/Breakpoints.ah index 125a703c..16e23e07 100644 --- a/src/core/sal/bochs/Breakpoints.ah +++ b/src/core/sal/bochs/Breakpoints.ah @@ -3,6 +3,7 @@ #include "config/FailConfig.hpp" +#ifdef BUILD_BOCHS #ifdef CONFIG_EVENT_BREAKPOINTS #include "bochs.h" @@ -28,5 +29,6 @@ aspect Breakpoints { }; #endif // CONFIG_EVENT_BREAKPOINTS +#endif // BUILD_BOCHS #endif // __BREAKPOINTS_AH__ diff --git a/src/core/sal/bochs/RestoreState.ah b/src/core/sal/bochs/RestoreState.ah index 6014e29f..f31187f8 100644 --- a/src/core/sal/bochs/RestoreState.ah +++ b/src/core/sal/bochs/RestoreState.ah @@ -3,6 +3,7 @@ #include "config/FailConfig.hpp" +#ifdef BUILD_BOCHS #ifdef CONFIG_SR_RESTORE #include @@ -23,5 +24,6 @@ aspect RestoreState { }; #endif // CONFIG_SR_RESTORE +#endif // BUILD_BOCHS #endif // __RESTORE_STATE_AH__ diff --git a/src/core/sal/bochs/SaveState.ah b/src/core/sal/bochs/SaveState.ah index b7856d80..3e9dbbbb 100644 --- a/src/core/sal/bochs/SaveState.ah +++ b/src/core/sal/bochs/SaveState.ah @@ -3,6 +3,7 @@ #include "config/FailConfig.hpp" +#ifdef BUILD_BOCHS #ifdef CONFIG_SR_SAVE #include "bochs.h" @@ -29,5 +30,6 @@ aspect SaveState { }; #endif // CONFIG_SR_SAVE +#endif // BUILD_BOCHS #endif // _SAVE_STATE_AH__ diff --git a/src/core/sal/gem5/Gem5Config.hpp b/src/core/sal/gem5/Gem5Config.hpp index 81abb055..3ff56f2a 100644 --- a/src/core/sal/gem5/Gem5Config.hpp +++ b/src/core/sal/gem5/Gem5Config.hpp @@ -7,14 +7,14 @@ #define __GEM5_CONFIG_HPP__ #include "base/types.hh" -#include "arch/arm/registers.hh" +//#include "arch/arm/registers.hh" namespace fail { typedef Addr guest_address_t; //!< the guest memory address type // TODO: Set Host Address Type typedef void* host_address_t; //!< the host memory address type -typedef ArmISA::AnyReg register_data_t; //!< register data type (32 bit) +typedef uint64_t register_data_t; //!< register data type (gem5 always uses 64 bit for registers) typedef int timer_t; //!< type of timer IDs } // end-of-namespace: fail diff --git a/src/core/sal/gem5/SConscript b/src/core/sal/gem5/SConscript index b262dc69..9d32dddb 100644 --- a/src/core/sal/gem5/SConscript +++ b/src/core/sal/gem5/SConscript @@ -7,8 +7,7 @@ env.Append(CPPPATH=Dir('../../../../../src/core/')) env.Append(CPPPATH=Dir('../../../../../build/src/core/')) env.Append(LIBPATH=Dir('../../../../../build/lib/')) -#env.Append(LIBS=['fail', 'sal', 'comm', 'cpn', 'efw', 'util', 'pthread']) -env.Append(LIBS=['fail']) +env.Append(LIBS=['sal', 'comm', 'cpn', 'efw', 'util', 'pcl', 'hsc-simple']) SimObject('FailGem5Device.py') diff --git a/src/experiments/hsc-simple/experiment.cc b/src/experiments/hsc-simple/experiment.cc index 5957e5b2..4b28ef30 100644 --- a/src/experiments/hsc-simple/experiment.cc +++ b/src/experiments/hsc-simple/experiment.cc @@ -3,7 +3,7 @@ #include "experiment.hpp" #include "sal/SALInst.hpp" -#include "sal/bochs/BochsRegister.hpp" +//#include "sal/bochs/BochsRegister.hpp" #include "sal/Listener.hpp" #include "util/Logger.hpp" #include "config/FailConfig.hpp"