Skip to content

Commit

Permalink
Merge pull request #3625 from chipsalliance/ptw_gf
Browse files Browse the repository at this point in the history
PTW: traverse check GPA bits higher than HGATP mode only if valid
  • Loading branch information
jerryz123 authored Apr 23, 2024
2 parents d8de943 + 1a7a96c commit 0c510ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/rocket/PTW.scala
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ class PTW(n: Int)(implicit edge: TLEdgeOut, p: Parameters) extends CoreModule()(
when (do_both_stages && !stage2) { do_switch := true.B }
count := count + 1.U
}.otherwise {
val gf = stage2 && !stage2_final && !pte.ur()
val gf = (stage2 && !stage2_final && !pte.ur()) || (pte.v && pte.reserved_for_future === 0.U && invalid_gpa)
val ae = pte.v && invalid_paddr
val pf = pte.v && pte.reserved_for_future =/= 0.U
val success = pte.v && !ae && !pf && !gf
Expand Down

0 comments on commit 0c510ec

Please sign in to comment.