Hello Andreas Sandberg,

I'd like you to do a code review. Please visit

    https://gem5-review.googlesource.com/8041

to review the following change.


Change subject: arch-arm: Correct SecureMonitorTrap vals for aarch32
......................................................................

arch-arm: Correct SecureMonitorTrap vals for aarch32

This patch replaces the dummy values which were defined for the
SecureMonitorTrap thus enabling its usage in aarch32 mode.  1) It
changes the vector table offset from 0x14 to 0x4 in compliance with the
armv8 documentation.  2) When trapping in monitor mode for aarch32, the
mon_lr is updated with the pc + a non zero offset (+4/2 depending on the
current instruction set: +4 for A32, +2 for T32).

Change-Id: I01e1e52bf5ecd405e7472e31e01cf9a599153b08
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandb...@arm.com>
---
M src/arch/arm/faults.cc
1 file changed, 4 insertions(+), 5 deletions(-)



diff --git a/src/arch/arm/faults.cc b/src/arch/arm/faults.cc
index 27894e0..b3c1b07 100644
--- a/src/arch/arm/faults.cc
+++ b/src/arch/arm/faults.cc
@@ -237,6 +237,10 @@
     "Hypervisor Trap",       0x014, 0x000, 0x200, 0x400, 0x600, MODE_HYP,
     0, 0, 0, 0, false, false, false, EC_UNKNOWN, FaultStat()
 };
+template<> ArmFault::FaultVals ArmFaultVals<SecureMonitorTrap>::vals = {
+    "Secure Monitor Trap",   0x004, 0x000, 0x200, 0x400, 0x600, MODE_MON,
+    4, 2, 0, 0, false, false, false, EC_UNKNOWN, FaultStat()
+};
 template<> ArmFault::FaultVals ArmFaultVals<Interrupt>::vals = {
     "IRQ",                   0x018, 0x080, 0x280, 0x480, 0x680, MODE_IRQ,
     4, 4, 0, 0, false, true,  false, EC_UNKNOWN, FaultStat()
@@ -258,11 +262,6 @@
     "Supervisor Trap",   0x014, 0x000, 0x200, 0x400, 0x600, MODE_SVC,
     0, 0, 0, 0, false, false, false, EC_UNKNOWN, FaultStat()
 };
-template<> ArmFault::FaultVals ArmFaultVals<SecureMonitorTrap>::vals = {
-    // Some dummy values (SecureMonitorTrap is AArch64-only)
-    "Secure Monitor Trap",   0x014, 0x000, 0x200, 0x400, 0x600, MODE_MON,
-    0, 0, 0, 0, false, false, false, EC_UNKNOWN, FaultStat()
-};
 template<> ArmFault::FaultVals ArmFaultVals<PCAlignmentFault>::vals = {
     // Some dummy values (PCAlignmentFault is AArch64-only)
     "PC Alignment Fault",   0x000, 0x000, 0x200, 0x400, 0x600, MODE_SVC,

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

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I01e1e52bf5ecd405e7472e31e01cf9a599153b08
Gerrit-Change-Number: 8041
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to