Deleted Added
sdiff udiff text old ( 7625:b1e69203bae9 ) new ( 7678:f19b6a3a8cec )
full compact
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

81 }
82
83 virtual bool isSoft()
84 {
85 return false;
86 }
87
88#if FULL_SYSTEM
89 void invoke(ThreadContext * tc);
90
91 virtual std::string describe() const;
92#endif
93 };
94
95 // Base class for x86 faults which behave as if the underlying instruction
96 // didn't happen.
97 class X86Fault : public X86FaultBase

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

109 {
110 protected:
111 X86Trap(const char * name, const char * mnem,
112 const uint8_t vector, uint64_t _errorCode = (uint64_t)-1)
113 : X86FaultBase(name, mnem, vector, _errorCode)
114 {}
115
116#if FULL_SYSTEM
117 void invoke(ThreadContext * tc);
118#endif
119 };
120
121 // Base class for x86 aborts which seem to be catastrophic failures.
122 class X86Abort : public X86FaultBase
123 {
124 protected:
125 X86Abort(const char * name, const char * mnem,
126 const uint8_t vector, uint64_t _errorCode = (uint64_t)-1)
127 : X86FaultBase(name, mnem, vector, _errorCode)
128 {}
129
130#if FULL_SYSTEM
131 void invoke(ThreadContext * tc);
132#endif
133 };
134
135 // Base class for x86 interrupts.
136 class X86Interrupt : public X86FaultBase
137 {
138 protected:
139 X86Interrupt(const char * name, const char * mnem,

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

145 class UnimpInstFault : public FaultBase
146 {
147 public:
148 const char * name() const
149 {
150 return "unimplemented_micro";
151 }
152
153 void invoke(ThreadContext * tc)
154 {
155 panic("Unimplemented instruction!");
156 }
157 };
158
159 static inline Fault genMachineCheckFault()
160 {
161 panic("Machine check fault not implemented in x86!\n");

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

322 code.present = present;
323 code.write = (mode == BaseTLB::Write);
324 code.user = user;
325 code.reserved = reserved;
326 code.fetch = (mode == BaseTLB::Execute);
327 errorCode = code;
328 }
329
330 void invoke(ThreadContext * tc);
331
332#if FULL_SYSTEM
333 virtual std::string describe() const;
334#endif
335 };
336
337 class X87FpExceptionPending : public X86Fault
338 {

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

392
393 class InitInterrupt : public X86Interrupt
394 {
395 public:
396 InitInterrupt(uint8_t _vector) :
397 X86Interrupt("INIT Interrupt", "#INIT", _vector)
398 {}
399
400 void invoke(ThreadContext * tc);
401 };
402
403 class StartupInterrupt : public X86Interrupt
404 {
405 public:
406 StartupInterrupt(uint8_t _vector) :
407 X86Interrupt("Startup Interrupt", "#SIPI", _vector)
408 {}
409
410 void invoke(ThreadContext * tc);
411 };
412
413 class SoftwareInterrupt : public X86Interrupt
414 {
415 public:
416 SoftwareInterrupt(uint8_t _vector) :
417 X86Interrupt("Software Interrupt", "#INTR", _vector)
418 {}
419
420 bool isSoft()
421 {
422 return true;
423 }
424 };
425};
426
427#endif // __ARCH_X86_FAULTS_HH__