Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target/riscv: check misa value before reporting #1112

Merged
merged 1 commit into from
Sep 6, 2024

Commits on Sep 5, 2024

  1. 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>
    en-sc committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    6c021da View commit details
    Browse the repository at this point in the history