github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/cpvmm/vmm/include/hw/idt.h (about) 1 /* 2 * Copyright (c) 2013 Intel Corporation 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * Unless required by applicable law or agreed to in writing, software 9 * distributed under the License is distributed on an "AS IS" BASIS, 10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 * See the License for the specific language governing permissions and 12 * limitations under the License. 13 */ 14 15 #ifndef _IDT_H_ 16 #define _IDT_H_ 17 18 // FUNCTION : hw_idt_register_handler() 19 // PURPOSE : Register interrupt handler at spec. vector 20 // ARGUMENTS : UINT8 vector_id 21 // : ADDRESS handler - address of function 22 // RETURNS : void 23 void hw_idt_register_handler( 24 VECTOR_ID vector_id, 25 ADDRESS isr_handler_address); 26 27 // FUNCTION : hw_idt_load() 28 // PURPOSE : Load IDT descriptor into IDTR on given CPU 29 // ARGUMENTS : void 30 // RETURNS : void 31 void hw_idt_load(void); 32 33 // FUNCTION : hw_idt_setup() 34 // PURPOSE : Build and populate IDT tables, one per CPU 35 // ARGUMENTS : void 36 // RETURNS : void 37 void hw_idt_setup(void); 38 39 40 // FUNCTION : idt_get_extra_stacks_required() 41 // PURPOSE : Returns the number of extra stacks required by ISRs 42 // ARGUMENTS : void 43 // RETURNS : number between 0..7 44 // NOTES : per CPU 45 UINT8 idt_get_extra_stacks_required( 46 void 47 ); 48 49 #endif // _IDT_H_ 50