ARM ADIv5: CoreSight ROM decode part number and designer id 28/3128/12
authorPeter Lawrence <majbthrd@gmail.com>
Mon, 28 Dec 2015 21:53:49 +0000 (22:53 +0100)
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>
Sun, 3 Jan 2016 21:38:04 +0000 (21:38 +0000)
commit2f131d3c3004658e891b674e9a8ac93bae5246b0
treeba9fa1af86aeabb787d782bb29d6f56ee2fc0274
parent24b88c9e0c41a9fbdf15d2c6ee478772e06a5d04
ARM ADIv5: CoreSight ROM decode part number and designer id

The existing arm_adi_v5.c code decodes CoreSight peripherals based
on the part number field.  However, these are specific to a
particular manufacturer (often ARM).  The same part number from
two different manufacturers (distinct designer ids) should not
decode as the same CoreSight peripheral.

The Analog Devices ADSP-SC58x and ADSP-BF70x have peripherals that
overlap with existing OpenOCD decoding.  The part number is the
same as existing OpenOCD decoding, but have a different JEP106 code.

Most, if not all, of the existing part number entries in
arm_adi_v5.c are probably specific to ARM. Change all entries
suspected to be designed by ARM to match only ARM's designer ID.

However, to preserve legacy behavior, existing non-ARM entries are
encoded with a wildcard so that they will behave in the same way as
the existing legacy code.  It is desirable, however, to start
encoding the data with designer codes to avoid such ambiguity.

Revising the code to check both the part number and designer id
seemed to a warrant a const array lookup table instead of a
multi-tiered switch statement.

Also try to sync part identification IDs with relevant ARM docs.

Change-Id: Iac1374e4cfc6f04cebb479c0e3fa9bde527cc4a3
Signed-off-by: Peter Lawrence <majbthrd@gmail.com>
[andreas.fritiofson@gmail.com: change JEP106 to designer ID, cleanup]
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/3128
Tested-by: jenkins
src/target/arm_adi_v5.c

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)