Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3115 → Rev 3116

/branches/tracing/kernel/arch/ppc32/include/interrupt.h
43,6 → 43,7
#define VECTOR_DATA_STORAGE 2
#define VECTOR_INSTRUCTION_STORAGE 3
#define VECTOR_EXTERNAL 4
#define VECTOR_PROGRAM 6
#define VECTOR_DECREMENTER 8
 
extern void start_decrementer(void);
/branches/tracing/kernel/arch/ppc32/include/regutils.h
37,8 → 37,21
#ifndef KERN_ppc32_REGUTILS_H_
#define KERN_ppc32_REGUTILS_H_
 
/*
* MSR/SRR1 bits
*/
#define MSR_PR (1 << 14)
 
/*
* SRR1 bits
*/
#define SRR1_FP_EXC (1 << 20)
#define SRR1_ILL_EXC (1 << 19)
#define SRR1_PRIV_EXC (1 << 18)
#define SRR1_TRAP_EXC (1 << 17)
 
#define SRR1_NOT_FAULT (1 << 16)
 
#endif
 
/** @}
/branches/tracing/kernel/arch/ppc32/src/interrupt.c
96,7 → 96,24
start_decrementer();
}
 
static void exception_program_trap(istate_t *istate)
{
if (istate_from_uspace(istate))
udebug_breakpoint_event(0);
else
panic("Program trap exception.");
}
 
static void exception_program(int n, istate_t *istate)
{
if ((istate->srr1 & SRR1_TRAP_EXC) != 0) {
exception_program_trap(istate);
} else {
fault_if_from_uspace(istate, "Unhandled program exception.");
panic("Unhandled program exception.");
}
}
 
/* Initialize basic tables for exception dispatching */
void interrupt_init(void)
{
104,6 → 121,7
exc_register(VECTOR_INSTRUCTION_STORAGE, "instruction_storage", pht_refill);
exc_register(VECTOR_EXTERNAL, "external", exception_external);
exc_register(VECTOR_DECREMENTER, "timer", exception_decrementer);
exc_register(VECTOR_PROGRAM, "program", exception_program);
}
 
/** @}