Deleted Added
sdiff udiff text old ( 8568:83f728db3332 ) new ( 8570:ea93f18eead8 )
full compact
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<StoreAddressErrorFault>::vals =
65 { "Store Address Error", 0x0180 };
66
67template <> FaultVals MipsFault<SystemCallFault>::vals =
68 { "Syscall", 0x0180 };
69
70template <> FaultVals MipsFault<CoprocessorUnusableFault>::vals =
71 { "Coprocessor Unusable Fault", 0x180 };
72
73template <> FaultVals MipsFault<ReservedInstructionFault>::vals =
74 { "Reserved Instruction Fault", 0x0180 };

--- 97 unchanged lines hidden (view full) ---

172 HandlerBase = vect() + tc->readMiscReg(MISCREG_EBASE);
173 } else {
174 HandlerBase = 0xBFC00200;
175 }
176 setHandlerPC(HandlerBase, tc);
177}
178
179void
180StoreAddressErrorFault::invoke(ThreadContext *tc, StaticInstPtr inst)
181{
182 DPRINTF(MipsPRA, "%s encountered.\n", name());
183 setExceptionState(tc, 0x5);
184 tc->setMiscRegNoEffect(MISCREG_BADVADDR, badVAddr);
185
186 // Set new PC
187 Addr HandlerBase;
188 // Offset 0x180 - General Exception Vector
189 HandlerBase = vect() + tc->readMiscReg(MISCREG_EBASE);
190 setHandlerPC(HandlerBase, tc);
191}
192
193void
194TrapFault::invoke(ThreadContext *tc, StaticInstPtr inst)
195{
196 DPRINTF(MipsPRA, "%s encountered.\n", name());
197 setExceptionState(tc, 0xD);
198
199 // Set new PC
200 Addr HandlerBase;
201 // Offset 0x180 - General Exception Vector

--- 37 unchanged lines hidden (view full) ---

239 HandlerBase = vect() + tc->readMiscReg(MISCREG_EBASE);
240 setHandlerPC(HandlerBase, tc);
241}
242
243void
244AddressErrorFault::invoke(ThreadContext *tc, StaticInstPtr inst)
245{
246 DPRINTF(MipsPRA, "%s encountered.\n", name());
247 setExceptionState(tc, 0x4);
248 tc->setMiscRegNoEffect(MISCREG_BADVADDR, badVAddr);
249
250 // Set new PC
251 Addr HandlerBase;
252 // Offset 0x180 - General Exception Vector
253 HandlerBase = vect() + tc->readMiscReg(MISCREG_EBASE);
254 setHandlerPC(HandlerBase, tc);
255}
256

--- 220 unchanged lines hidden ---