Skip to content

mstatus.MDT/MIE need additional behavior #2421

Description

Per spec:

Upon reset, the MDT field is set to 1. When the MDT bit is set to 1 by an explicit CSR write, the MIE bit is cleared to 0. For RV64, this clearing occurs regardless of the value written, if any, to the MIE bit by the same write. The MIE bit can only be set to 1 by an explicit CSR write if the MDT bit is already 0 or, for RV64, is being set to 0 by the same write (For RV32, the MDT bit is in mstatush and the MIE bit in mstatus register).

Most of that will be fairly straightforward.

Difficult is "clearing [MIE] occurs regardless of the value written to the MIE bit ... by the same write".

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions