Skip to content

Finalize sub-exception code reporting mechanism #536

Open
@arichardson

Description

@arichardson

This is a question for ARC review.

In the current CHERI specification, we report an exception sub-code in mtval2/stval2/etc. The upside of this approach is that it does not impact other extensions, but the downside is that we add new CSRs that were not previously required just to report a few bits of extra information.

Would it be cleaner to reserve the high 8 or 16 bits of the *cause CSR to report this additional sub-cause? mcause >= 64 is reserved, so this could be possible? Thena CHERI-aware operating system could to check cause & 0xffffff in the trap handler and obtain the remaining information form cause & 0xff000000 instead of having to read the new *tval2 register.

This would also make it easier to reuse the software check exception code instead of the custom 0x1c (#60).

Original discussion: #379 (review)?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions