Changeset 021d471 in mainline for arch/mips32/src/exception.c


Ignore:
Timestamp:
2006-02-06T15:56:40Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9b9f195
Parents:
f5935ed
Message:

Added MIPS userspace. Currently can't make it work in gxemul.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/src/exception.c

    rf5935ed r021d471  
    4141#include <console/kconsole.h>
    4242#include <arch/debugger.h>
     43#include <syscall/syscall.h>
    4344
    4445static char * exctable[] = {
     
    135136}
    136137
     138#include <debug.h>
     139/** Handle syscall userspace call */
     140static void syscall_exception(int n, void *data)
     141{
     142        struct exception_regdump *pstate = (struct exception_regdump *)data;
     143       
     144        if (pstate->a3 < SYSCALL_END)
     145                pstate->v0 = syscall_table[pstate->a3](pstate->a0,
     146                                                       pstate->a1,
     147                                                       pstate->a2);
     148        else
     149                panic("Undefined syscall %d", pstate->a3);
     150        pstate->epc += 4;
     151}
     152
    137153
    138154void exception(struct exception_regdump *pstate)
     
    191207        exc_register(EXC_CpU, "cpunus", cpuns_exception);
    192208#endif
    193 }
     209        exc_register(EXC_Sys, "syscall", syscall_exception);
     210}
Note: See TracChangeset for help on using the changeset viewer.