Changeset 97b64c9 in mainline


Ignore:
Timestamp:
2006-03-15T12:29:52Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f8973c00
Parents:
8965838e
Message:

Fix bug in ia32 interrupt handlers.
Handlers for interrupts greater than 31 wrapped the shift around and thus failed to correctly identify
the need to emulate error word.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/asm.S

    r8965838e r97b64c9  
    8181        push %eax
    8282
    83         # Test if this is interrupt with error word or not
    84         movl $(1<<\i), %eax
     83        /*
     84         * Test if this is interrupt with error word or not.
     85         * Be careful about width of the shift.
     86         */
     87        .iflt \i-32
     88                movl $(1<<\i), %eax
     89        .else
     90                movl $0, %eax
     91        .endif
    8592        andl $ERROR_WORD_INTERRUPT_LIST,%eax
    8693
  • arch/ia32/src/interrupt.c

    r8965838e r97b64c9  
    5050void (* eoi_function)(void) = NULL;
    5151
    52 #define PRINT_INFO_ERRCODE(istate) do { \
    53         char *symbol = get_symtab_entry(istate->eip); \
    54         if (!symbol) \
    55                 symbol = ""; \
    56         printf("----------------EXCEPTION OCCURED----------------\n"); \
    57         printf("%%eip: %X (%s)\n",istate->eip,symbol); \
    58         printf("ERROR_WORD=%X\n", istate->error_word); \
    59         printf("%%cs=%X,flags=%X\n", istate->cs, istate->eflags); \
    60         printf("%%eax=%X, %%ebx=%X, %%ecx=%X, %%edx=%X\n",\
    61                istate->eax,istate->ebx,istate->ecx,istate->edx); \
    62         printf("%%esi=%X, %%edi=%X, %%ebp=%X, %%esp=%X\n",\
    63                istate->esi,istate->edi,istate->ebp,istate->esp); \
    64         printf("stack: %X, %X, %X, %X\n", istate->stack[0], istate->stack[1], istate->stack[2], istate->stack[3]); \
    65         printf("       %X, %X, %X, %X\n", istate->stack[4], istate->stack[5], istate->stack[6], istate->stack[7]); \
    66 } while(0)
     52static void PRINT_INFO_ERRCODE(istate_t *istate)
     53{
     54        char *symbol = get_symtab_entry(istate->eip);
     55
     56        if (!symbol)
     57                symbol = "";
     58
     59        if (CPU)
     60                printf("----------------EXCEPTION OCCURED (cpu%d)----------------\n", CPU->id);
     61        else
     62                printf("----------------EXCEPTION OCCURED----------------\n");
     63               
     64        printf("%%eip: %X (%s)\n",istate->eip,symbol);
     65        printf("ERROR_WORD=%X\n", istate->error_word);
     66        printf("%%cs=%X,flags=%X\n", istate->cs, istate->eflags);
     67        printf("%%eax=%X, %%ebx=%X, %%ecx=%X, %%edx=%X\n",  istate->eax,istate->ebx,istate->ecx,istate->edx);
     68        printf("%%esi=%X, %%edi=%X, %%ebp=%X, %%esp=%X\n",  istate->esi,istate->edi,istate->ebp,istate->esp);
     69        printf("stack: %X, %X, %X, %X\n", istate->stack[0], istate->stack[1], istate->stack[2], istate->stack[3]);
     70        printf("       %X, %X, %X, %X\n", istate->stack[4], istate->stack[5], istate->stack[6], istate->stack[7]);
     71}
    6772
    6873void null_interrupt(int n, istate_t *istate)
  • generic/src/mm/tlb.c

    r8965838e r97b64c9  
    133133        int i;
    134134       
     135        ASSERT(CPU);
     136       
    135137        CPU->tlb_active = 0;
    136138        spinlock_lock(&tlblock);
Note: See TracChangeset for help on using the changeset viewer.