forked from riscv-collab/riscv-openocd
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
Showing
1 changed file
with
90 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters