zero-day-labs / riscv-aia

AIA IP compliant with the RISC-V AIA spec
Apache License 2.0
29 stars 7 forks source link

imsic_regmap address mapping and read support #5

Closed gokhankaplayan closed 3 months ago

gokhankaplayan commented 1 year ago

imsic_regmap.sv file implements the read accesses. But, the only memory regions in IMSIC address space returns zero according to spec:

A read of seteipnum_le or seteipnum_be returns zero in all cases.

What is the reason for the read support (debug purpose)? From my perspective, It creates additional attack surface and compatibility issue with AIA Spec.

The addresses are hard-coded (e.g M-file: h24000000), can we please make it RTL configurable? I can also create PR for that if it is better for you.

D3boker1 commented 11 months ago

Hi @gokhankaplayan!

Sorry for the delay.

The read logic is there for debug purposes only, but I need to agree with you, and we should remove it.

Regarding the MSI address configurability, it is not my main priority right now, so it would be great if you could send a PR!

D3boker1 commented 8 months ago

Hi again @gokhankaplayan!

It's been a long time, but we're finally back to developing AIA IP!

What is the reason for the read support (debug purpose)? From my perspective, It creates additional attack surface and compatibility issue with AIA Spec.

Regarding the read logic in IMSIC, I've now made a commit to solve the problem!

The addresses are hard-coded (e.g M-file: h24000000), can we please make it RTL configurable? I can also create PR for that if it is better for you.

Regarding the configuration of the MSI address, can you send a PR to support this feature as you suggested? It would be much appreciated :D