target: cortex_m: fix detection of STAR-MC1 device
The detection of Cortex-M STAR-MC1 was introduced with [1], at a time when OpenOCD was only checking the field PartNo of the CPUID register. Later-on [2], OpenOCD extended the check to the field implementer of CPUID register. The value for ARM (0x41) implementer was used to all the Cortex-M, but no feedback for STAR-MC1 was available. A comment reporting the possible mismatch was added. As reported on OpenOCD mailing-list, the technical reference manual for STAR-MC1 is now available [3] and it reports the implementer as ARM China (0x63) [3]. Fix the STAR-MC1 implementer accordingly. Reported-by: Joseph Yiu <Joseph.Yiu@arm.com> Change-Id: I8ed1064a847b73065528ee7032be967b5c58b431 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Link: [1]7dc4be3157
("target/arm: Add support with identify STAR-MC1") Fixes: [2]05ee889155
("target/cortex_m: check core implementor field") Link: [3] https://www.armchina.com/download/Documents/Application-Notes/Technical-Reference-Manual?infoId=160 Reviewed-on: https://review.openocd.org/c/openocd/+/8316 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
parent
ed80a182ce
commit
df7a31f536
|
@ -62,6 +62,7 @@ enum arm_arch {
|
|||
enum arm_implementor {
|
||||
ARM_IMPLEMENTOR_ARM = 0x41,
|
||||
ARM_IMPLEMENTOR_INFINEON = 0x49,
|
||||
ARM_IMPLEMENTOR_ARM_CHINA = 0x63,
|
||||
ARM_IMPLEMENTOR_REALTEK = 0x72,
|
||||
};
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
*/
|
||||
enum cortex_m_impl_part {
|
||||
CORTEX_M_PARTNO_INVALID,
|
||||
STAR_MC1_PARTNO = ARM_MAKE_CPUID(ARM_IMPLEMENTOR_ARM, 0x132), /* FIXME - confirm implementor! */
|
||||
STAR_MC1_PARTNO = ARM_MAKE_CPUID(ARM_IMPLEMENTOR_ARM_CHINA, 0x132),
|
||||
CORTEX_M0_PARTNO = ARM_MAKE_CPUID(ARM_IMPLEMENTOR_ARM, 0xC20),
|
||||
CORTEX_M1_PARTNO = ARM_MAKE_CPUID(ARM_IMPLEMENTOR_ARM, 0xC21),
|
||||
CORTEX_M3_PARTNO = ARM_MAKE_CPUID(ARM_IMPLEMENTOR_ARM, 0xC23),
|
||||
|
|
Loading…
Reference in New Issue