interrupts.hh revision 5133:a88763dd4a84
18870SAli.Saidi@ARM.com/* 27090SN/A * Copyright (c) 2007 The Hewlett-Packard Development Company 37090SN/A * All rights reserved. 47090SN/A * 57090SN/A * Redistribution and use of this software in source and binary forms, 67090SN/A * with or without modification, are permitted provided that the 77090SN/A * following conditions are met: 87090SN/A * 97090SN/A * The software must be used only for Non-Commercial Use which means any 107090SN/A * use which is NOT directed to receiving any direct monetary 117090SN/A * compensation for, or commercial advantage from such use. Illustrative 127090SN/A * examples of non-commercial use are academic research, personal study, 134486SN/A * teaching, education and corporate research & development. 144486SN/A * Illustrative examples of commercial use are distributing products for 154486SN/A * commercial advantage and providing services using the software for 164486SN/A * commercial advantage. 174486SN/A * 184486SN/A * If you wish to use this software or functionality therein that may be 194486SN/A * covered by patents for commercial use, please contact: 204486SN/A * Director of Intellectual Property Licensing 214486SN/A * Office of Strategy and Technology 224486SN/A * Hewlett-Packard Company 234486SN/A * 1501 Page Mill Road 244486SN/A * Palo Alto, California 94304 254486SN/A * 264486SN/A * Redistributions of source code must retain the above copyright notice, 274486SN/A * this list of conditions and the following disclaimer. Redistributions 284486SN/A * in binary form must reproduce the above copyright notice, this list of 294486SN/A * conditions and the following disclaimer in the documentation and/or 304486SN/A * other materials provided with the distribution. Neither the name of 314486SN/A * the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its 324486SN/A * contributors may be used to endorse or promote products derived from 334486SN/A * this software without specific prior written permission. No right of 344486SN/A * sublicense is granted herewith. Derivatives of the software and 354486SN/A * output created using the software may be prepared, but only for 364486SN/A * Non-Commercial Uses. Derivatives of the software may be shared with 374486SN/A * others provided: (i) the others agree to abide by the list of 384486SN/A * conditions herein which includes the Non-Commercial Use restrictions; 397584SAli.Saidi@arm.com * and (ii) such Derivatives of the software include the above copyright 407584SAli.Saidi@arm.com * notice to acknowledge the contribution from this software where 417754SWilliam.Wang@arm.com * applicable, this list of conditions and the disclaimer below. 424486SN/A * 433630SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 443630SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 457587SAli.Saidi@arm.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 468525SAli.Saidi@ARM.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 478525SAli.Saidi@ARM.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 488212SAli.Saidi@ARM.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 495478SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 505478SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 517584SAli.Saidi@arm.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 528931Sandreas.hansson@arm.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 539525SAndreas.Sandberg@ARM.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 543630SN/A * 557584SAli.Saidi@arm.com * Authors: Gabe Black 567584SAli.Saidi@arm.com */ 577584SAli.Saidi@arm.com 589338SAndreas.Sandberg@arm.com#ifndef __ARCH_X86_INTERRUPTS_HH__ 597584SAli.Saidi@arm.com#define __ARCH_X86_INTERRUPTS_HH__ 603898SN/A 617950SAli.Saidi@ARM.com#include "arch/x86/faults.hh" 627950SAli.Saidi@ARM.com#include "cpu/thread_context.hh" 637950SAli.Saidi@ARM.com 649338SAndreas.Sandberg@arm.comnamespace X86ISA 659525SAndreas.Sandberg@ARM.com{ 667950SAli.Saidi@ARM.com 677950SAli.Saidi@ARM.comclass Interrupts 687950SAli.Saidi@ARM.com{ 697950SAli.Saidi@ARM.com public: 707587SAli.Saidi@arm.com Interrupts() 717587SAli.Saidi@arm.com { 727587SAli.Saidi@arm.com clear_all(); 739338SAndreas.Sandberg@arm.com } 747753SWilliam.Wang@arm.com 757753SWilliam.Wang@arm.com int InterruptLevel(uint64_t softint) 769525SAndreas.Sandberg@ARM.com { 777753SWilliam.Wang@arm.com panic("Interrupts::InterruptLevel unimplemented!\n"); 787587SAli.Saidi@arm.com return 0; 797587SAli.Saidi@arm.com } 808282SAli.Saidi@ARM.com 818282SAli.Saidi@ARM.com void post(int int_num, int index) 829338SAndreas.Sandberg@arm.com { 838282SAli.Saidi@ARM.com panic("Interrupts::post unimplemented!\n"); 847584SAli.Saidi@arm.com } 857584SAli.Saidi@arm.com 869338SAndreas.Sandberg@arm.com void clear(int int_num, int index) 878524SAli.Saidi@ARM.com { 888524SAli.Saidi@ARM.com panic("Interrupts::clear unimplemented!\n"); 898299Schander.sudanthi@arm.com } 907584SAli.Saidi@arm.com 917584SAli.Saidi@arm.com void clear_all() 927584SAli.Saidi@arm.com { 939338SAndreas.Sandberg@arm.com warn("Interrupts::clear_all unimplemented!\n"); 947584SAli.Saidi@arm.com } 957584SAli.Saidi@arm.com 967584SAli.Saidi@arm.com bool check_interrupts(ThreadContext * tc) const 977584SAli.Saidi@arm.com { 987584SAli.Saidi@arm.com panic("Interrupts::check_interrupts unimplemented!\n"); 999338SAndreas.Sandberg@arm.com return false; 1009525SAndreas.Sandberg@ARM.com } 1017584SAli.Saidi@arm.com 1027584SAli.Saidi@arm.com Fault getInterrupt(ThreadContext * tc) 1037584SAli.Saidi@arm.com { 1047584SAli.Saidi@arm.com panic("Interrupts::getInterrupt unimplemented!\n"); 1057584SAli.Saidi@arm.com return NoFault; 1067584SAli.Saidi@arm.com } 1079338SAndreas.Sandberg@arm.com 1089525SAndreas.Sandberg@ARM.com void updateIntrInfo(ThreadContext * tc) 1097584SAli.Saidi@arm.com { 1107584SAli.Saidi@arm.com panic("Interrupts::updateIntrInfo unimplemented!\n"); 1117584SAli.Saidi@arm.com } 1127584SAli.Saidi@arm.com 1137584SAli.Saidi@arm.com uint64_t get_vec(int int_num) 1147584SAli.Saidi@arm.com { 1158512Sgeoffrey.blake@arm.com panic("Interrupts::get_vec unimplemented!\n"); 1168512Sgeoffrey.blake@arm.com return 0; 1179338SAndreas.Sandberg@arm.com } 1189525SAndreas.Sandberg@ARM.com 1198512Sgeoffrey.blake@arm.com void serialize(std::ostream & os) 1208512Sgeoffrey.blake@arm.com { 1219157Sandreas.hansson@arm.com panic("Interrupts::serialize unimplemented!\n"); 1229157Sandreas.hansson@arm.com } 1238512Sgeoffrey.blake@arm.com 1248870SAli.Saidi@ARM.com void unserialize(Checkpoint * cp, const std::string & section) 1258870SAli.Saidi@ARM.com { 1269338SAndreas.Sandberg@arm.com panic("Interrupts::unserialize unimplemented!\n"); 1278870SAli.Saidi@ARM.com } 1288870SAli.Saidi@ARM.com}; 1298870SAli.Saidi@ARM.com 1307950SAli.Saidi@ARM.com}; 1317754SWilliam.Wang@arm.com 1329338SAndreas.Sandberg@arm.com#endif // __ARCH_X86_INTERRUPTS_HH__ 1339330Schander.sudanthi@arm.com