Skip to content

Commit

Permalink
PTW: set ae_ptw for out-of-range non-leaf PTEs (#3407)
Browse files Browse the repository at this point in the history
For PTEs whose physical address is out-of-range, we need to set
`ae_ptw` instead of `ae_final` to raise access-fault.

Because non-leaf PTEs will not have R or X bits set, `ae_final`
will be overrided by page-fault exceptions.
  • Loading branch information
poemonsense committed Jul 11, 2023
1 parent 005c6db commit b8dad7f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/scala/rocket/PTW.scala
Expand Up @@ -720,6 +720,7 @@ class PTW(n: Int)(implicit edge: TLEdgeOut, p: Parameters) extends CoreModule()(
resp_valid(r_req_dest) := true.B
}

resp_ae_ptw := ae && count < (pgLevels-1).U && pte.table()
resp_ae_final := ae
resp_pf := pf && !stage2
resp_gf := gf || (pf && stage2)
Expand Down

0 comments on commit b8dad7f

Please sign in to comment.