interrupts.hh revision 5133
19646SChris.Emmons@arm.com/* 211898Ssudhanshu.jha@arm.com * Copyright (c) 2007 The Hewlett-Packard Development Company 39646SChris.Emmons@arm.com * All rights reserved. 49646SChris.Emmons@arm.com * 59646SChris.Emmons@arm.com * Redistribution and use of this software in source and binary forms, 69646SChris.Emmons@arm.com * with or without modification, are permitted provided that the 79646SChris.Emmons@arm.com * following conditions are met: 89646SChris.Emmons@arm.com * 99646SChris.Emmons@arm.com * The software must be used only for Non-Commercial Use which means any 109646SChris.Emmons@arm.com * use which is NOT directed to receiving any direct monetary 119646SChris.Emmons@arm.com * compensation for, or commercial advantage from such use. Illustrative 129646SChris.Emmons@arm.com * examples of non-commercial use are academic research, personal study, 139646SChris.Emmons@arm.com * teaching, education and corporate research & development. 149646SChris.Emmons@arm.com * Illustrative examples of commercial use are distributing products for 159646SChris.Emmons@arm.com * commercial advantage and providing services using the software for 169646SChris.Emmons@arm.com * commercial advantage. 179646SChris.Emmons@arm.com * 189646SChris.Emmons@arm.com * If you wish to use this software or functionality therein that may be 199646SChris.Emmons@arm.com * covered by patents for commercial use, please contact: 209646SChris.Emmons@arm.com * Director of Intellectual Property Licensing 219646SChris.Emmons@arm.com * Office of Strategy and Technology 229646SChris.Emmons@arm.com * Hewlett-Packard Company 239646SChris.Emmons@arm.com * 1501 Page Mill Road 249646SChris.Emmons@arm.com * Palo Alto, California 94304 259646SChris.Emmons@arm.com * 269646SChris.Emmons@arm.com * Redistributions of source code must retain the above copyright notice, 279646SChris.Emmons@arm.com * this list of conditions and the following disclaimer. Redistributions 289646SChris.Emmons@arm.com * in binary form must reproduce the above copyright notice, this list of 299646SChris.Emmons@arm.com * conditions and the following disclaimer in the documentation and/or 309646SChris.Emmons@arm.com * other materials provided with the distribution. Neither the name of 319646SChris.Emmons@arm.com * the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its 329646SChris.Emmons@arm.com * contributors may be used to endorse or promote products derived from 339646SChris.Emmons@arm.com * this software without specific prior written permission. No right of 349646SChris.Emmons@arm.com * sublicense is granted herewith. Derivatives of the software and 359646SChris.Emmons@arm.com * output created using the software may be prepared, but only for 369646SChris.Emmons@arm.com * Non-Commercial Uses. Derivatives of the software may be shared with 379646SChris.Emmons@arm.com * others provided: (i) the others agree to abide by the list of 3811090Sandreas.sandberg@arm.com * conditions herein which includes the Non-Commercial Use restrictions; 399646SChris.Emmons@arm.com * and (ii) such Derivatives of the software include the above copyright 409646SChris.Emmons@arm.com * notice to acknowledge the contribution from this software where 419646SChris.Emmons@arm.com * applicable, this list of conditions and the disclaimer below. 429646SChris.Emmons@arm.com * 439646SChris.Emmons@arm.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 449646SChris.Emmons@arm.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 459646SChris.Emmons@arm.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 469646SChris.Emmons@arm.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 479646SChris.Emmons@arm.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 489646SChris.Emmons@arm.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 499646SChris.Emmons@arm.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 509646SChris.Emmons@arm.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 519646SChris.Emmons@arm.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 529646SChris.Emmons@arm.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 539646SChris.Emmons@arm.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 549646SChris.Emmons@arm.com * 559646SChris.Emmons@arm.com * Authors: Gabe Black 569646SChris.Emmons@arm.com */ 579646SChris.Emmons@arm.com 589646SChris.Emmons@arm.com#ifndef __ARCH_X86_INTERRUPTS_HH__ 599646SChris.Emmons@arm.com#define __ARCH_X86_INTERRUPTS_HH__ 609646SChris.Emmons@arm.com 619646SChris.Emmons@arm.com#include "arch/x86/faults.hh" 629646SChris.Emmons@arm.com#include "cpu/thread_context.hh" 639646SChris.Emmons@arm.com 649646SChris.Emmons@arm.comnamespace X86ISA 6511090Sandreas.sandberg@arm.com{ 6611090Sandreas.sandberg@arm.com 6711090Sandreas.sandberg@arm.comclass Interrupts 6811090Sandreas.sandberg@arm.com{ 6911090Sandreas.sandberg@arm.com public: 7011090Sandreas.sandberg@arm.com Interrupts() 7111090Sandreas.sandberg@arm.com { 7211090Sandreas.sandberg@arm.com clear_all(); 7311090Sandreas.sandberg@arm.com } 749646SChris.Emmons@arm.com 759646SChris.Emmons@arm.com int InterruptLevel(uint64_t softint) 769646SChris.Emmons@arm.com { 779646SChris.Emmons@arm.com panic("Interrupts::InterruptLevel unimplemented!\n"); 789646SChris.Emmons@arm.com return 0; 799646SChris.Emmons@arm.com } 8010839Sandreas.sandberg@arm.com 819646SChris.Emmons@arm.com void post(int int_num, int index) 8210839Sandreas.sandberg@arm.com { 8310839Sandreas.sandberg@arm.com panic("Interrupts::post unimplemented!\n"); 8411359Sandreas@sandberg.pp.se } 859646SChris.Emmons@arm.com 8611090Sandreas.sandberg@arm.com void clear(int int_num, int index) 879646SChris.Emmons@arm.com { 889646SChris.Emmons@arm.com panic("Interrupts::clear unimplemented!\n"); 899646SChris.Emmons@arm.com } 9011090Sandreas.sandberg@arm.com 9111090Sandreas.sandberg@arm.com void clear_all() 929646SChris.Emmons@arm.com { 939646SChris.Emmons@arm.com warn("Interrupts::clear_all unimplemented!\n"); 949646SChris.Emmons@arm.com } 9511090Sandreas.sandberg@arm.com 9611090Sandreas.sandberg@arm.com bool check_interrupts(ThreadContext * tc) const 9711090Sandreas.sandberg@arm.com { 989646SChris.Emmons@arm.com panic("Interrupts::check_interrupts unimplemented!\n"); 9911168Sandreas.hansson@arm.com return false; 10011091Sandreas.sandberg@arm.com } 10111168Sandreas.hansson@arm.com 10211168Sandreas.hansson@arm.com Fault getInterrupt(ThreadContext * tc) 10311090Sandreas.sandberg@arm.com { 10411168Sandreas.hansson@arm.com panic("Interrupts::getInterrupt unimplemented!\n"); 10511090Sandreas.sandberg@arm.com return NoFault; 10611090Sandreas.sandberg@arm.com } 10711168Sandreas.hansson@arm.com 10811168Sandreas.hansson@arm.com void updateIntrInfo(ThreadContext * tc) 10911090Sandreas.sandberg@arm.com { 11011168Sandreas.hansson@arm.com panic("Interrupts::updateIntrInfo unimplemented!\n"); 11111090Sandreas.sandberg@arm.com } 11211090Sandreas.sandberg@arm.com 11311090Sandreas.sandberg@arm.com uint64_t get_vec(int int_num) 11411090Sandreas.sandberg@arm.com { 11511090Sandreas.sandberg@arm.com panic("Interrupts::get_vec unimplemented!\n"); 11611090Sandreas.sandberg@arm.com return 0; 11711090Sandreas.sandberg@arm.com } 11811090Sandreas.sandberg@arm.com 11911898Ssudhanshu.jha@arm.com void serialize(std::ostream & os) 12011090Sandreas.sandberg@arm.com { 12111090Sandreas.sandberg@arm.com panic("Interrupts::serialize unimplemented!\n"); 1229646SChris.Emmons@arm.com } 1239646SChris.Emmons@arm.com 1249646SChris.Emmons@arm.com void unserialize(Checkpoint * cp, const std::string & section) 1259646SChris.Emmons@arm.com { 1269646SChris.Emmons@arm.com panic("Interrupts::unserialize unimplemented!\n"); 1279646SChris.Emmons@arm.com } 1289646SChris.Emmons@arm.com}; 1299646SChris.Emmons@arm.com 1309646SChris.Emmons@arm.com}; 1319646SChris.Emmons@arm.com 1329646SChris.Emmons@arm.com#endif // __ARCH_X86_INTERRUPTS_HH__ 1339646SChris.Emmons@arm.com