)]}'
{"id":"openocd~master~Ie3b5fa48fedf240d89c61010995c0044d2b62804","project":"openocd","branch":"master","attention_set":{},"removed_from_attention_set":{"1000687":{"account":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"last_update":"2025-12-16 19:26:47.000000000","reason":"Change was abandoned"},"1002047":{"account":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"last_update":"2025-12-16 19:26:47.000000000","reason":"Change was abandoned"},"1001983":{"account":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"last_update":"2025-12-13 17:34:33.000000000","reason":"\u003cGERRIT_ACCOUNT_1001983\u003e replied on the change","reason_account":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"}}},"hashtags":[],"change_id":"Ie3b5fa48fedf240d89c61010995c0044d2b62804","subject":"target/riscv: correct reset completion condition","status":"ABANDONED","created":"2025-12-11 23:34:13.000000000","updated":"2025-12-16 19:26:47.000000000","total_comment_count":13,"unresolved_comment_count":2,"has_review_started":true,"meta_rev_id":"330b04e1d000d65adce62446dab2db4c4f39292a","_number":9313,"owner":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"all":[{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},{"tag":"autogenerated:jenkins-gerrit-trigger","value":1,"date":"2025-12-12 23:19:10.000000000","permitted_voting_range":{"min":-1,"max":1},"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]}],"values":{"-1":"Fails"," 0":"No score","+1":"Verified"},"description":"","default_value":0},"Code-Review":{"disliked":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"all":[{"value":-1,"date":"2025-12-13 02:29:55.000000000","permitted_voting_range":{"min":-2,"max":2},"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]}],"values":{"-2":"This shall not be merged","-1":"I would prefer this is not merged as is"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me, approved"},"description":"","value":-1,"default_value":0}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2025-12-11 23:34:22.000000000","updated_by":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"reviewer":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"state":"CC"},{"updated":"2025-12-11 23:35:22.000000000","updated_by":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"reviewer":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"state":"REVIEWER"},{"updated":"2025-12-11 23:37:53.000000000","updated_by":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"reviewer":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"state":"CC"},{"updated":"2025-12-12 09:24:34.000000000","updated_by":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"reviewer":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"state":"REVIEWER"},{"updated":"2025-12-13 02:29:55.000000000","updated_by":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"reviewer":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"state":"REVIEWER"}],"messages":[{"id":"71947ac462968aab790755e377c79a7a8b69cb14","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"real_author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"date":"2025-12-11 23:34:13.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"4ff46dc51e8ab0027ab1326947ed0042e3343a55","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"real_author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"date":"2025-12-11 23:35:19.000000000","message":"Uploaded patch set 2: Patch Set 1 was rebased.","accounts_in_message":[],"_revision_number":2},{"id":"41df919e6798befdcea01bb3e93f5b70b4ae59fd","tag":"autogenerated:jenkins-gerrit-trigger","author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"real_author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"date":"2025-12-11 23:35:22.000000000","message":"Patch Set 1: Verified-1\n\nBuild Failed \n\nhttps://build.openocd.org/job/openocd-gerrit-build/21551/ : ABORTED\n\nhttps://build.openocd.org/job/openocd-gerrit/22438/ : FAILURE","accounts_in_message":[],"_revision_number":1},{"id":"6e7c2eb6ff0a9fb53fd40118a0c2be6e5c083525","tag":"autogenerated:jenkins-gerrit-trigger","author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"real_author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"date":"2025-12-11 23:36:19.000000000","message":"Patch Set 2: Verified-1\n\nBuild Failed \n\nhttps://build.openocd.org/job/openocd-gerrit-build/21552/ : FAILURE\n\nhttps://build.openocd.org/job/openocd-gerrit/22439/ : FAILURE","accounts_in_message":[],"_revision_number":2},{"id":"7fc06c87cf62782c2e3409a86c227f538169c17a","author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"real_author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"date":"2025-12-11 23:37:53.000000000","message":"Patch Set 2:\n\n(1 comment)","accounts_in_message":[],"_revision_number":2},{"id":"203a0c95600a2e123f9b2c37150de9ad24535fc5","author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"real_author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"date":"2025-12-11 23:40:13.000000000","message":"Patch Set 2:\n\n(1 comment)","accounts_in_message":[],"_revision_number":2},{"id":"5a2a4e60eb6e66f4dac7b21f0bf0d3aab6d57ce5","author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"real_author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"date":"2025-12-12 09:24:34.000000000","message":"Patch Set 2:\n\n(2 comments)","accounts_in_message":[],"_revision_number":2},{"id":"ff91835fab92eec47f30b55a6a24bf8e7a9ac4a3","author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"real_author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"date":"2025-12-12 10:36:46.000000000","message":"Patch Set 2: Code-Review-1\n\n(2 comments)","accounts_in_message":[],"_revision_number":2},{"id":"2c0f011b13ee250e62b257bd318fad755d379a09","author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"real_author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"date":"2025-12-12 18:52:41.000000000","message":"Patch Set 2:\n\n(2 comments)","accounts_in_message":[],"_revision_number":2},{"id":"30915b1ed13ffc24869aca905bfd5443f7044882","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"real_author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"date":"2025-12-12 22:32:56.000000000","message":"Uploaded patch set 3.\n\nOutdated Votes:\n* Code-Review-1 (copy condition: \"changekind:NO_CHANGE OR is:MIN\")\n* Verified-1 (copy condition: \"changekind:NO_CHANGE\")\n","accounts_in_message":[],"_revision_number":3},{"id":"69d125001af3dfcaa42d95a4e1069a1083aac93b","tag":"autogenerated:jenkins-gerrit-trigger","author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"real_author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"date":"2025-12-12 22:34:08.000000000","message":"Patch Set 3: Verified-1\n\nBuild Failed \n\nhttps://build.openocd.org/job/openocd-gerrit-build/21557/ : FAILURE\n\nhttps://build.openocd.org/job/openocd-gerrit/22444/ : FAILURE","accounts_in_message":[],"_revision_number":3},{"id":"f20ae74aef515265a0828e7b811e4c1d6d73e7d1","author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"real_author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"date":"2025-12-12 22:57:03.000000000","message":"Patch Set 3:\n\n(2 comments)","accounts_in_message":[],"_revision_number":3},{"id":"0070231ae86cf1cdcb85d5c833fc8dbec0cb78ff","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"real_author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"date":"2025-12-12 23:01:38.000000000","message":"Uploaded patch set 4: Commit message was updated.\n\nOutdated Votes:\n* Verified-1 (copy condition: \"changekind:NO_CHANGE\")\n","accounts_in_message":[],"_revision_number":4},{"id":"87d5ad77cf6a5e11e09729cce4de4661891cfeef","author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"real_author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"date":"2025-12-12 23:02:36.000000000","message":"Patch Set 4:\n\n(1 comment)","accounts_in_message":[],"_revision_number":4},{"id":"d7ac8105cdbd8e687beccfe44c4f837559727607","tag":"autogenerated:jenkins-gerrit-trigger","author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"real_author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"date":"2025-12-12 23:19:10.000000000","message":"Patch Set 4: Verified+1\n\nBuild Successful \n\nhttps://build.openocd.org/job/openocd-gerrit-build/21558/ : SUCCESS\n\nhttps://build.openocd.org/job/openocd-gerrit/22445/ : SUCCESS","accounts_in_message":[],"_revision_number":4},{"id":"529c03ba70efaf7910a37c13dc366403617c3cc6","author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"real_author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"date":"2025-12-13 02:29:55.000000000","message":"Patch Set 4: Code-Review-1\n\n(1 comment)","accounts_in_message":[],"_revision_number":4},{"id":"f123b4c7f19ca023e93aabe59d9e4339a3a46d85","author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"real_author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"date":"2025-12-13 17:34:33.000000000","message":"Patch Set 4:\n\n(1 comment)","accounts_in_message":[],"_revision_number":4},{"id":"330b04e1d000d65adce62446dab2db4c4f39292a","tag":"autogenerated:gerrit:abandon","author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"real_author":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"date":"2025-12-16 19:26:47.000000000","message":"Abandoned\n\nNot the right approach. Fixed by https://review.openocd.org/c/openocd/+/9316/ instead.","accounts_in_message":[],"_revision_number":4}],"current_revision":"d905ff9ab5cf161351222d981c910cfe8dd54fc3","revisions":{"d66254b75776c445133d3d301e962b60ac840876":{"kind":"TRIVIAL_REBASE","_number":2,"created":"2025-12-11 23:35:19.000000000","uploader":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"ref":"refs/changes/13/9313/2","fetch":{"anonymous http":{"url":"https://review.openocd.org/openocd","ref":"refs/changes/13/9313/2","commands":{"Branch":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/2 \u0026\u0026 git checkout -b change-9313 FETCH_HEAD","Checkout":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.openocd.org/openocd refs/changes/13/9313/2","Reset To":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/2 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"aa9ff8dc5ec60c46134f57a2f858149bb083036e","subject":"target/esirisc_trace: drop macro BIT_MASK() conflicting with bits.h"}],"author":{"name":"Thomas Hebb","email":"tommyhebb@gmail.com","date":"2025-12-11 23:25:28.000000000","tz":-300},"committer":{"name":"Thomas Hebb","email":"tommyhebb@gmail.com","date":"2025-12-11 23:35:01.000000000","tz":-300},"subject":"target/riscv: don\u0027t finish reset until allunavail clears","message":"target/riscv: don\u0027t finish reset until allunavail clears\n\nThis used to be our behavior, but it regressed in commit 1c168242e9f5\n(\"target/riscv: simplify reset\"), which was intended purely as a code\ncleanup. On some chips, like the GD32VF103, anyhavereset/allhavereset\nassert before anyunavail/allunavail deassert, causing us to leave this\nroutine before the reset finishes.\n\nThat behavior is arguably a violation of the debug spec, which says that\nhavereset should be set \"when harts have been reset\". But the spec also\nsays that the system coming out of reset is \"reported by allunavail,\nanyunavail\", which makes me believe it\u0027s more correct to check only\nthose bits.\n\nThis change restores the previous behavior, where we use the value of\nhavereset to decide whether to set ackhavereset only after allunavail\nhas deasserted.\n\nFixes: 5754aebc4945 (\"target: riscv: Sync with the RISC-V fork\")\nSigned-off-by: Thomas Hebb \u003ctommyhebb@gmail.com\u003e\nChange-Id: Ie3b5fa48fedf240d89c61010995c0044d2b62804\n"}},"269e827fa95d13edf554d9f087d37a6de3d34ba1":{"kind":"REWORK","_number":3,"created":"2025-12-12 22:32:56.000000000","uploader":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"ref":"refs/changes/13/9313/3","fetch":{"anonymous http":{"url":"https://review.openocd.org/openocd","ref":"refs/changes/13/9313/3","commands":{"Branch":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/3 \u0026\u0026 git checkout -b change-9313 FETCH_HEAD","Checkout":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/3 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/3 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/3 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.openocd.org/openocd refs/changes/13/9313/3","Reset To":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/3 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"5479c58d23771c31d6f034a63b3f01b83ed5129a","subject":"tcl/target/stm32l4, tcl/target/stm32w*: Fix clock configuration"}],"author":{"name":"Thomas Hebb","email":"tommyhebb@gmail.com","date":"2025-12-11 23:25:28.000000000","tz":-300},"committer":{"name":"Thomas Hebb","email":"tommyhebb@gmail.com","date":"2025-12-12 22:31:48.000000000","tz":-300},"subject":"target/riscv: fix incorrect reset completion condition","message":"target/riscv: fix incorrect reset completion condition\n\nPrior to riscv-openocd commit[1] 1c168242e9f5 (\"target/riscv: simplify\nreset\"), we waited for allunavail to deassert after issuing a reset,\nthen we checked allhavereset once to decide whether to set ackhavereset.\n\nSince that commit, we stop waiting either when allunavail deasserts or\nwhen allhavereset asserts. This is wrong. The RISC-V Debug Specification\n1.0 says that \"while [a] reset is on-going, harts are either in the\nrunning state ... or in the unavailable state\", meaning allunavail is\nnot guaranteed to be asserted at all! We should stop waiting only when\nboth conditions are met.\n\nWe could in theory remove the allunavail check entirely, since the Debug\nSpecification 1.0 says that \"once a hart’s reset is complete, havereset\nbecomes set\". However, that wording was less clear in the 0.13 spec and\nat least one real chip (GD32VF103) asserts havereset before deasserting\nunavail. Since we can\u0027t do anything with an unavailable hart anyway, it\nseems harmless to keep the allunavail check to accommodate noncompliant\nimplementations.\n\n[1] https://github.com/riscv-collab/riscv-openocd/commit/1c168242e9f5993aec7024998529e2b2ed53098a\n[2] https://github.com/riscv/riscv-debug-spec/releases/download/1.0/riscv-debug-specification.pdf\n\nFixes: 5754aebc4945 (\"target: riscv: Sync with the RISC-V fork\")\nSigned-off-by: Thomas Hebb \u003ctommyhebb@gmail.com\u003e\nChange-Id: Ie3b5fa48fedf240d89c61010995c0044d2b62804\n"}},"0d7f3a3e59ad54509274a84f4d3f52966d227840":{"kind":"REWORK","_number":1,"created":"2025-12-11 23:34:13.000000000","uploader":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"ref":"refs/changes/13/9313/1","fetch":{"anonymous http":{"url":"https://review.openocd.org/openocd","ref":"refs/changes/13/9313/1","commands":{"Branch":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/1 \u0026\u0026 git checkout -b change-9313 FETCH_HEAD","Checkout":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.openocd.org/openocd refs/changes/13/9313/1","Reset To":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/1 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"eed1f454e230e3ca954136ce0a8599d5ee316d7c","subject":"tcl/target/gd32vf103: copy a few minor settings from riscv-openocd"}],"author":{"name":"Thomas Hebb","email":"tommyhebb@gmail.com","date":"2025-12-11 23:25:28.000000000","tz":-300},"committer":{"name":"Thomas Hebb","email":"tommyhebb@gmail.com","date":"2025-12-11 23:26:48.000000000","tz":-300},"subject":"target/riscv: don\u0027t finish reset until allunavail clears","message":"target/riscv: don\u0027t finish reset until allunavail clears\n\nThis used to be our behavior, but it regressed in commit 1c168242e9f5\n(\"target/riscv: simplify reset\"), which was intended purely as a code\ncleanup. On some chips, like the GD32VF103, anyhavereset/allhavereset\nassert before anyunavail/allunavail deassert, causing us to leave this\nroutine before the reset finishes.\n\nThat behavior is arguably a violation of the debug spec, which says that\nhavereset should be set \"when harts have been reset\". But the spec also\nsays that the system coming out of reset is \"reported by allunavail,\nanyunavail\", which makes me believe it\u0027s more correct to check only\nthose bits.\n\nThis change restores the previous behavior, where we use the value of\nhavereset to decide whether to set ackhavereset only after allunavail\nhas deasserted.\n\nFixes: 5754aebc4945 (\"target: riscv: Sync with the RISC-V fork\")\nSigned-off-by: Thomas Hebb \u003ctommyhebb@gmail.com\u003e\nChange-Id: Ie3b5fa48fedf240d89c61010995c0044d2b62804\n"}},"d905ff9ab5cf161351222d981c910cfe8dd54fc3":{"kind":"NO_CODE_CHANGE","_number":4,"created":"2025-12-12 23:01:38.000000000","uploader":{"_account_id":1001983,"name":"Tom Hebb","email":"tommyhebb@gmail.com","username":"tchebb"},"ref":"refs/changes/13/9313/4","fetch":{"anonymous http":{"url":"https://review.openocd.org/openocd","ref":"refs/changes/13/9313/4","commands":{"Branch":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/4 \u0026\u0026 git checkout -b change-9313 FETCH_HEAD","Checkout":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/4 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/4 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/4 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.openocd.org/openocd refs/changes/13/9313/4","Reset To":"git fetch https://review.openocd.org/openocd refs/changes/13/9313/4 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"5479c58d23771c31d6f034a63b3f01b83ed5129a","subject":"tcl/target/stm32l4, tcl/target/stm32w*: Fix clock configuration"}],"author":{"name":"Thomas Hebb","email":"tommyhebb@gmail.com","date":"2025-12-11 23:25:28.000000000","tz":-300},"committer":{"name":"Thomas Hebb","email":"tommyhebb@gmail.com","date":"2025-12-12 23:01:05.000000000","tz":-300},"subject":"target/riscv: correct reset completion condition","message":"target/riscv: correct reset completion condition\n\nPrior to riscv-openocd commit [1] (\"target/riscv: simplify reset\"), we\nwaited for allunavail to deassert after issuing a reset, then we checked\nallhavereset once to decide whether to set ackhavereset.\n\nSince that commit, we stop waiting either when allunavail deasserts or\nwhen allhavereset asserts. This is wrong. The RISC-V Debug Specification\n1.0 says that \"while [a] reset is on-going, harts are either in the\nrunning state ... or in the unavailable state\", meaning allunavail is\nnot guaranteed to be asserted at all! We should stop waiting only when\nboth conditions are met.\n\nWe could in theory remove the allunavail check entirely, since the Debug\nSpecification 1.0 says that \"once a hart’s reset is complete, havereset\nbecomes set\". However, that wording was less clear in the 0.13 spec and\nat least one real chip (GD32VF103) asserts havereset before deasserting\nunavail. Since we can\u0027t do anything with an unavailable hart anyway, it\nseems harmless to keep the allunavail check to accommodate noncompliant\nimplementations.\n\nLink: https://github.com/riscv-collab/riscv-openocd/commit/1c168242e9f5 [1]\nFixes: 5754aebc4945 (\"target: riscv: Sync with the RISC-V fork\")\nSigned-off-by: Thomas Hebb \u003ctommyhebb@gmail.com\u003e\nChange-Id: Ie3b5fa48fedf240d89c61010995c0044d2b62804\n"}}},"requirements":[],"submit_records":[],"submit_requirements":[]}
