Skip to content

Implement proper mret when mcause.minhv==1 #498

@silabs-oysteink

Description

@silabs-oysteink

If mcause.minhv is set when we execute an mret, we shall not restore the pc to the contents of mepc, but instead do a pointer fetch M[mepc] as for the CLIC pointer fetch as a data access with lsu privilege.

To achieve this, the pipeline must be stalled until EX and WB are empty before starting the pointer fetch. This is because any instructions in EX or WB may still cause exceptions, and the pointer fetch would use the state POINTER_FETCH in the controller - which does not handle exceptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status:ResolvedIssue has been resolved, but closure is pending on git merge and/or issuer confirmation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions