1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * Copyright (c) 2007 MIPS Technologies, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 47 unchanged lines hidden (view full) --- 56 { "Reset Fault", 0xBFC00000}; 57#else 58 { "Reset Fault", 0x001}; 59#endif 60 61template <> FaultVals MipsFault<AddressErrorFault>::vals = 62 { "Address Error", 0x0180 }; 63 |
64template <> FaultVals MipsFault<SystemCallFault>::vals = 65 { "Syscall", 0x0180 }; 66 67template <> FaultVals MipsFault<CoprocessorUnusableFault>::vals = 68 { "Coprocessor Unusable Fault", 0x180 }; 69 70template <> FaultVals MipsFault<ReservedInstructionFault>::vals = 71 { "Reserved Instruction Fault", 0x0180 }; --- 97 unchanged lines hidden (view full) --- 169 HandlerBase = vect() + tc->readMiscReg(MISCREG_EBASE); 170 } else { 171 HandlerBase = 0xBFC00200; 172 } 173 setHandlerPC(HandlerBase, tc); 174} 175 176void |
177TrapFault::invoke(ThreadContext *tc, StaticInstPtr inst) 178{ 179 DPRINTF(MipsPRA, "%s encountered.\n", name()); 180 setExceptionState(tc, 0xD); 181 182 // Set new PC 183 Addr HandlerBase; 184 // Offset 0x180 - General Exception Vector --- 37 unchanged lines hidden (view full) --- 222 HandlerBase = vect() + tc->readMiscReg(MISCREG_EBASE); 223 setHandlerPC(HandlerBase, tc); 224} 225 226void 227AddressErrorFault::invoke(ThreadContext *tc, StaticInstPtr inst) 228{ 229 DPRINTF(MipsPRA, "%s encountered.\n", name()); |
230 setExceptionState(tc, store ? 0x5 : 0x4); 231 tc->setMiscRegNoEffect(MISCREG_BADVADDR, vaddr); |
232 233 // Set new PC 234 Addr HandlerBase; 235 // Offset 0x180 - General Exception Vector 236 HandlerBase = vect() + tc->readMiscReg(MISCREG_EBASE); 237 setHandlerPC(HandlerBase, tc); 238} 239 --- 220 unchanged lines hidden --- |