From 1a7a96c3a5f648e66d0fffa7b6db6637fcb8bc89 Mon Sep 17 00:00:00 2001 From: John Ingalls Date: Tue, 23 Apr 2024 11:29:59 -0700 Subject: [PATCH] PTW: traverse check GPA bits higher than HGATP mode only if valid --- src/main/scala/rocket/PTW.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/rocket/PTW.scala b/src/main/scala/rocket/PTW.scala index 91b9a7bb2f1..04b693bedff 100644 --- a/src/main/scala/rocket/PTW.scala +++ b/src/main/scala/rocket/PTW.scala @@ -694,7 +694,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