)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"92b395dbfea69621f514308671a06b88da63d3ad","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- Enable ADIv5 DAP systems via JTAG or SWD transport"},{"line_number":10,"context_line":"- Select correct PWRCTL/PWRSTAT bits for XDM/APB"},{"line_number":11,"context_line":"- Add \"xtensa dm\" APB offset configuration command"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Signed-off-by: Ian Thompson \u003cianst@cadence.com\u003e"},{"line_number":14,"context_line":"Change-Id: I5894210c804f85075da868d0cfc6fb20b589d99f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7268ee11_a8050a25","line":11,"updated":"2022-09-05 15:25:11.000000000","message":"oops, forgot: this command has been dropped","commit_id":"f06ccc6d37d64ddce04659735c03b66f5fac949f"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"846497477cd9ba7b49e5727de1f9acfe468661ad","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- Enable ADIv5 DAP systems via JTAG or SWD transport"},{"line_number":10,"context_line":"- Select correct PWRCTL/PWRSTAT bits for XDM/APB"},{"line_number":11,"context_line":"- Add \"xtensa dm\" APB offset configuration command"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Signed-off-by: Ian Thompson \u003cianst@cadence.com\u003e"},{"line_number":14,"context_line":"Change-Id: I5894210c804f85075da868d0cfc6fb20b589d99f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5da8c1db_4a854c06","line":11,"in_reply_to":"7268ee11_a8050a25","updated":"2022-09-06 20:22:53.000000000","message":"ah yes, thanks.  Removing.","commit_id":"f06ccc6d37d64ddce04659735c03b66f5fac949f"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"a58fe55e8d70ac8b6da0b812599a7a4437d5216a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"18601114_7ede1ee2","updated":"2022-08-25 15:51:08.000000000","message":"Merge conflict should be resolved once https://review.openocd.org/c/openocd/+/7143 is reviewed and integrated.  I split these out for easier review, and pulled refs/changes/43/7143/2 before creating this patch...but please advise if there\u0027s a cleaner way to do this when files overlap.\n\nThanks for your comments/suggestions","commit_id":"00f749a5da6419e86fbb848daf6c9195959a2dd6"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"63b88ee51d65deca6481ab6de60df2aea38fed13","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"8f1ca085_9bec8715","updated":"2022-08-28 17:19:24.000000000","message":"I will need to review this again, but in mean time I have some remark","commit_id":"fc8e692993385d9a91c39829f0c45f2e22fee838"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"e38f46860d858511fcc269cee417cfcc70d9a688","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"dd6fc0d1_5a795b01","updated":"2022-08-25 19:28:02.000000000","message":"Resolved clang failure by making DAP reads synchronous vs. queued so APIs can be completely consistent.  This does impact performance somewhat for DAP+Xtensa, and I will address it in a future patch.","commit_id":"fc8e692993385d9a91c39829f0c45f2e22fee838"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"5e70282df7d11e177a09ea7561779a2e73ed30e5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"87977e5c_98ee01f6","updated":"2022-08-29 17:27:20.000000000","message":"Addressed your comments, Antonio.  Please let me know if you have further suggestions.  Thanks in advance","commit_id":"f06ccc6d37d64ddce04659735c03b66f5fac949f"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6876299c2573fb30dbdeff5c79f8ba005d499f57","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"be21c12b_eb7a9381","updated":"2022-09-05 15:20:22.000000000","message":"In general ok to go, only two more comments","commit_id":"f06ccc6d37d64ddce04659735c03b66f5fac949f"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"846497477cd9ba7b49e5727de1f9acfe468661ad","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"018ec5dc_5772c7e2","updated":"2022-09-06 20:22:53.000000000","message":"Thanks for the improvement suggestions, Antonio.  All are addressed, and I\u0027ve retested on DAP/SWD, DAP/JTAG, and straight-JTAG configurations.  No new clang analyzer warnings.","commit_id":"f06ccc6d37d64ddce04659735c03b66f5fac949f"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"4f2bb22ad4e39c8fb3d54988180120c05a59f583","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"e3827d28_4e3d42bf","updated":"2022-09-08 16:12:53.000000000","message":"Rebased after merge of 7143; no changes from patchset 4.  Rebuilt/retested and functioning as before.  No new clang warnings.  Should be good to merge anytime...  thanks, Antonio.","commit_id":"9cf6eab67c37f855323e8835cb5008222114caf6"}],"doc/openocd.texi":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"63b88ee51d65deca6481ab6de60df2aea38fed13","unresolved":true,"context_lines":[{"line_number":11066,"context_line":""},{"line_number":11067,"context_line":"@subsection Xtensa Debug Module Configuration Commands"},{"line_number":11068,"context_line":""},{"line_number":11069,"context_line":"@deffn Command {xtensa dm offset} value"},{"line_number":11070,"context_line":"Configure the Xtensa Debug Module (DM) to apply a fixed offset when accessing"},{"line_number":11071,"context_line":"debug registers behind a DAP interface (typically over APB).  The offset"},{"line_number":11072,"context_line":"value must be aligned to the size of the DM register file, typically 16KB."}],"source_content_type":"text/x-texinfo","patch_set":2,"id":"fde3f54f_8fdc776e","line":11069,"updated":"2022-08-28 17:19:24.000000000","message":"Hummm, when we have target CPU accessible through a DAP, we use to define this in the command \u0027target create\u0027 through the flag -dbgbase, that works together with -dap and -ap-num.\nPlus, through the AP ROMTABLE this offset can be auto-detected.\nDoes it apply here too?","commit_id":"fc8e692993385d9a91c39829f0c45f2e22fee838"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"5e70282df7d11e177a09ea7561779a2e73ed30e5","unresolved":false,"context_lines":[{"line_number":11066,"context_line":""},{"line_number":11067,"context_line":"@subsection Xtensa Debug Module Configuration Commands"},{"line_number":11068,"context_line":""},{"line_number":11069,"context_line":"@deffn Command {xtensa dm offset} value"},{"line_number":11070,"context_line":"Configure the Xtensa Debug Module (DM) to apply a fixed offset when accessing"},{"line_number":11071,"context_line":"debug registers behind a DAP interface (typically over APB).  The offset"},{"line_number":11072,"context_line":"value must be aligned to the size of the DM register file, typically 16KB."}],"source_content_type":"text/x-texinfo","patch_set":2,"id":"5188ceea_e74a2a22","line":11069,"in_reply_to":"fde3f54f_8fdc776e","updated":"2022-08-29 17:27:20.000000000","message":"Ah, that will work.  I wasn\u0027t aware of -dbgbase...thanks for the pointer.  Removed \"xtensa dm\" and updated Xtensa TCL files (see review 7145).  Works with both DAP/JTAG and DAP/SWD generic Xtensa systems.","commit_id":"fc8e692993385d9a91c39829f0c45f2e22fee838"}],"src/target/xtensa/xtensa.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"63b88ee51d65deca6481ab6de60df2aea38fed13","unresolved":true,"context_lines":[{"line_number":1651,"context_line":"\tif (retval !\u003d ERROR_OK)"},{"line_number":1652,"context_line":"\t\treturn retval;"},{"line_number":1653,"context_line":"\ttarget_call_event_callbacks(target, TARGET_EVENT_HALTED);"},{"line_number":1654,"context_line":"\treturn retval;"},{"line_number":1655,"context_line":"}"},{"line_number":1656,"context_line":""},{"line_number":1657,"context_line":"/**"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"01696f8b_49211d25","line":1654,"updated":"2022-08-28 17:19:24.000000000","message":"this should be in a separate patch","commit_id":"fc8e692993385d9a91c39829f0c45f2e22fee838"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"5e70282df7d11e177a09ea7561779a2e73ed30e5","unresolved":false,"context_lines":[{"line_number":1651,"context_line":"\tif (retval !\u003d ERROR_OK)"},{"line_number":1652,"context_line":"\t\treturn retval;"},{"line_number":1653,"context_line":"\ttarget_call_event_callbacks(target, TARGET_EVENT_HALTED);"},{"line_number":1654,"context_line":"\treturn retval;"},{"line_number":1655,"context_line":"}"},{"line_number":1656,"context_line":""},{"line_number":1657,"context_line":"/**"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"a0dafdc6_9e957434","line":1654,"in_reply_to":"01696f8b_49211d25","updated":"2022-08-29 17:27:20.000000000","message":"Sure, done.  Please see https://review.openocd.org/c/openocd/+/7150","commit_id":"fc8e692993385d9a91c39829f0c45f2e22fee838"}],"src/target/xtensa/xtensa_chip.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6876299c2573fb30dbdeff5c79f8ba005d499f57","unresolved":true,"context_lines":[{"line_number":90,"context_line":"\t};"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"\tstruct adiv5_private_config *pc;"},{"line_number":93,"context_line":"\tpc \u003d (struct adiv5_private_config *)target-\u003eprivate_config;"},{"line_number":94,"context_line":"\tif (adiv5_verify_config(pc) \u003d\u003d ERROR_OK) {"},{"line_number":95,"context_line":"\t\txtensa_chip_dm_cfg.dap \u003d pc-\u003edap;"},{"line_number":96,"context_line":"\t\txtensa_chip_dm_cfg.debug_apsel \u003d pc-\u003eap_num;"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"025161aa_b4e8399a","line":93,"updated":"2022-09-05 15:20:22.000000000","message":"private_config is \u0027void *\u0027, so no need for cast\n struct adiv5_private_config *pc \u003d target-\u003eprivate_config;","commit_id":"f06ccc6d37d64ddce04659735c03b66f5fac949f"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"846497477cd9ba7b49e5727de1f9acfe468661ad","unresolved":false,"context_lines":[{"line_number":90,"context_line":"\t};"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"\tstruct adiv5_private_config *pc;"},{"line_number":93,"context_line":"\tpc \u003d (struct adiv5_private_config *)target-\u003eprivate_config;"},{"line_number":94,"context_line":"\tif (adiv5_verify_config(pc) \u003d\u003d ERROR_OK) {"},{"line_number":95,"context_line":"\t\txtensa_chip_dm_cfg.dap \u003d pc-\u003edap;"},{"line_number":96,"context_line":"\t\txtensa_chip_dm_cfg.debug_apsel \u003d pc-\u003eap_num;"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"e8327bce_8085542c","line":93,"in_reply_to":"025161aa_b4e8399a","updated":"2022-09-06 20:22:53.000000000","message":"Thanks, that\u0027s cleaner now.  Fixing.","commit_id":"f06ccc6d37d64ddce04659735c03b66f5fac949f"}],"src/target/xtensa/xtensa_debug_module.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"63b88ee51d65deca6481ab6de60df2aea38fed13","unresolved":true,"context_lines":[{"line_number":103,"context_line":"\tif (swjdp) {"},{"line_number":104,"context_line":"\t\tLOG_DEBUG(\"DM examine: DAP AP select %d\", dm-\u003edebug_apsel);"},{"line_number":105,"context_line":"\t\tif (dm-\u003edebug_ap)"},{"line_number":106,"context_line":"\t\t\tdap_put_ap(dm-\u003edebug_ap);"},{"line_number":107,"context_line":"\t\tif (dm-\u003edebug_apsel \u003d\u003d DP_APSEL_INVALID) {"},{"line_number":108,"context_line":"\t\t\tLOG_DEBUG(\"DM examine: search for APB-type MEM-AP...\");"},{"line_number":109,"context_line":"\t\t\t/* TODO: Determine whether AP_TYPE_AXI_AP APs can be supported... */"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"88ab7b36_34b1f6d2","line":106,"range":{"start_line":106,"start_character":3,"end_line":106,"end_character":13},"updated":"2022-08-28 17:19:24.000000000","message":"after dap_put_ap() we have to guarantee we never use again the argument dm-\u003edebug_ap.\nIn Cortex-A and Aarch64 code, here we have something like\ndm-\u003edebug_ap \u003d NULL;\nbut this has already showed creating a segmentation fault in Cortex-M code, so has to be fixed in Cortex-A and Aarch64 too. See:\nhttps://review.openocd.org/c/openocd/+/7108\nCan you use the same solution?","commit_id":"fc8e692993385d9a91c39829f0c45f2e22fee838"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"5e70282df7d11e177a09ea7561779a2e73ed30e5","unresolved":false,"context_lines":[{"line_number":103,"context_line":"\tif (swjdp) {"},{"line_number":104,"context_line":"\t\tLOG_DEBUG(\"DM examine: DAP AP select %d\", dm-\u003edebug_apsel);"},{"line_number":105,"context_line":"\t\tif (dm-\u003edebug_ap)"},{"line_number":106,"context_line":"\t\t\tdap_put_ap(dm-\u003edebug_ap);"},{"line_number":107,"context_line":"\t\tif (dm-\u003edebug_apsel \u003d\u003d DP_APSEL_INVALID) {"},{"line_number":108,"context_line":"\t\t\tLOG_DEBUG(\"DM examine: search for APB-type MEM-AP...\");"},{"line_number":109,"context_line":"\t\t\t/* TODO: Determine whether AP_TYPE_AXI_AP APs can be supported... */"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"776cd4da_fc5a20ae","line":106,"range":{"start_line":106,"start_character":3,"end_line":106,"end_character":13},"in_reply_to":"88ab7b36_34b1f6d2","updated":"2022-08-29 17:27:20.000000000","message":"Ah, great point; thanks.  I see how that could be problematic.  Resolving...","commit_id":"fc8e692993385d9a91c39829f0c45f2e22fee838"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6876299c2573fb30dbdeff5c79f8ba005d499f57","unresolved":true,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"int xtensa_dm_set_offset(struct xtensa_debug_module *dm, uint32_t offset)"},{"line_number":99,"context_line":"{"},{"line_number":100,"context_line":"\tif (offset \u0026 XTENSA_DM_APB_MASK) {"},{"line_number":101,"context_line":"\t\tLOG_ERROR(\"Xtensa DM offset must be aligned to a %dKB multiple\","},{"line_number":102,"context_line":"\t\t\t(XTENSA_DM_APB_MASK + 1) / 1024);"},{"line_number":103,"context_line":"\t\treturn ERROR_FAIL;"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"6e732da8_aa5a4a25","line":100,"updated":"2022-09-05 15:20:22.000000000","message":"I think that this check should be moved in xtensa_dm_init(), and there check directly\n if (IS_ALIGNED(cfg-\u003eap_offset, XTENSA_DM_APB_MASK + 1)) {\n\nwhile in xtensa_chip_target_create() set\n xtensa_chip_dm_cfg.ap_offset \u003d target-\u003edbgbase;\n\nMaybe also revisit the macro XTENSA_DM_APB_MASK to directly have the alignment instead of the mask.","commit_id":"f06ccc6d37d64ddce04659735c03b66f5fac949f"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"846497477cd9ba7b49e5727de1f9acfe468661ad","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"int xtensa_dm_set_offset(struct xtensa_debug_module *dm, uint32_t offset)"},{"line_number":99,"context_line":"{"},{"line_number":100,"context_line":"\tif (offset \u0026 XTENSA_DM_APB_MASK) {"},{"line_number":101,"context_line":"\t\tLOG_ERROR(\"Xtensa DM offset must be aligned to a %dKB multiple\","},{"line_number":102,"context_line":"\t\t\t(XTENSA_DM_APB_MASK + 1) / 1024);"},{"line_number":103,"context_line":"\t\treturn ERROR_FAIL;"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"d8431c15_275607b3","line":100,"in_reply_to":"6e732da8_aa5a4a25","updated":"2022-09-06 20:22:53.000000000","message":"Ah, that makes sense.  Good to do during initialization time now that offset is configured through the target command.  Thanks.","commit_id":"f06ccc6d37d64ddce04659735c03b66f5fac949f"}]}
