aboutsummaryrefslogtreecommitdiff
path: root/target/xtensa/cpu.h
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2013-02-17 16:38:09 +0400
committerMax Filippov <jcmvbkbc@gmail.com>2017-01-15 13:01:55 -0800
commit17ab14acd488289d2f85ad6212b212c21f050b3d (patch)
treea7d97ebfe90da6e529dcebc5099aea32d728ab51 /target/xtensa/cpu.h
parenta470b33259bf82ef2336bfcd5d07640562d3f63b (diff)
target/xtensa: add static vectors selection
Xtensa cores may have two distinct addresses for the static vectors group. Provide a function to select one of them. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'target/xtensa/cpu.h')
-rw-r--r--target/xtensa/cpu.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h
index 7fe82a37af..6b044d32f6 100644
--- a/target/xtensa/cpu.h
+++ b/target/xtensa/cpu.h
@@ -209,7 +209,8 @@ enum {
enum {
/* Static vectors */
- EXC_RESET,
+ EXC_RESET0,
+ EXC_RESET1,
EXC_MEMORY_ERROR,
/* Dynamic vectors */
@@ -373,6 +374,7 @@ typedef struct CPUXtensaState {
int64_t halt_clock;
int exception_taken;
+ unsigned static_vectors;
/* Watchpoints for DBREAK registers */
struct CPUWatchpoint *cpu_watchpoint[MAX_NDBREAK];
@@ -461,6 +463,12 @@ void reset_mmu(CPUXtensaState *env);
void dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUXtensaState *env);
void debug_exception_env(CPUXtensaState *new_env, uint32_t cause);
+static inline void xtensa_select_static_vectors(CPUXtensaState *env,
+ unsigned n)
+{
+ assert(n < 2);
+ env->static_vectors = n;
+}
#define XTENSA_OPTION_BIT(opt) (((uint64_t)1) << (opt))
#define XTENSA_OPTION_ALL (~(uint64_t)0)