diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-17 23:50:23 -0800 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-17 23:50:23 -0800 |
commit | ec93209f51afc09e273a4742dc0b5f2cefc15e76 (patch) | |
tree | 6bf54fc3fd13c57abca9db8424a52155be95f848 /src/target/armv7a.c | |
parent | d6c8945662e6027f6ba12d73bac2473088672db5 (diff) |
ARM: add arm_mode_name()
Add and use arm_mode_name() to map from PSR bits to user
meaningful names. It uses a new table which, later, can
be used to hold other mode-coupled data.
Add definitions for the "Secure Monitor" mode, as seen on
some ARM11 cores (like ARM1176) and on Cortex-A8. The
previous mode name scheme didn't understand that mode.
Remove the old mechanism ... there were two copies, caused
by Cortex-A8 needing to add "Secure Monitor" mode support.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target/armv7a.c')
-rw-r--r-- | src/target/armv7a.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/target/armv7a.c b/src/target/armv7a.c index 1518674a..e13b33b4 100644 --- a/src/target/armv7a.c +++ b/src/target/armv7a.c @@ -47,15 +47,6 @@ char* armv7a_core_reg_list[] = "r13_mon", "lr_mon", "spsr_mon" }; -char * armv7a_mode_strings_list[] = -{ - "Illegal mode value", "User", "FIQ", "IRQ", - "Supervisor", "Abort", "Undefined", "System", "Monitor" -}; - -/* Hack! Yuk! allow -1 index, which simplifies codepaths elsewhere in the code */ -char** armv7a_mode_strings = armv7a_mode_strings_list+1; - char* armv7a_state_strings[] = { "ARM", "Thumb", "Jazelle", "ThumbEE" @@ -183,8 +174,7 @@ int armv7a_arch_state(struct target *target) armv7a_state_strings[armv7a->core_state], Jim_Nvp_value2name_simple(nvp_target_debug_reason, target->debug_reason)->name, - armv7a_mode_strings[ - armv7a_mode_to_number(armv4_5->core_mode)], + arm_mode_name(armv4_5->core_mode), armv7a_core_reg_list[armv7a_core_reg_map[ armv7a_mode_to_number(armv4_5->core_mode)][16]], buf_get_u32(ARMV7A_CORE_REG_MODE(armv4_5->core_cache, |