diff options
author | Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> | 2024-08-09 16:13:39 +0300 |
---|---|---|
committer | Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> | 2024-09-05 11:56:59 +0300 |
commit | 6c021da8cc53b43a9fb9a43af57027192a89c823 (patch) | |
tree | 5300a617da8336d519d104c06d69d56fb25eaf2f /git-hooks/commit-msg | |
parent | 909bbb899b9855f863bbc46eee08fd03e613d157 (diff) | |
download | riscv-openocd-6c021da8cc53b43a9fb9a43af57027192a89c823.zip riscv-openocd-6c021da8cc53b43a9fb9a43af57027192a89c823.tar.gz riscv-openocd-6c021da8cc53b43a9fb9a43af57027192a89c823.tar.bz2 |
target/riscv: check `misa` value before reporting
Currently, during register file examination:
1. A read of an XPR is attempted via 64-bit abstract access.
2. If such a read fails (e.g. connection unstable) XLEN is assumed to be
32.
3. Then `misa` is read. Since `misa` is a CSR and it may be only
readable via program buffer, `s0` should be readable beforehand (at
least some assumption about `xlen` should be made).
4. Before the commit, the `misa.mxl` field was not checked against
`xlen`, therefore erroneous info may have been reported to the user.
Moreover, the `examine()` would pass indicating no error at all.
5. After the commit, `misa.mxl` is checked against `xlen` value.
Change-Id: I3fe5bd6742e564e6de782aad9ed10e65c0728923
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Diffstat (limited to 'git-hooks/commit-msg')
0 files changed, 0 insertions, 0 deletions