zero-day-labs / riscv-iommu

IOMMU IP compliant with the RISC-V IOMMU Specification v1.0
Apache License 2.0
66 stars 12 forks source link

Not throwing error when DC is misconfigured with InclPC == 1 #22

Closed mhayat-10xe closed 2 days ago

mhayat-10xe commented 2 months ago

The specs stated in section 2.1.4 "Device-context configuration checks" that:

A DC with DC.tc.V=1 is considered as misconfigured if any of the following conditions are true. If misconfigured then, stop and report "DDT entry misconfigured" (cause = 259).

  1. If any bits or encodings that are reserved for future standard use are set.

Here is the counter-example of the violation of specs, in the 8th cycle when InclPc ==1, dc.tc.pdtv == 1, and pdtp.mode == 10 which is a reserved number so it should give an error due to using that reserved number and cause_code should be "DDT entry misconfigured" but RTL is not giving any error which is wrong.

image

malejo97 commented 2 days ago

Fixed in #24. Thanks! @mhayat-10xe