faults.hh revision 4150
12623SN/A/* 22623SN/A * Copyright (c) 2007 The Hewlett-Packard Development Company 32623SN/A * All rights reserved. 42623SN/A * 52623SN/A * Redistribution and use of this software in source and binary forms, 62623SN/A * with or without modification, are permitted provided that the 72623SN/A * following conditions are met: 82623SN/A * 92623SN/A * The software must be used only for Non-Commercial Use which means any 102623SN/A * use which is NOT directed to receiving any direct monetary 112623SN/A * compensation for, or commercial advantage from such use. Illustrative 122623SN/A * examples of non-commercial use are academic research, personal study, 132623SN/A * teaching, education and corporate research & development. 142623SN/A * Illustrative examples of commercial use are distributing products for 152623SN/A * commercial advantage and providing services using the software for 162623SN/A * commercial advantage. 172623SN/A * 182623SN/A * If you wish to use this software or functionality therein that may be 192623SN/A * covered by patents for commercial use, please contact: 202623SN/A * Director of Intellectual Property Licensing 212623SN/A * Office of Strategy and Technology 222623SN/A * Hewlett-Packard Company 232623SN/A * 1501 Page Mill Road 242623SN/A * Palo Alto, California 94304 252623SN/A * 262623SN/A * Redistributions of source code must retain the above copyright notice, 272665Ssaidi@eecs.umich.edu * this list of conditions and the following disclaimer. Redistributions 282665Ssaidi@eecs.umich.edu * in binary form must reproduce the above copyright notice, this list of 292623SN/A * conditions and the following disclaimer in the documentation and/or 302623SN/A * other materials provided with the distribution. Neither the name of 312623SN/A * the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its 322623SN/A * contributors may be used to endorse or promote products derived from 332623SN/A * this software without specific prior written permission. No right of 342623SN/A * sublicense is granted herewith. Derivatives of the software and 352623SN/A * output created using the software may be prepared, but only for 362623SN/A * Non-Commercial Uses. Derivatives of the software may be shared with 372623SN/A * others provided: (i) the others agree to abide by the list of 382623SN/A * conditions herein which includes the Non-Commercial Use restrictions; 392623SN/A * and (ii) such Derivatives of the software include the above copyright 402856Srdreslin@umich.edu * notice to acknowledge the contribution from this software where 412856Srdreslin@umich.edu * applicable, this list of conditions and the disclaimer below. 422856Srdreslin@umich.edu * 432856Srdreslin@umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 442856Srdreslin@umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 452856Srdreslin@umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 462856Srdreslin@umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 472856Srdreslin@umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 482856Srdreslin@umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 492856Srdreslin@umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 502623SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 512623SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 522623SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 532623SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 542623SN/A * 552623SN/A * Authors: Gabe Black 562680Sktlim@umich.edu */ 572680Sktlim@umich.edu 582623SN/A#ifndef __ARCH_X86_FAULTS_HH__ 592623SN/A#define __ARCH_X86_FAULTS_HH__ 602680Sktlim@umich.edu 612623SN/A#include "base/misc.hh" 622623SN/A#include "sim/faults.hh" 632623SN/A 642623SN/Anamespace X86ISA 652623SN/A{ 662630SN/A class X86Fault : public FaultBase 672623SN/A { 682623SN/A void invoke(ThreadContext * tc) 692623SN/A { 702623SN/A panic("X86 faults are not implemented!"); 712623SN/A } 722623SN/A }; 732630SN/A 742623SN/A static inline Fault genPageTableFault(Addr va) 752623SN/A { 762623SN/A panic("Page table fault not implemented in x86!\n"); 772623SN/A } 782623SN/A 792623SN/A static inline Fault genMachineCheckFault() 802623SN/A { 812631SN/A panic("Machine check fault not implemented in x86!\n"); 822631SN/A } 832631SN/A 842623SN/A static inline Fault genAlignmentFault() 852623SN/A { 862623SN/A panic("Alignment fault not implemented (or for the most part existant) in x86!\n"); 872623SN/A } 882623SN/A}; 892623SN/A 902623SN/A#endif // __ARCH_X86_FAULTS_HH__ 912623SN/A