summaryrefslogtreecommitdiff
path: root/src/arch/sparc/faults.cc
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-12-09 18:00:49 -0500
committerAli Saidi <saidi@eecs.umich.edu>2006-12-09 18:00:49 -0500
commit2eef266c4587906601ab40b611695e781c4945dc (patch)
treeeaec61c3a86fa49eda4ac14a2ce9a63099a84423 /src/arch/sparc/faults.cc
parent369e10d95adb45da7a791e6e8a6a4ced64892f14 (diff)
parent81a00fdcfef4ecffd57a909db67ca0ff3b99de3a (diff)
downloadgem5-2eef266c4587906601ab40b611695e781c4945dc.tar.xz
Merge zizzer:/bk/sparcfs
into zeep.pool:/z/saidi/work/m5.newmem --HG-- extra : convert_revision : c51fd95f7acd7cffb3ea705d7216772f0a801844
Diffstat (limited to 'src/arch/sparc/faults.cc')
-rw-r--r--src/arch/sparc/faults.cc20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/arch/sparc/faults.cc b/src/arch/sparc/faults.cc
index 78b2b4b76..64cfc832a 100644
--- a/src/arch/sparc/faults.cc
+++ b/src/arch/sparc/faults.cc
@@ -551,34 +551,26 @@ void SparcFaultBase::invoke(ThreadContext * tc)
PrivilegeLevel level = getNextLevel(current);
- if(HPSTATE & (1 << 5) || TL == MaxTL - 1)
- {
+ if(HPSTATE & (1 << 5) || TL == MaxTL - 1) {
getREDVector(5, PC, NPC);
doREDFault(tc, TT);
//This changes the hpstate and pstate, so we need to make sure we
//save the old version on the trap stack in doREDFault.
enterREDState(tc);
- }
- else if(TL == MaxTL)
- {
+ } else if(TL == MaxTL) {
panic("Should go to error state here.. crap\n");
//Do error_state somehow?
//Probably inject a WDR fault using the interrupt mechanism.
//What should the PC and NPC be set to?
- }
- else if(TL > MaxPTL && level == Privileged)
- {
+ } else if(TL > MaxPTL && level == Privileged) {
//guest_watchdog fault
doNormalFault(tc, trapType(), true);
getHyperVector(tc, PC, NPC, 2);
- }
- else if(level == Hyperprivileged)
- {
+ } else if(level == Hyperprivileged ||
+ level == Privileged && trapType() >= 384) {
doNormalFault(tc, trapType(), true);
getHyperVector(tc, PC, NPC, trapType());
- }
- else
- {
+ } else {
doNormalFault(tc, trapType(), false);
getPrivVector(tc, PC, NPC, trapType(), TL+1);
}