Skip to content

Commit

Permalink
PTW: set ae_ptw for out-of-range non-leaf PTEs (#3407) (#3410)
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.

(cherry picked from commit b8dad7f)

Co-authored-by: Yinan Xu <xuyinan@ict.ac.cn>
  • Loading branch information
mergify[bot] and poemonsense authored Jul 25, 2023
1 parent 836be7a commit 281e5c8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/scala/rocket/PTW.scala
Original file line number Diff line number Diff line change
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 281e5c8

Please sign in to comment.