Changeset fcfac420 in mainline for arch/ia32/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/ia32/src/interrupt.c

    r973be64e rfcfac420  
    4444 */
    4545
    46 static iroutine ivt[IVT_ITEMS];
    47 
    4846void (* disable_irqs_function)(__u16 irqmask) = NULL;
    4947void (* enable_irqs_function)(__u16 irqmask) = NULL;
    5048void (* eoi_function)(void) = NULL;
    5149
    52 #define PRINT_INFO_ERRCODE(x) { \
    53         char *symbol = get_symtab_entry(stack[1]); \
     50#define PRINT_INFO_ERRCODE(st) { \
     51        __native *x = (__native *) st; \
     52        char *symbol = get_symtab_entry(x[1]); \
    5453        if (!symbol) \
    5554                symbol = ""; \
     
    6665        }
    6766
    68 iroutine trap_register(__u8 n, iroutine f)
     67void null_interrupt(int n, void *st)
    6968{
    70         ASSERT(n < IVT_ITEMS);
    71        
    72         iroutine old;
    73        
    74         old = ivt[n];
    75         ivt[n] = f;
    76        
    77         return old;
    78 }
     69        __native *stack = (__native *) st;
    7970
    80 /*
    81  * Called directly from the assembler code.
    82  * CPU is interrupts_disable()'d.
    83  */
    84 void trap_dispatcher(__u8 n, __native stack[])
    85 {
    86         ASSERT(n < IVT_ITEMS);
    87        
    88         ivt[n](n, stack);
    89 }
    90 
    91 void null_interrupt(__u8 n, __native stack[])
    92 {
    9371        printf("int %d: null_interrupt\n", n);
    9472        printf("stack: %L, %L, %L, %L\n", stack[0], stack[1], stack[2], stack[3]);
     
    9674}
    9775
    98 void gp_fault(__u8 n, __native stack[])
     76void gp_fault(int n, void *stack)
    9977{
    10078        PRINT_INFO_ERRCODE(stack);
     
    10280}
    10381
    104 void ss_fault(__u8 n, __native stack[])
     82void ss_fault(int n, void *stack)
    10583{
    10684        PRINT_INFO_ERRCODE(stack);
     
    10987
    11088
    111 void nm_fault(__u8 n, __native stack[])
     89void nm_fault(int n, void *stack)
    11290{
    11391#ifdef CONFIG_FPU_LAZY     
     
    12098
    12199
    122 void page_fault(__u8 n, __native stack[])
     100void page_fault(int n, void *stack)
    123101{
    124102        PRINT_INFO_ERRCODE(stack);
     
    127105}
    128106
    129 void syscall(__u8 n, __native stack[])
     107void syscall(int n, void *stack)
    130108{
    131109        printf("cpu%d: syscall\n", CPU->id);
     
    133111}
    134112
    135 void tlb_shootdown_ipi(__u8 n, __native stack[])
     113void tlb_shootdown_ipi(int n, void *stack)
    136114{
    137115        trap_virtual_eoi();
     
    139117}
    140118
    141 void wakeup_ipi(__u8 n, __native stack[])
     119void wakeup_ipi(int n, void *stack)
    142120{
    143121        trap_virtual_eoi();
Note: See TracChangeset for help on using the changeset viewer.