armv8m: Add support for msplim/psplim for targets with no secext
When armv8m does not have security extension, it still has msplim/psplim regs implemented, which is described in Cortex-M33 Devices Generic User Guide. Document ID: 100235_0100_06_en, or at the link: https://developer.arm.com/documentation/100235/latest/ Tested on cyw20829 along with gdb v14.2.1 Change-Id: I4f060e4df742c6773e79ce0481697361202d544c Signed-off-by: kryvosheiaivan <Ivan.Kryvosheia@infineon.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8887 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
a482b78941
commit
1ee0499cd8
@@ -139,6 +139,9 @@ static const struct {
|
||||
{ ARMV7M_FAULTMASK, "faultmask", 1, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.m-system", NULL, },
|
||||
{ ARMV7M_CONTROL, "control", 3, REG_TYPE_INT8, "system", "org.gnu.gdb.arm.m-system", NULL, },
|
||||
|
||||
{ ARMV8M_MSPLIM, "msplim", 32, REG_TYPE_DATA_PTR, "stack", "org.gnu.gdb.arm.m-system", NULL, },
|
||||
{ ARMV8M_PSPLIM, "psplim", 32, REG_TYPE_DATA_PTR, "stack", "org.gnu.gdb.arm.m-system", NULL, },
|
||||
|
||||
/* ARMv8-M security extension (TrustZone) specific registers */
|
||||
{ ARMV8M_MSP_NS, "msp_ns", 32, REG_TYPE_DATA_PTR, "stack", "org.gnu.gdb.arm.secext", NULL, },
|
||||
{ ARMV8M_PSP_NS, "psp_ns", 32, REG_TYPE_DATA_PTR, "stack", "org.gnu.gdb.arm.secext", NULL, },
|
||||
@@ -288,6 +291,12 @@ uint32_t armv7m_map_id_to_regsel(unsigned int arm_reg_id)
|
||||
case ARMV8M_MSP_NS...ARMV8M_PSPLIM_NS:
|
||||
return arm_reg_id - ARMV8M_MSP_NS + ARMV8M_REGSEL_MSP_NS;
|
||||
|
||||
case ARMV8M_PSPLIM:
|
||||
return ARMV8M_REGSEL_PSPLIM;
|
||||
|
||||
case ARMV8M_MSPLIM:
|
||||
return ARMV8M_REGSEL_MSPLIM;
|
||||
|
||||
case ARMV8M_PMSK_BPRI_FLTMSK_CTRL_S:
|
||||
return ARMV8M_REGSEL_PMSK_BPRI_FLTMSK_CTRL_S;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user