From 66175577e1f5b89470bafa1e613e10307996a3fb Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Wed, 11 Aug 2021 17:03:18 +0200 Subject: [PATCH] arm_adi_v5: update coresight class names Update the list of ARM coresight classes wrt to latest ARM documentation. Use c99 array designator to easily track changes in future. Add a comment for the entry "OptimoDE DESS". It was added in 2009 by David Brownell, but Google cannot find any reference other than this line in openocd code its associated commit. It should not be an issue keeping it as is. Change-Id: Ia3b646131ee68ca5263095c3a0aeaf75c004b324 Signed-off-by: Antonio Borneo Reviewed-on: https://review.openocd.org/c/openocd/+/6431 Tested-by: jenkins --- src/target/arm_adi_v5.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c index 0c4b80ca19..65a8bc4c7c 100644 --- a/src/target/arm_adi_v5.c +++ b/src/target/arm_adi_v5.c @@ -865,15 +865,30 @@ int dap_to_jtag(struct adiv5_dap *dap) return dap_send_sequence(dap, SWD_TO_JTAG); } -/* CID interpretation -- see ARM IHI 0029B section 3 - * and ARM IHI 0031A table 13-3. +/* CID interpretation -- see ARM IHI 0029E table B2-7 + * and ARM IHI 0031E table D1-2. + * + * From 2009/11/25 commit 21378f58b604: + * "OptimoDE DESS" is ARM's semicustom DSPish stuff. + * Let's keep it as is, for the time being */ static const char *class_description[16] = { - "Reserved", "ROM table", "Reserved", "Reserved", - "Reserved", "Reserved", "Reserved", "Reserved", - "Reserved", "CoreSight component", "Reserved", "Peripheral Test Block", - "Reserved", "OptimoDE DESS", - "Generic IP component", "PrimeCell or System component" + [0x0] = "Generic verification component", + [0x1] = "ROM table", + [0x2] = "Reserved", + [0x3] = "Reserved", + [0x4] = "Reserved", + [0x5] = "Reserved", + [0x6] = "Reserved", + [0x7] = "Reserved", + [0x8] = "Reserved", + [0x9] = "CoreSight component", + [0xA] = "Reserved", + [0xB] = "Peripheral Test Block", + [0xC] = "Reserved", + [0xD] = "OptimoDE DESS", /* see above */ + [0xE] = "Generic IP component", + [0xF] = "CoreLink, PrimeCell or System component", }; static bool is_dap_cid_ok(uint32_t cid) -- 2.30.2