Changeset 3156582 in mainline for arch/mips/src/interrupt.c


Ignore:
Timestamp:
2005-09-11T12:48:42Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8e3fb24c
Parents:
8491c48
Message:

Updated symtab so that it works correctly with BE architectures.
Changed compiler for BE MIPS to be mips-sgi-irix5, because
mipsel -EB does not behave correctly.
Doc updates to amd64.
Added ARC BIOS support to MIPS architecture. Putchar works correctly,
kernel passed FPU & some rwlock tests.

File:
1 edited

Legend:

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

    r8491c48 r3156582  
    3333#include <time/clock.h>
    3434#include <panic.h>
     35#include <print.h>
     36#include <symtab.h>
     37#include <arch/drivers/arc.h>
     38
     39static void print_regdump(struct exception_regdump *pstate)
     40{
     41        char *pcsymbol = "";
     42        char *rasymbol = "";
     43
     44        char *s = get_symtab_entry(pstate->epc);
     45        if (s)
     46                pcsymbol = s;
     47        s = get_symtab_entry(pstate->ra);
     48        if (s)
     49                rasymbol = s;
     50       
     51        printf("PC: %X(%s) RA: %X(%s)\n",pstate->epc,pcsymbol,
     52               pstate->ra,rasymbol);
     53}
    3554
    3655pri_t cpu_priority_high(void)
     
    5877}
    5978
    60 void interrupt(void)
     79void interrupt(struct exception_regdump *pstate)
    6180{
    6281        __u32 cause;
     
    7089                        switch (i) {
    7190                                case 0: /* SW0 - Software interrupt 0 */
    72                                         cp0_cause_write(cause & ~(1 << 8)); /* clear SW0 interrupt */
     91                                        cp0_cause_write(cp0_cause_read() & ~(1 << 8)); /* clear SW0 interrupt */
    7392                                        break;
    7493                                case 1: /* SW1 - Software interrupt 1 */
    75                                         cp0_cause_write(cause & ~(1 << 9)); /* clear SW1 interrupt */
     94                                        cp0_cause_write(cp0_cause_read() & ~(1 << 9)); /* clear SW1 interrupt */
    7695                                        break;
    7796                                case 2: /* IRQ0 */
     
    8099                                case 5: /* IRQ3 */
    81100                                case 6: /* IRQ4 */
     101                                        print_regdump(pstate);
    82102                                        panic("unhandled interrupt %d\n", i);
    83103                                        break;
Note: See TracChangeset for help on using the changeset viewer.