Quentin Forcioli has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/49987 )

Change subject: arch-arm: Fixed EL2S system register trapping.
......................................................................

arch-arm: Fixed EL2S system register trapping.

Prevent a disabled El2S from trapping a system register access from EL1S
This commit is part of series of commit to enable booting OPTEE on gem5.

Change-Id: I0258e15b21dd6a69a3e29e88b753825fad648cfd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49987
Reviewed-by: Giacomo Travaglini <[email protected]>
Maintainer: Giacomo Travaglini <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/arm/insts/misc64.cc
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Giacomo Travaglini: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/arch/arm/insts/misc64.cc b/src/arch/arm/insts/misc64.cc
index 0f301b0..bee1a41 100644
--- a/src/arch/arm/insts/misc64.cc
+++ b/src/arch/arm/insts/misc64.cc
@@ -419,7 +419,7 @@
         break;
        // Generic Timer
       case MISCREG_CNTFRQ_EL0 ... MISCREG_CNTVOFF_EL2:
-        trap_to_hyp = el <= EL1 &&
+        trap_to_hyp = EL2Enabled(tc) && el <= EL1 &&
                       isGenericTimerSystemAccessTrapEL2(misc_reg, tc);
         break;
       case MISCREG_DAIF:

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49987
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I0258e15b21dd6a69a3e29e88b753825fad648cfd
Gerrit-Change-Number: 49987
Gerrit-PatchSet: 2
Gerrit-Owner: Quentin Forcioli <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Quentin Forcioli <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to