Skip to content

Accessing pmpcfg1 on RV64 is not an illegal instruction #270

Description

@kkapapu

Describe the bug

csrr a0, pmpcfg1

NutShell treats pmpcfg1 as a legal CSR and commits the instruction.

Expected behavior

RISC-V Privileged Spec CSR table: pmpcfg1 and pmpcfg3 are RV32 only. On RV64, access must raise illegal-instruction.

Expected: mcause=2, mtval=0x3a102573
Actual: mcause=0, the CSR read commits
CSR.scala still contains MaskedRegMap(Pmpcfg1, pmpcfg1) (and Pmpcfg3).

Environment

NutShell: 041f694

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions