From e24099d4a804fc539d4141e7372fcfc4f6834280 Mon Sep 17 00:00:00 2001 From: hsc Date: Tue, 11 Sep 2012 17:10:04 +0000 Subject: [PATCH] Bochs aspects: check for BUILD_BOCHS everywhere git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1610 8c4709b5-6ec9-48aa-a5cd-a96041d1645a --- src/core/sal/bochs/BochsNoAbort.ah | 4 ++-- src/core/sal/bochs/BochsNonVerbose.ah | 4 ++-- src/core/sal/bochs/Breakpoints.ah | 5 +---- src/core/sal/bochs/Credits.ah | 5 +++++ src/core/sal/bochs/DisableKeyboardInterrupt.ah | 4 ++-- src/core/sal/bochs/DisableLogFunctions.ah | 5 +++++ src/core/sal/bochs/FailBochsInit.ah | 5 +++++ src/core/sal/bochs/FireInterrupt.ah | 4 ++-- src/core/sal/bochs/GuestSysCom.ah | 4 ++-- src/core/sal/bochs/IOPortCom.ah | 4 ++-- src/core/sal/bochs/Interrupt.ah | 4 ++-- src/core/sal/bochs/InterruptSuppression.ah | 4 ++-- src/core/sal/bochs/Jump.ah | 5 ++--- src/core/sal/bochs/MemAccess.ah | 4 +++- src/core/sal/bochs/Reboot.ah | 4 ++-- src/core/sal/bochs/RestoreState.ah | 5 +---- src/core/sal/bochs/SaveState.ah | 5 +---- src/core/sal/bochs/Trap.ah | 4 ++-- 18 files changed, 43 insertions(+), 36 deletions(-) diff --git a/src/core/sal/bochs/BochsNoAbort.ah b/src/core/sal/bochs/BochsNoAbort.ah index 350ac241..2f719377 100644 --- a/src/core/sal/bochs/BochsNoAbort.ah +++ b/src/core/sal/bochs/BochsNoAbort.ah @@ -1,9 +1,10 @@ #ifndef __BOCHS_NO_ABORT_AH__ #define __BOCHS_NO_ABORT_AH__ +#include "config/VariantConfig.hpp" #include "config/FailConfig.hpp" -#ifdef CONFIG_BOCHS_NO_ABORT +#if defined(BUILD_BOCHS) && defined(CONFIG_BOCHS_NO_ABORT) #include "bochs.h" @@ -37,5 +38,4 @@ aspect BochsNoAbort { }; #endif // CONFIG_BOCHS_NO_ABORT - #endif // __BOCHS_NO_ABORT_AH__ diff --git a/src/core/sal/bochs/BochsNonVerbose.ah b/src/core/sal/bochs/BochsNonVerbose.ah index c9c94f45..a978f6e7 100644 --- a/src/core/sal/bochs/BochsNonVerbose.ah +++ b/src/core/sal/bochs/BochsNonVerbose.ah @@ -1,9 +1,10 @@ #ifndef __BOCHS_NON_VERBOSE_AH__ #define __BOCHS_NON_VERBOSE_AH__ +#include "config/VariantConfig.hpp" #include "config/FailConfig.hpp" -#ifdef CONFIG_BOCHS_NON_VERBOSE +#if defined(BUILD_BOCHS) && defined(CONFIG_BOCHS_NON_VERBOSE) #include "bochs.h" @@ -57,5 +58,4 @@ aspect BochsNonVerbose { }; #endif // CONFIG_BOCHS_NON_VERBOSE - #endif // __BOCHS_NON_VERBOSE_AH__ diff --git a/src/core/sal/bochs/Breakpoints.ah b/src/core/sal/bochs/Breakpoints.ah index 3e0d16ab..5c31324b 100644 --- a/src/core/sal/bochs/Breakpoints.ah +++ b/src/core/sal/bochs/Breakpoints.ah @@ -4,8 +4,7 @@ #include "config/VariantConfig.hpp" #include "config/FailConfig.hpp" -#ifdef BUILD_BOCHS -#ifdef CONFIG_EVENT_BREAKPOINTS +#if defined(BUILD_BOCHS) && defined(CONFIG_EVENT_BREAKPOINTS) #include "bochs.h" #include "cpu/cpu.h" @@ -31,6 +30,4 @@ aspect Breakpoints { }; #endif // CONFIG_EVENT_BREAKPOINTS -#endif // BUILD_BOCHS - #endif // __BREAKPOINTS_AH__ diff --git a/src/core/sal/bochs/Credits.ah b/src/core/sal/bochs/Credits.ah index f72fefc4..4ace04ab 100644 --- a/src/core/sal/bochs/Credits.ah +++ b/src/core/sal/bochs/Credits.ah @@ -1,6 +1,10 @@ #ifndef __CREDITS_AH__ #define __CREDITS_AH__ +#include "config/VariantConfig.hpp" + +#ifdef BUILD_BOCHS + #include #include @@ -26,4 +30,5 @@ aspect Credits { } }; +#endif // BUILD_BOCHS #endif // __CREDITS_AH__ diff --git a/src/core/sal/bochs/DisableKeyboardInterrupt.ah b/src/core/sal/bochs/DisableKeyboardInterrupt.ah index 4dffe212..b7010193 100644 --- a/src/core/sal/bochs/DisableKeyboardInterrupt.ah +++ b/src/core/sal/bochs/DisableKeyboardInterrupt.ah @@ -1,9 +1,10 @@ #ifndef __DISABLE_KEYBOARD_INTERRUPT_AH__ #define __DISABLE_KEYBOARD_INTERRUPT_AH__ +#include "config/VariantConfig.hpp" #include "config/FailConfig.hpp" -#ifdef CONFIG_DISABLE_KEYB_INTERRUPTS +#if defined(BUILD_BOCHS) && defined(CONFIG_DISABLE_KEYB_INTERRUPTS) #include "iodev/iodev.h" #include "iodev/keyboard.h" @@ -22,5 +23,4 @@ aspect DisableKeyboardInterrupt { }; #endif // CONFIG_DISABLE_KEYB_INTERRUPTS - #endif // __DISABLE_KEYBOARD_INTERRUPT_AH__ diff --git a/src/core/sal/bochs/DisableLogFunctions.ah b/src/core/sal/bochs/DisableLogFunctions.ah index 278c92be..190e32b9 100644 --- a/src/core/sal/bochs/DisableLogFunctions.ah +++ b/src/core/sal/bochs/DisableLogFunctions.ah @@ -1,6 +1,10 @@ #ifndef __DISABLE_ADD_REMOVE_LOGFN_AH__ #define __DISABLE_ADD_REMOVE_LOGFN_AH__ +#include "config/VariantConfig.hpp" + +#ifdef BUILD_BOCHS + /* Hack to prevent Bochs' logfunctions list (bochs.h) to overflow if the * experiment restores simulator state more than ~1000 times. * @@ -16,4 +20,5 @@ aspect DisableLogFunctions { advice execution (add_remove_logfn()) : around () { } }; +#endif // BUILD_BOCHS #endif // __DISABLE_ADD_REMOVE_LOGFN_AH__ diff --git a/src/core/sal/bochs/FailBochsInit.ah b/src/core/sal/bochs/FailBochsInit.ah index 464e4ed6..42b9fcac 100644 --- a/src/core/sal/bochs/FailBochsInit.ah +++ b/src/core/sal/bochs/FailBochsInit.ah @@ -1,6 +1,10 @@ #ifndef __FAIL_BOCHS_INIT_AH__ #define __FAIL_BOCHS_INIT_AH__ +#include "config/VariantConfig.hpp" + +#ifdef BUILD_BOCHS + #include "../SALInst.hpp" aspect FailBochsInit { @@ -10,4 +14,5 @@ aspect FailBochsInit { } }; +#endif #endif // __FAIL_BOCHS_INIT_AH__ diff --git a/src/core/sal/bochs/FireInterrupt.ah b/src/core/sal/bochs/FireInterrupt.ah index 8042b3b4..de31e871 100644 --- a/src/core/sal/bochs/FireInterrupt.ah +++ b/src/core/sal/bochs/FireInterrupt.ah @@ -1,9 +1,10 @@ #ifndef __FIREINTERRUPT_AH__ #define __FIREINTERRUPT_AH__ +#include "config/VariantConfig.hpp" #include "config/FailConfig.hpp" -#ifdef CONFIG_FIRE_INTERRUPTS +#if defined(BUILD_BOCHS) && defined(CONFIG_FIRE_INTERRUPTS) #include "bochs.h" #include "cpu/cpu.h" @@ -41,5 +42,4 @@ aspect InterruptDone { }; #endif // CONFIG_FIRE_INTERRUPTS - #endif // __FIREINTERRUPT_AH__ diff --git a/src/core/sal/bochs/GuestSysCom.ah b/src/core/sal/bochs/GuestSysCom.ah index 06ac10bb..5cf412be 100644 --- a/src/core/sal/bochs/GuestSysCom.ah +++ b/src/core/sal/bochs/GuestSysCom.ah @@ -1,9 +1,10 @@ #ifndef __GUEST_SYS_COM_AH__ #define __GUEST_SYS_COM_AH__ +#include "config/VariantConfig.hpp" #include "config/FailConfig.hpp" -#ifdef CONFIG_EVENT_GUESTSYS +#if defined(BUILD_BOCHS) && defined(CONFIG_EVENT_GUESTSYS) #include "bochs.h" #include "cpu/cpu.h" @@ -29,5 +30,4 @@ aspect GuestSysCom { }; #endif // CONFIG_EVENT_GUESTSYS - #endif // __GUEST_SYS_COM_AH__ diff --git a/src/core/sal/bochs/IOPortCom.ah b/src/core/sal/bochs/IOPortCom.ah index 5ad617ce..18fa3722 100644 --- a/src/core/sal/bochs/IOPortCom.ah +++ b/src/core/sal/bochs/IOPortCom.ah @@ -1,9 +1,10 @@ #ifndef __IOPORT_COM_AH__ #define __IOPORT_COM_AH__ +#include "config/VariantConfig.hpp" #include "config/FailConfig.hpp" -#ifdef CONFIG_EVENT_IOPORT +#if defined(BUILD_BOCHS) && defined(CONFIG_EVENT_IOPORT) #include "bochs.h" #include "cpu/cpu.h" @@ -35,5 +36,4 @@ aspect IOPortCom { }; #endif // CONFIG_EVENT_IOPORT - #endif // __IOPORT_COM_AH__ diff --git a/src/core/sal/bochs/Interrupt.ah b/src/core/sal/bochs/Interrupt.ah index 63d858de..d926ffc8 100644 --- a/src/core/sal/bochs/Interrupt.ah +++ b/src/core/sal/bochs/Interrupt.ah @@ -1,9 +1,10 @@ #ifndef __INTERRUPT_AH__ #define __INTERRUPT_AH__ +#include "config/VariantConfig.hpp" #include "config/FailConfig.hpp" -#ifdef CONFIG_EVENT_INTERRUPT +#if defined(BUILD_BOCHS) && defined(CONFIG_EVENT_INTERRUPT) #include "bochs.h" #include "cpu/cpu.h" @@ -35,5 +36,4 @@ aspect Interrupt { }; #endif // CONFIG_EVENT_INTERRUPT - #endif // __INTERRUPT_AH__ diff --git a/src/core/sal/bochs/InterruptSuppression.ah b/src/core/sal/bochs/InterruptSuppression.ah index 2d577120..9500debf 100644 --- a/src/core/sal/bochs/InterruptSuppression.ah +++ b/src/core/sal/bochs/InterruptSuppression.ah @@ -1,9 +1,10 @@ #ifndef __INTERRUPT_SUPPRESSION_AH__ #define __INTERRUPT_SUPPRESSION_AH__ +#include "config/VariantConfig.hpp" #include "config/FailConfig.hpp" -#ifdef CONFIG_SUPPRESS_INTERRUPTS +#if defined(BUILD_BOCHS) && defined(CONFIG_SUPPRESS_INTERRUPTS) #include "bochs.h" #include "cpu/cpu.h" @@ -23,5 +24,4 @@ aspect InterruptSuppression { }; #endif // CONFIG_SUPPRESS_INTERRUPTS - #endif // __INTERRUPT_SUPPRESSION_AH__ diff --git a/src/core/sal/bochs/Jump.ah b/src/core/sal/bochs/Jump.ah index f7f8e38e..bf2920d0 100644 --- a/src/core/sal/bochs/Jump.ah +++ b/src/core/sal/bochs/Jump.ah @@ -1,9 +1,10 @@ #ifndef __JUMP_AH__ #define __JUMP_AH__ +#include "config/VariantConfig.hpp" #include "config/FailConfig.hpp" -#ifdef CONFIG_EVENT_JUMP +#if defined(BUILD_BOCHS) && defined(CONFIG_EVENT_JUMP) #include #include @@ -135,6 +136,4 @@ aspect Jump { }; #endif // CONFIG_EVENT_JUMP - #endif // __JUMP_AH__ - diff --git a/src/core/sal/bochs/MemAccess.ah b/src/core/sal/bochs/MemAccess.ah index be5c6e2c..06917d6f 100644 --- a/src/core/sal/bochs/MemAccess.ah +++ b/src/core/sal/bochs/MemAccess.ah @@ -1,8 +1,10 @@ #ifndef __MEM_ACCESS_AH__ #define __MEM_ACCESS_AH__ +#include "config/VariantConfig.hpp" #include "config/FailConfig.hpp" +#ifdef BUILD_BOCHS #if defined(CONFIG_EVENT_MEMREAD) || defined(CONFIG_EVENT_MEMWRITE) #include @@ -156,5 +158,5 @@ aspect MemAccess { }; #endif // CONFIG_EVENT_MEMACCESS - +#endif // BUILD_BOCHS #endif // __MEM_ACCESS_AH__ diff --git a/src/core/sal/bochs/Reboot.ah b/src/core/sal/bochs/Reboot.ah index 13236dc9..d530f067 100644 --- a/src/core/sal/bochs/Reboot.ah +++ b/src/core/sal/bochs/Reboot.ah @@ -1,9 +1,10 @@ #ifndef __REBOOT_AH__ #define __REBOOT_AH__ +#include "config/VariantConfig.hpp" #include "config/FailConfig.hpp" -#ifdef CONFIG_SR_REBOOT +#if defined(BUILD_BOCHS) && defined(CONFIG_SR_REBOOT) #include "bochs.h" #include "../SALInst.hpp" @@ -25,5 +26,4 @@ aspect Reboot { }; #endif // CONFIG_SR_REBOOT - #endif // __REBOOT_AH__ diff --git a/src/core/sal/bochs/RestoreState.ah b/src/core/sal/bochs/RestoreState.ah index 2d1ad07e..9c9001f6 100644 --- a/src/core/sal/bochs/RestoreState.ah +++ b/src/core/sal/bochs/RestoreState.ah @@ -4,8 +4,7 @@ #include "config/VariantConfig.hpp" #include "config/FailConfig.hpp" -#ifdef BUILD_BOCHS -#ifdef CONFIG_SR_RESTORE +#if defined(BUILD_BOCHS) && defined(CONFIG_SR_RESTORE) #include @@ -25,6 +24,4 @@ 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 5fbf26b8..f0f11699 100644 --- a/src/core/sal/bochs/SaveState.ah +++ b/src/core/sal/bochs/SaveState.ah @@ -4,8 +4,7 @@ #include "config/VariantConfig.hpp" #include "config/FailConfig.hpp" -#ifdef BUILD_BOCHS -#ifdef CONFIG_SR_SAVE +#if defined(BUILD_BOCHS) && defined(CONFIG_SR_SAVE) #include "bochs.h" @@ -31,6 +30,4 @@ aspect SaveState { }; #endif // CONFIG_SR_SAVE -#endif // BUILD_BOCHS - #endif // _SAVE_STATE_AH__ diff --git a/src/core/sal/bochs/Trap.ah b/src/core/sal/bochs/Trap.ah index 2a210dcf..df427dea 100644 --- a/src/core/sal/bochs/Trap.ah +++ b/src/core/sal/bochs/Trap.ah @@ -1,9 +1,10 @@ #ifndef __TRAP_AH__ #define __TRAP_AH__ +#include "config/VariantConfig.hpp" #include "config/FailConfig.hpp" -#ifdef CONFIG_EVENT_TRAP +#if defined(BUILD_BOCHS) && defined(CONFIG_EVENT_TRAP) #include "bochs.h" #include "cpu/cpu.h" @@ -22,5 +23,4 @@ aspect Trap { }; #endif // CONFIG_EVENT_TRAP - #endif // __TRAP_AH__