Skip to content

Reporting xTVAL for Trap=true? #17

@arichardson

Description

@arichardson

I just had a test case where QEMU and sail reported different trap register numbers for a CHERI exception, but that will only be found if you insert an explicit .4byte 0x343020f3 # (csrrs x1, mtval (0x343), x0 (and we might not always be in m-mode).

It might be a good idea to somehow report the xTVAL value for traps so that we don't have to rely on an explicit CSR read being inserted afterwards.
This would be extremely useful to compare CHERI exception codes and registers now that this is reported in xTVAL.

I believe for trap=true rvfi_dii_rd_wdata is always zero, could we change this to report xTVAL?

Metadata

Metadata

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