aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-07-23openocd: src/target: replace the GPL-2.0-or-later license tagAntonio Borneo192-2501/+384
Replace the FSF boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I255ad17235ff1e01bf0aa4deed4d944e1d693ddb Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7071 Tested-by: jenkins
2022-07-23openocd: src/rtos: replace the GPL-2.0-or-later license tagAntonio Borneo28-370/+53
Replace the FSF boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: If0194089baded7f58dc5d87a35d6e0aff9f43785 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7070 Tested-by: jenkins
2022-07-23openocd: src/jtag: replace the GPL-2.0-or-later license tagAntonio Borneo108-1404/+216
Replace the FSF boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: Ie873d12bb0fb838d0d6252e6b9ca3c2118853e9a Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7069 Tested-by: jenkins
2022-07-23openocd: src/helper: replace the GPL-2.0-or-later license tagAntonio Borneo23-299/+46
Replace the FSF boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I7851617e2682f97ccc3927e3941aadef2df63b54 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7068 Tested-by: jenkins
2022-07-23openocd: src/flash: replace the GPL-2.0-or-later license tagAntonio Borneo110-1429/+220
Replace the FSF boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: Ic7db91fe37d1139d42c99e303b3243b6c8fe3ea2 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7067 Tested-by: jenkins
2022-07-23openocd: src: fix incorrect SPDX tagsAntonio Borneo16-30/+33
The SPDX tag is aimed at machine handling and it's thus expected to be placed in the first line in specific format. Move the SPDX tag to the first line and fix it where needed. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: Ie9a05f530009d482a4116eebd147fd7e1ee3d41e Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7066 Tested-by: jenkins
2022-07-23openocd: src: fix incorrect GPL license tagAntonio Borneo1-2/+2
Use the standard SPDX tag, where it was incorrectly applied. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: Iaec63abc6e0a38e5b0ae0ea7f5ecee7ca007bbbd Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7065 Tested-by: jenkins
2022-07-23openocd: src: replace the GPL-2.0-only license tagAntonio Borneo1-12/+2
Replace the FSF boilerplate with the SPDX tag. Change-Id: I29f51caa5ae9854d05ce7e150d168a7002607cd1 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7064 Tested-by: jenkins
2022-07-23openocd: src: replace the incomplete GPL-2.0-or-later license tagAntonio Borneo6-71/+20
Few files have the FSF boilerplate without the latest statement on where to get the GPL license. Manually replace the FSF boilerplate with the SPDX tag. While there, reorganize the copyright statement. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I0c908d01c010e24f9c7e94885e7fbed4ecf26a86 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7063 Tested-by: jenkins
2022-07-23openocd: src: replace the GPL and BSD-Source-Code license tagsAntonio Borneo5-161/+70
Add the new license text in the license pool. Replace the GPL and BSD boilerplates with the SPDX tag. Add the copyright owner of Atmel, as it was explicitly listed in the BSD boilerplate text. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: Ibb117dbf8402269be3e5ba4f4c472162494d813f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7062 Tested-by: jenkins
2022-07-23openocd: src: replace the GPL with eCos exception 2.0 license tagAntonio Borneo4-25/+81
Add the license exception text in the license pool. Add the exception chapter in license-rules.txt Replace the boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: Ied513b7c9c0722ed2a9c11dbdff3fbf59f1b41ce Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7061 Tested-by: jenkins
2022-07-23openocd: src: replace the BSD-2-Clause-Views license tagAntonio Borneo4-56/+44
Add the license text in the license pool. Replace the BSD boilerplate with the SPDX tag. Add the copyright owner of Jim Project, as it was explicitly listed in the boilerplate text. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I6dd004b1945773c10539016ce733d1fbfe776a9d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7060 Tested-by: jenkins
2022-07-23openocd: src: replace the BSD-3-Clause license tagAntonio Borneo1-27/+2
Replace the BSD boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I5a8cab2051eee7eb99adf67f9631b0827c1359de Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7059 Tested-by: jenkins
2022-07-23openocd: src: add GPL license tag on files that miss itAntonio Borneo4-0/+8
Some file miss completely the license tag. Add the SPDX tag, using the same GPL-2.0-or-later license of the OpenOCD project. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I1fb51e722232d14f050458a820c3041de3dc9138 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7058 Tested-by: jenkins
2022-07-23openocd: src: remove duplicated GPL license tagAntonio Borneo1-13/+0
SPDX tag is replacing the FSF boilerplate. For files that have both, remove the FSF boilerplate and keep only the SPDX tag. Change-Id: I04c4764d13d4ca92453f30ed16aeae53cd4c3fc8 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7057 Tested-by: jenkins
2022-07-23openocd: build: add SPDX tagAntonio Borneo30-0/+60
Add the SPDX tag to makefiles, configuration scripts and tcl files present in the folders under src/ Change-Id: I1e4552aafe46ef4893d510da9d732c5f181784a4 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7051 Tested-by: jenkins
2022-07-02semihosting: fix return value of SYS_READ and SYS_WRITEPavel Kirienko1-9/+3
ARM/RISC-V semihosting calls SYS_READ/SYS_WRITE require inversion of the result value as described in "Semihosting for AArch32 and AArch64". Prior to this patch, this was done correctly only if (semihosting->is_fileio==false). This patch has been tested with STM32F446. Change-Id: I1b34c8d8393f7dfa66ee6539904a2eaf8f9154b0 Signed-off-by: Pavel Kirienko <pavel.kirienko@gmail.com> Fixes: https://sourceforge.net/p/openocd/tickets/232/ Reviewed-on: https://review.openocd.org/c/openocd/+/6803 Tested-by: jenkins Reviewed-by: Tim Newsome <tim@sifive.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-07-02target: esp_xtensa_smp: fix clang reportAntonio Borneo1-1/+1
The variable 'smp_break' is only set and used in case of smp. But clang cannot track if 'target->smp' get modified between the set and the use of 'smp_break', so it consider possible to use 'smp_break' uninitialized. Initialize 'smp_break' to silent clang. Change-Id: Ifa25a84fe9ffa25b8b58d7920ec77994c3b7ebfe Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes: 77287b8d47b4 ("target: add Espressif ESP32 basic support") Reviewed-on: https://review.openocd.org/c/openocd/+/7050 Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com> Tested-by: jenkins
2022-07-02semihosting: move semihosting_result_t from riscv.h to the semihosting_common.hErhan Kurubas4-29/+31
These enum values are useful for the arch level semihosting call handlers. Currently riscv uses them, we also need similar return codes for the xtensa. Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I8f63749cc203c59b07862f33edf3c393cd7e33a9 Reviewed-on: https://review.openocd.org/c/openocd/+/7039 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-07-02tcl/esp32s3: check memory protection on gdb attachErhan Kurubas1-3/+46
Memory protection must be disabled to allow stub flasher operate correctly. Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I6f292ee672ae001cd6e4df5d24eb7bb862639093 Reviewed-on: https://review.openocd.org/c/openocd/+/7037 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-07-02tcl/esp32s2: check memory protection on gdb attachErhan Kurubas1-0/+35
Memory protection must be disabled to allow stub flasher operate correctly. Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I2f239d98fca6882c4361691af306a5652b58ee78 Reviewed-on: https://review.openocd.org/c/openocd/+/7036 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-07-02jtag: add esp_usb_jtag driverErhan Kurubas8-1/+893
This driver is used with the ESP32 chips which has builtin USB-JTAG interface. e.g. with ESP32-C3, ESP32-S3 Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: If966268cb8d26f76540dd5440245a17ed0b72c61 Reviewed-on: https://review.openocd.org/c/openocd/+/6943 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2022-07-02configure: provide advice if PKG_PROG_PKG_CONFIG unavailableR. Diez1-0/+6
These are the misleading error messages that this change prevents: configure.ac:13: error: possibly undefined macro: AC_MSG_WARN If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure.ac:48: error: possibly undefined macro: AC_DEFINE configure.ac:342: error: possibly undefined macro: AC_MSG_ERROR configure.ac:608: error: possibly undefined macro: AC_MSG_NOTICE Change-Id: I21bcc7715eeac0f3d0bcc60bba6801e6a895cdd0 Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de> Reviewed-on: https://review.openocd.org/c/openocd/+/7035 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-24helper: fix build with mingw gcc 12.1.0Antonio Borneo1-2/+4
New mingw compiler correctly complains for using a freed memory area: src/helper/configuration.c: In function 'get_home_dir': src/helper/configuration.c:182:29: error: dangling pointer 'home' to 'homepath' may be used [-Werror=dangling-pointer=] 182 | home_path = alloc_printf("%s/%s", home, append_path); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In fact the variable 'homepath' is declared inside an 'if' branch and is not available outside. Move the declaration of 'homepath' to have it available in a wider context. Change-Id: I4a43a03c007c9f0d5c4cee962a9f7cc83ca49637 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reported-by: Dietmar May <dietmar.may@outlook.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7038 Tested-by: jenkins Reviewed-by: Dietmar May <dietmar.may@outlook.com>
2022-06-24tcl: add SPDX tagAntonio Borneo54-0/+101
For historical reasons, no license information was added to the tcl files. This makes trivial adding the SPDX tag through script: fgrep -rL SPDX tcl | while read a;do \ sed -i '1{i# SPDX-License-Identifier: GPL-2.0-or-later\n }' $a;done With no specific license information from the author, let's extend the OpenOCD project license GPL-2.0-or-later to the files. Change-Id: Ief3da306a6e1978de7dfb8f552f9ff23151f9944 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7030 Tested-by: jenkins
2022-06-24tcl/interface: add SPDX tagAntonio Borneo115-0/+230
For historical reasons, no license information was added to the tcl files. This makes trivial adding the SPDX tag through script: fgrep -rL SPDX tcl/interface | while read a;do \ sed -i '1{i# SPDX-License-Identifier: GPL-2.0-or-later\n }' $a;done With no specific license information from the author, let's extend the OpenOCD project license GPL-2.0-or-later to the files. Change-Id: I7bd6a628e9e153fc477cddf9b97087a39ec48aa7 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7029 Tested-by: jenkins
2022-06-24tcl/board: add SPDX tagAntonio Borneo319-0/+636
For historical reasons, no license information was added to the tcl files. This makes trivial adding the SPDX tag through script: fgrep -rL SPDX tcl/board | while read a;do \ sed -i '1{i# SPDX-License-Identifier: GPL-2.0-or-later\n }' $a;done With no specific license information from the author, let's extend the OpenOCD project license GPL-2.0-or-later to the files. Change-Id: Ibcf7da62e842aafd036a78db9ea2b9f11f79af16 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7028 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
2022-06-24tcl/target: add SPDX tagAntonio Borneo270-0/+535
For historical reasons, no license information was added to the tcl files. This makes trivial adding the SPDX tag through script: fgrep -rL SPDX tcl/ target| while read a;do \ sed -i '1{i# SPDX-License-Identifier: GPL-2.0-or-later\n }' $a;done With no specific license information from the author, let's extend the OpenOCD project license GPL-2.0-or-later to the files. Change-Id: I7b2610300b24cccd07bfa6fb5f1266970d5d3a1b Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7027 Tested-by: jenkins
2022-06-24tcl: move SPDX tag as first lineAntonio Borneo12-24/+24
The SPDX tag is aimed at machine handling and it's thus expected to be placed in the first line. Change-Id: I3992856eeb28b333c38d010ef286e22471ede263 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7026 Tested-by: jenkins
2022-06-24tcl: replace FSF boilerplate with SPDX tagAntonio Borneo3-42/+6
OpenOCD project is switching to SPDX tags. Replace the few FSF boilerplate in tcl folder. Change-Id: I15b146eb77cc491ed7355178f684f3e76fc763b4 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7025 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
2022-06-24tcl/board/steval-idb012v1: fix SPDX tagAntonio Borneo1-2/+3
Remove trailing '.' While there, add newline to file's last line. Change-Id: I3a727e406b572d051b28e17688c24627e55520c4 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7024 Tested-by: jenkins
2022-06-24tcl/interface/vdebug: add newline to file's last lineAntonio Borneo1-1/+1
Change-Id: I83d2477e8bc837aeac69bd5d08fdd923fd00a37c Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7023 Tested-by: jenkins
2022-06-24semihosting: remove comparison with NULLAntonio Borneo1-1/+1
Commit b9526f140127 ("semihosting: permit redirection of semihosting I/O to TCP") introduces a new comparison with NULL. Remove it. Change-Id: Ice4333c50d16f7592f0ff86b1640217fa42e34f6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes: b9526f140127 ("semihosting: permit redirection of semihosting I/O to TCP") Reviewed-on: https://review.openocd.org/c/openocd/+/7031 Tested-by: jenkins
2022-06-24drivers/linuxgpiod: simplify gpio releaseAntonio Borneo1-32/+13
We already have a helper to release the gpio. Extend it to also release its corresponding gpio chip. As side effect, remove comparison with NULL. Change-Id: I47cd446edfaead662d63c3330f25a791b747e882 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7033 Tested-by: jenkins Reviewed-by: Steve Marple <stevemarple@googlemail.com>
2022-06-24drivers/linuxgpiod: release gpio at exitAntonio Borneo1-0/+1
Commit 20adf85f3484 ("linuxgpiod: add SWDIO buffer") introduces an additional gpio for SWDIO direction, but does not release it at driver's exit. Release the gpio at exit. Change-Id: If7ea31f79ffed04af585864e49bcf1f35e118bdd Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7032 Tested-by: jenkins Reviewed-by: Steve Marple <stevemarple@googlemail.com>
2022-06-24aarch64: fix handling of 'reset halt'Antonio Borneo1-5/+5
Commit 6c0151623cb0 ("aarch64: add support for "reset halt"") introduces the register setting to halt at reset vector, but: - does not consider the case 'srst_pulls_trst' that makes useless setting the registers as they will be erased by the pulled trst; - does not clean sticky errors in case of 'srst_gates_jtag'. Avoid any register initialization on 'srst_pulls_trst' and move the cleaning of sticky errors in the common block. Change-Id: I6f839f06f7b091e234ede31ec18096e51f017bcd Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes: 6c0151623cb0 ("aarch64: add support for "reset halt"") Reviewed-on: https://review.openocd.org/c/openocd/+/7034 Tested-by: jenkins Reviewed-by: Christian Hoff <christian.hoff@advantest.com>
2022-06-24tcl/target/imx8m: use hwthread rtosAlvin Šipraga1-1/+2
In order to facilitate debugging multiple cores, specify the coreid and the hwthread rtos in the imx8m target configuration. Change-Id: Ibd871517a160ceca15002fb10e27cb793f14d086 Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk> Reviewed-on: https://review.openocd.org/c/openocd/+/7019 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-24semihosting: add custom user command handlerErhan Kurubas2-19/+33
Custom user syscalls can be handled with target events in the TCL scripts. This patch gives another opportunity to handle custom syscalls in the c files. Besides that some utility functions are also exported for the custom handlers. Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: Ice13d527540a0de0b2a8abda912ae3dcff3834b7 Reviewed-on: https://review.openocd.org/c/openocd/+/6889 Tested-by: jenkins Reviewed-by: Ian Thompson <ianst@cadence.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-24esp32s2: convert counted timeout to timeval_msErhan Kurubas1-6/+8
Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: Id685408281478cec0e7e886dbedb3b8972c7b652 Reviewed-on: https://review.openocd.org/c/openocd/+/7020 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Ian Thompson <ianst@cadence.com>
2022-06-24target: add Espressif ESP32-S3 basic supportErhan Kurubas10-2/+1035
ESP32-S3 is a dual core Xtensa SoC Not full featured yet. Some of the missing functionality: -Semihosting -Flash breakpoints -Flash loader -Apptrace -FreeRTOS Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I44e17088030c96a9be9809f6579a4f16dbfc5794 Reviewed-on: https://review.openocd.org/c/openocd/+/6990 Tested-by: jenkins Reviewed-by: Ian Thompson <ianst@cadence.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-24target: add Espressif ESP32 basic supportErhan Kurubas18-3/+1950
ESP32 is a dual core Xtensa SoC Not full featured yet. Some of the missing functionality: -Semihosting -Flash breakpoints -Flash loader -Apptrace -FreeRTOS Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I76fb184aa38ab9f4e30290c038b5ff8850060750 Reviewed-on: https://review.openocd.org/c/openocd/+/6989 Tested-by: jenkins Reviewed-by: Ian Thompson <ianst@cadence.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-06-24target/board: Add Ampere QS|MQ config filesDaniel Goehring3-0/+597
Add Ampere Altra ("Quicksilver") and Ampere Altra Max ("Mystique") target/board configuration files. The target configuration file supports silicon and emulation. The board configuration files support 1 and 2 socket platforms. Tested on Ampere emulation and silicon Change-Id: I036c798a50624e30ab51ccd2895b6f60c40be096 Signed-off-by: Daniel Goehring <dgoehrin@os.amperecomputing.com> Reviewed-on: https://review.openocd.org/c/openocd/+/5591 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2022-06-24arm_adi_v5: parse ROM tables behind SoC-600 APv1 adapterAntonio Borneo1-3/+12
Arm "CoreSight System-on-Chip SoC-600" specification describes a bridge "Access Port v1 adapter" aimed to "connect a legacy Access Port (AP) ... into an CoreSight Architecture v3 system". A ROM table can be located in the "legacy" part of the system, on the legacy AP behind the APv1 adapter. For the purpose of scanning the ROM tables, consider an ADIv6 SoC-600 APv1 adapter as an ADIv5 AP. Change-Id: I97d42fb77013c1251fb68d0caa4274086bf38a70 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6827 Tested-by: jenkins
2022-06-24adiv6: stay in same AP during dap_lookup_cs_component()Antonio Borneo1-0/+7
Configuration file can specify, as target's debug AP, an AP that contains a ROM table that points, in turn, to other APs. Current code in cortex_a and aarch64 is not able to handle a return from dap_lookup_cs_component() that points to another AP. While it could be interesting to specify 'root' as target's debug AP, drop any found value if it's not in the starting AP. Change-Id: Id206e4fa7a29e9402c8e2393026817b410bbb8bd Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6826 Tested-by: jenkins
2022-06-24adiv6: add support for ROM tables in APAntonio Borneo1-31/+141
ADIv6 adds AP that only contain a ROM table in the AP itself, that can point to other AP containing either another AP level ROM table or a MEM-AP to be parsed as usual. Add support for parsing AP level ROM tables. Change-Id: Ic25863b16463b8a6adc3b15e26db7fdca858d6df Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6467 Tested-by: jenkins
2022-06-24adiv6: prepare for AP level ROM tablesAntonio Borneo1-16/+28
ADIv6 adds AP that only contain a ROM table in the AP itself, that can point to other AP containing either another AP level ROM table or a MEM-AP to be parsed as usual. To handle recursive AP access, reorganize the code to: - pass the depth==0 from the command 'dap info'; - print the AP number as first line, adding proper indentation on depth>0; - align the following print with proper indentation. Change-Id: I5b811810c807fc51b307bd60f67817d9de2aa095 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6466 Tested-by: jenkins
2022-06-24arm_adi_v5: add option 'root' to 'dap info' commandAntonio Borneo4-8/+66
On ADIv6 the system root ROM table is found by reading the DAP DP registers BASEPTR0 and BASEPTR1. Add option 'root' to the commands 'dap info' to let it retrieve the system root ROM table's AP from DAP DP, then use such AP for following dump. Change-Id: I1789457a005faa3870c5d14f763378d2f6a5f095 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6462 Tested-by: jenkins
2022-06-24adiv6: use struct adiv5_ap->ap_num to contain the AP base addressAntonio Borneo9-73/+156
ADIv5 DAP can only have 256 AP, while ADIv6 can provide till 2**40 (1,099,511,627,776) AP per DAP. Reuse the field ap_num in struct adiv5_ap, currently used on ADIv5 to hold the ADIv5 AP number (apsel), to contain the ADIv6 AP base address. Convert struct adiv5_ap->ap_num to 64 bit and initialize it to DP_APSEL_INVALID for unused AP. Restrict dap_find_get_ap() to ADIv5 only. To be enhanced. On ADIv6, let dap_get_ap() return an already allocated AP, or allocate and return an unused AP. Add function is_ap_num_valid() and use it. Change-Id: Ib2fe8c7ec0d08393cd91c29fdac5d632dfc1e438 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6461 Reviewed-by: Daniel Goehring <dgoehrin@os.amperecomputing.com> Tested-by: jenkins
2022-06-24adiv6: add low level swd transportAntonio Borneo1-26/+52
During enter in SWD read DP_DPIDR without selecting the register bank through DP_SELECT_DPBANK. Handle the different format of DP_SELECT register. Change-Id: Iea1b8eb6ec94177e16a430d5885595a38e833eeb Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6697 Tested-by: jenkins
2022-06-24adi_v5_jtag: extend memaccess_tck to every AP accessKevin Burke1-8/+5
ADIv5 reports: Accessing AP registers or debug resources in connected device through an AP can be subjected to other variable response delays in the system. A debugger that can adapt to these delays and avoid wasting WAIT scans operates more efficiently and provides higher maximum data throughput. The existing code in OpenOCD uses extra tck only for accessing resources through an AP. Extend the use of extra tck also for accessing an AP register. Split from change https://review.openocd.org/6077/ Change-Id: I2082362e098d09f4ba0668e01f5196afc965c8f3 Signed-off-by: Kevin Burke <kevinb@os.amperecomputing.com> Signed-off-by: Daniel Goehring <dgoehrin@os.amperecomputing.com> Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6460 Tested-by: jenkins