summaryrefslogtreecommitdiffstats
path: root/target-arm/exec.h
diff options
context:
space:
mode:
Diffstat (limited to 'target-arm/exec.h')
-rw-r--r--target-arm/exec.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/target-arm/exec.h b/target-arm/exec.h
index d99dfa5..b25c7e2 100644
--- a/target-arm/exec.h
+++ b/target-arm/exec.h
@@ -48,6 +48,20 @@ static inline void regs_to_env(void)
int cpu_arm_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
int is_user, int is_softmmu);
+static inline int cpu_halted(CPUState *env) {
+ if (!env->halted)
+ return 0;
+ /* An interrupt wakes the CPU even if the I and F CPSR bits are
+ set. We use EXITTB to silently wake CPU without causing an
+ actual interrupt. */
+ if (env->interrupt_request &
+ (CPU_INTERRUPT_FIQ | CPU_INTERRUPT_HARD | CPU_INTERRUPT_EXITTB)) {
+ env->halted = 0;
+ return 0;
+ }
+ return EXCP_HALTED;
+}
+
#if !defined(CONFIG_USER_ONLY)
#include "softmmu_exec.h"
#endif
OpenPOWER on IntegriCloud