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>
This commit is contained in:
Max Filippov 2013-02-17 16:38:09 +04:00
parent a470b33259
commit 17ab14acd4
3 changed files with 20 additions and 3 deletions

View file

@ -60,7 +60,7 @@ static void xtensa_cpu_reset(CPUState *s)
xcc->parent_reset(s);
env->exception_taken = 0;
env->pc = env->config->exception_vector[EXC_RESET];
env->pc = env->config->exception_vector[EXC_RESET0 + env->static_vectors];
env->sregs[LITBASE] &= ~1;
env->sregs[PS] = xtensa_option_enabled(env->config,
XTENSA_OPTION_INTERRUPT) ? 0x1f : 0x10;