Changeset fcfac420 in mainline for arch/amd64/src/interrupt.c


Ignore:
Timestamp:
2005-12-10T01:02:31Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6095342
Parents:
973be64e
Message:

Changed ia32 & amd64 to use exc_register instead of trap_register.

Fixed dependency list building. I hope you all have 'makedepend' installed,
if you don't it's time to install it, as CC -M builds the dependency
list without directory names..and it just does not work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/amd64/src/interrupt.c

    r973be64e rfcfac420  
    5858}
    5959
    60 static void print_info_errcode(__u8 n, __native x[])
     60static void print_info_errcode(int n, void *st)
    6161{
    6262        char *symbol;
     63        __native *x = (__native *) st;
    6364
    6465        if (!(symbol=get_symtab_entry(x[1])))
     
    8990 */
    9091
    91 static iroutine ivt[IVT_ITEMS];
    92 
    9392void (* disable_irqs_function)(__u16 irqmask) = NULL;
    9493void (* enable_irqs_function)(__u16 irqmask) = NULL;
    9594void (* eoi_function)(void) = NULL;
    9695
    97 iroutine trap_register(__u8 n, iroutine f)
     96void null_interrupt(int n, void *st)
    9897{
    99         ASSERT(n < IVT_ITEMS);
    100        
    101         iroutine old;
    102        
    103         old = ivt[n];
    104         ivt[n] = f;
    105        
    106         return old;
    107 }
     98        __native *stack = (__native *) st;
    10899
    109 /*
    110  * Called directly from the assembler code.
    111  * CPU is interrupts_disable()'d.
    112  */
    113 void trap_dispatcher(__u8 n, __native stack[])
    114 {
    115         ASSERT(n < IVT_ITEMS);
    116        
    117         ivt[n](n, stack);
    118 }
    119 
    120 void null_interrupt(__u8 n, __native stack[])
    121 {
    122100        printf("-----EXCEPTION(%d) OCCURED----- ( %s )\n",n,__FUNCTION__); \
    123101        printf("stack: %L, %L, %L, %L\n", stack[0], stack[1], stack[2], stack[3]);
     
    125103}
    126104
    127 void gp_fault(__u8 n, __native stack[])
     105void gp_fault(int n, void *stack)
    128106{
    129107        print_info_errcode(n,stack);
     
    131109}
    132110
    133 void ss_fault(__u8 n, __native stack[])
     111void ss_fault(int n, void *stack)
    134112{
    135113        print_info_errcode(n,stack);
     
    138116
    139117
    140 void nm_fault(__u8 n, __native stack[])
     118void nm_fault(int n, void *stack)
    141119{
    142120#ifdef CONFIG_FPU_LAZY     
     
    149127
    150128
    151 void page_fault(__u8 n, __native stack[])
     129void page_fault(int n, void *stack)
    152130{
    153131        print_info_errcode(n,stack);
     
    156134}
    157135
    158 void syscall(__u8 n, __native stack[])
     136void syscall(int n, void *stack)
    159137{
    160138        printf("cpu%d: syscall\n", CPU->id);
     
    162140}
    163141
    164 void tlb_shootdown_ipi(__u8 n, __native stack[])
     142void tlb_shootdown_ipi(int n, void *stack)
    165143{
    166144        trap_virtual_eoi();
     
    168146}
    169147
    170 void wakeup_ipi(__u8 n, __native stack[])
     148void wakeup_ipi(int n, void *stack)
    171149{
    172150        trap_virtual_eoi();
Note: See TracChangeset for help on using the changeset viewer.