src/ssx/ppc405/ppc405_init.c
// Note that __ppc405_system_setup() is called from the SSX bootloader early
// in the initialization, at a point before the aplication has enabled
// critical or external interruts.
Note that __ppc405_system_setup() is called from the SSX bootloader early
in the initialization, at a point before the aplication has enabled
critical or external interruts.
Note that __ppc405_system_setup () is called from the SSX bootloader early in the initialization at a point before the aplication has enabled critical or external interruts .
void
__ppc405_system_setup()
{
    SsxIrqId irq;
    for (irq = 0; irq < EXTERNAL_IRQS; irq++)
    {
        __ppc405_irq_handlers[irq].handler = __ppc405_default_irq_handler;
        __ppc405_irq_handlers[irq].arg = 0;
    }
    __ppc405_phantom_irq.handler = __ppc405_phantom_irq_handler;
    __ppc405_phantom_irq.arg = 0;
    __ppc405_fit_routine = __ppc405_default_irq_handler;
    __ppc405_fit_arg = 0;
    __ppc405_watchdog_routine = __ppc405_default_irq_handler;
    __ppc405_watchdog_arg = 0;
    __ppc405_debug_routine = __ppc405_default_irq_handler;
    __ppc405_debug_arg = 0;
    andc_spr(SPRN_TCR, TCR_ARE);
    or_spr(SPRN_TCR, TCR_PIE);
    or_spr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_PIS | TSR_FIS);
#if SSX_TIMER_SUPPORT
#if SSX_TRACE_SUPPORT
    extern SsxTraceBuffer g_ssx_trace_buf;
    g_ssx_trace_buf.instance_id = OCCHW_INST_ID_PPC;
#endif  
#endif  
#ifdef HWMACRO_OCC
    void __occhw_setup();
    __occhw_setup();
#endif
}
void __ppc405_system_setup ( ) { SsxIrqId irq ; for ( irq = 0 ; irq < EXTERNAL_IRQS ; irq ++ ) { __ppc405_irq_handlers [ irq ] . handler = __ppc405_default_irq_handler ; __ppc405_irq_handlers [ irq ] . arg = 0 ; } __ppc405_phantom_irq . handler = __ppc405_phantom_irq_handler ; __ppc405_phantom_irq . arg = 0 ; __ppc405_fit_routine = __ppc405_default_irq_handler ; __ppc405_fit_arg = 0 ; __ppc405_watchdog_routine = __ppc405_default_irq_handler ; __ppc405_watchdog_arg = 0 ; __ppc405_debug_routine = __ppc405_default_irq_handler ; __ppc405_debug_arg = 0 ; andc_spr ( SPRN_TCR , TCR_ARE ) ; or_spr ( SPRN_TCR , TCR_PIE ) ; or_spr ( SPRN_TSR , TSR_ENW | TSR_WIS | TSR_PIS | TSR_FIS ) ; #if SSX_TIMER_SUPPORT #if SSX_TRACE_SUPPORT extern SsxTraceBuffer g_ssx_trace_buf ; g_ssx_trace_buf . instance_id = OCCHW_INST_ID_PPC ; #endif #endif #ifdef HWMACRO_OCC void __occhw_setup ( ) ; __occhw_setup ( ) ; #endif }
Note that __ppc405_system_setup() is called from the SSX bootloader early
in the initialization, at a point before the aplication has enabled
critical or external interruts.
Note that __ppc405_system_setup () is called from the SSX bootloader early in the initialization at a point before the aplication has enabled critical or external interruts .
// Initialize the interrupt vectors. // Initialize special interrupt handlers // Enable the PIT interrupt, but not auto-reload mode. Clear the status // of all timers for good measure. //set the instance id /* SSX_TRACE_SUPPORT */ /* SSX_TIMER_SUPPORT */ //  Call system-specific setup