Ignore:
Timestamp:
2006-09-05T21:06:59Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d7e3f1ad
Parents:
5035eeb7
Message:

Handle more sparc64 traps and improve handling of already handled traps.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/trap/exception.c

    r5035eeb7 re2bf639  
    3636#include <arch/trap/exception.h>
    3737#include <arch/interrupt.h>
     38#include <interrupt.h>
    3839#include <arch/asm.h>
    3940#include <debug.h>
    4041#include <typedefs.h>
    4142
    42 /** Handle instruction_access_exception. */
    43 void do_instruction_access_exc(int n, istate_t *istate)
     43/** Handle instruction_access_exception. (0x8) */
     44void instruction_access_exception(int n, istate_t *istate)
    4445{
    45         panic("Instruction Access Exception at %p.\n", istate->tpc);
     46        fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
     47        panic("%s at %p.\n", __FUNCTION__, istate->tpc);
    4648}
    4749
    48 /** Handle mem_address_not_aligned. */
    49 void do_mem_address_not_aligned(int n, istate_t *istate)
     50/** Handle instruction_access_error. (0xa) */
     51void instruction_access_error(int n, istate_t *istate)
    5052{
    51         panic("Memory Address Not Aligned from %p.\n", istate->tpc);
     53        fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
     54        panic("%s at %p.\n", __FUNCTION__, istate->tpc);
    5255}
    5356
    54 /** Handle data_access_error. */
    55 void do_data_access_error(int n, istate_t *istate)
     57/** Handle illegal_instruction. (0x10) */
     58void illegal_instruction(int n, istate_t *istate)
    5659{
    57         panic("Data Access Error from %p.\n", istate->tpc);
     60        fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
     61        panic("%s at %p.\n", __FUNCTION__, istate->tpc);
    5862}
    5963
    60 /** Handle mem_address_not_aligned. */
    61 void do_illegal_instruction(int n, istate_t *istate)
     64/** Handle privileged_opcode. (0x11) */
     65void privileged_opcode(int n, istate_t *istate)
    6266{
    63         panic("Illegal Instruction at %p.\n", istate->tpc);
     67        fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
     68        panic("%s at %p.\n", __FUNCTION__, istate->tpc);
     69}
     70
     71/** Handle division_by_zero. (0x28) */
     72void division_by_zero(int n, istate_t *istate)
     73{
     74        fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
     75        panic("%s at %p.\n", __FUNCTION__, istate->tpc);
     76}
     77
     78/** Handle data_access_exception. (0x30) */
     79void data_access_exception(int n, istate_t *istate)
     80{
     81        fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
     82        panic("%s from %p.\n", __FUNCTION__, istate->tpc);
     83}
     84
     85/** Handle data_access_error. (0x32) */
     86void data_access_error(int n, istate_t *istate)
     87{
     88        fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
     89        panic("%s from %p.\n", __FUNCTION__, istate->tpc);
     90}
     91
     92/** Handle mem_address_not_aligned. (0x34) */
     93void mem_address_not_aligned(int n, istate_t *istate)
     94{
     95        fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
     96        panic("%s from %p.\n", __FUNCTION__, istate->tpc);
     97}
     98
     99/** Handle privileged_action. (0x37) */
     100void privileged_action(int n, istate_t *istate)
     101{
     102        fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
     103        panic("%s at %p.\n", __FUNCTION__, istate->tpc);
    64104}
    65105
    66106/** @}
    67107 */
    68 
Note: See TracChangeset for help on using the changeset viewer.