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 StaticInstPtr inst = StaticInst::nullStaticInstPtr); |
91 92 virtual std::string describe() const; 93#endif 94 }; 95 96 // Base class for x86 faults which behave as if the underlying instruction 97 // didn't happen. 98 class X86Fault : public X86FaultBase --- 11 unchanged lines hidden (view full) --- 110 { 111 protected: 112 X86Trap(const char * name, const char * mnem, 113 const uint8_t vector, uint64_t _errorCode = (uint64_t)-1) 114 : X86FaultBase(name, mnem, vector, _errorCode) 115 {} 116 117#if FULL_SYSTEM |
118 void invoke(ThreadContext * tc, 119 StaticInstPtr inst = StaticInst::nullStaticInstPtr); |
120#endif 121 }; 122 123 // Base class for x86 aborts which seem to be catastrophic failures. 124 class X86Abort : public X86FaultBase 125 { 126 protected: 127 X86Abort(const char * name, const char * mnem, 128 const uint8_t vector, uint64_t _errorCode = (uint64_t)-1) 129 : X86FaultBase(name, mnem, vector, _errorCode) 130 {} 131 132#if FULL_SYSTEM |
133 void invoke(ThreadContext * tc, 134 StaticInstPtr inst = StaticInst::nullStaticInstPtr); |
135#endif 136 }; 137 138 // Base class for x86 interrupts. 139 class X86Interrupt : public X86FaultBase 140 { 141 protected: 142 X86Interrupt(const char * name, const char * mnem, --- 5 unchanged lines hidden (view full) --- 148 class UnimpInstFault : public FaultBase 149 { 150 public: 151 const char * name() const 152 { 153 return "unimplemented_micro"; 154 } 155 |
156 void invoke(ThreadContext * tc, 157 StaticInstPtr inst = StaticInst::nullStaticInstPtr) |
158 { 159 panic("Unimplemented instruction!"); 160 } 161 }; 162 163 static inline Fault genMachineCheckFault() 164 { 165 panic("Machine check fault not implemented in x86!\n"); --- 160 unchanged lines hidden (view full) --- 326 code.present = present; 327 code.write = (mode == BaseTLB::Write); 328 code.user = user; 329 code.reserved = reserved; 330 code.fetch = (mode == BaseTLB::Execute); 331 errorCode = code; 332 } 333 |
334 void invoke(ThreadContext * tc, 335 StaticInstPtr inst = StaticInst::nullStaticInstPtr); |
336 337#if FULL_SYSTEM 338 virtual std::string describe() const; 339#endif 340 }; 341 342 class X87FpExceptionPending : public X86Fault 343 { --- 53 unchanged lines hidden (view full) --- 397 398 class InitInterrupt : public X86Interrupt 399 { 400 public: 401 InitInterrupt(uint8_t _vector) : 402 X86Interrupt("INIT Interrupt", "#INIT", _vector) 403 {} 404 |
405 void invoke(ThreadContext * tc, 406 StaticInstPtr inst = StaticInst::nullStaticInstPtr); |
407 }; 408 409 class StartupInterrupt : public X86Interrupt 410 { 411 public: 412 StartupInterrupt(uint8_t _vector) : 413 X86Interrupt("Startup Interrupt", "#SIPI", _vector) 414 {} 415 |
416 void invoke(ThreadContext * tc, 417 StaticInstPtr inst = StaticInst::nullStaticInstPtr); |
418 }; 419 420 class SoftwareInterrupt : public X86Interrupt 421 { 422 public: 423 SoftwareInterrupt(uint8_t _vector) : 424 X86Interrupt("Software Interrupt", "#INTR", _vector) 425 {} 426 427 bool isSoft() 428 { 429 return true; 430 } 431 }; 432}; 433 434#endif // __ARCH_X86_FAULTS_HH__ |