arm_adi_v5: update coresight class names
authorAntonio Borneo <borneo.antonio@gmail.com>
Wed, 11 Aug 2021 15:03:18 +0000 (17:03 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sun, 22 Aug 2021 20:25:19 +0000 (20:25 +0000)
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 <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6431
Tested-by: jenkins
src/target/arm_adi_v5.c

index 0c4b80ca19b2ef8b03272640de2d3cc665c102b1..65a8bc4c7c55d6cd71454615b7812c4a83f1a276 100644 (file)
@@ -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)