Commit 8d660ea9 authored by Evgeniy Naydanov's avatar Evgeniy Naydanov
Browse files

target/riscv: refactor read_memory_progbuf()



There were a couple of problems with previous implementation:

* Misalligned read would return ERROR_OK and print all zeroes.

* CMDERR_BUSY for abstract access was improperly handled:

According to the spec, no assumptions can be made about DM_DATA*
contents in such a case, but these were considered valid values from
memory.

* A fallback to one element read was implemented when DMI_STATUS_BUSY
occurred during batch reads, even though this can be accounted for.

Change-Id: I09174c61c951b2bb97a529b7f0aa5afaa995179b
Signed-off-by: default avatarEvgeniy Naydanov <evgeniy.naydanov@syntacore.com>
parent 92c03192
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment