/* * File : trap.c * This file is part of RT-Thread RTOS * COPYRIGHT (C) 2006, RT-Thread Development Team * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://openlab.rt-thread.com/license/LICENSE * * Change Logs: * Date Author Notes */ #include #include #include /* Interrupt descriptor table. (Must be built at run time because * shifted function addresses can't be represented in relocation records.) */ struct Gatedesc idt[256] = { {0}, }; struct Pseudodesc idt_pd = { 0, sizeof(idt) - 1, (unsigned long) idt, }; /* exception and interrupt handler table */ extern rt_isr_handler_t isr_table[]; extern rt_isr_handler_t trap_func[]; extern rt_isr_handler_t hdinterrupt_func[]; /** * @addtogroup I386 */ /*@{*/ /** * this function initializes the interrupt descript table * */ void rt_hw_idt_init(void) { extern void Xdefault; int i, j, func; for(i=0; i