You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The task is to move handling of a target coming out of reset from deassert_reset() to poll(). This will also allow to drop the awkward handling of an unexpected reset in riscv013_get_hart_state():
Well at least Cortex-Ms deassert_reset() leaves TARGET_RESET state until poll() detects that CPU runs or is halted.
Unlike this Cortex-A calls poll() in deassert_reset() to update the state immediately.
RISC-V has much better designed req - ack structure of control/status and we are able to detect that reset is done.
Yes, I can imagine deassert_reset() just clears NMDRESET and the rest of processing is done in the following poll().
Anyway the reset assert/deassert implementation in OpenOCD has serious shortcomings for multi-cores and needs significant rewrite. I tried once, but don't have enough power to uphold it.
Currently there is a loop in
deassert_reset()
handler that waits for the hart to come out of reset.riscv-openocd/src/target/riscv/riscv-013.c
Lines 2930 to 2953 in e870c5f
This is not necessary -- there is a call to
arp_waitstate
:riscv-openocd/src/target/startup.tcl
Line 140 in e870c5f
The task is to move handling of a target coming out of reset from
deassert_reset()
topoll()
. This will also allow to drop the awkward handling of an unexpected reset inriscv013_get_hart_state()
:riscv-openocd/src/target/riscv/riscv-013.c
Lines 2716 to 2737 in e870c5f
The text was updated successfully, but these errors were encountered: