/* * HP PA-RISC Dependent Source * * COPYRIGHT (c) 1994 by Division Incorporated * * To anyone who acknowledges that this file is provided "AS IS" * without any express or implied warranty: * permission to use, copy, modify, and distribute this file * for any purpose is hereby granted without fee, provided that * the above copyright notice and this notice appears in all * copies, and that the name of Division Incorporated not be * used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. * Division Incorporated makes no representations about the * suitability of this software for any purpose. * * $Id$ */ #include #include void hppa_cpu_halt(unsigned32 the_error); /*PAGE * * _CPU_ISR_install_raw_handler */ void _CPU_ISR_install_raw_handler( unsigned32 vector, proc_ptr new_handler, proc_ptr *old_handler ) { /* * This is unsupported. For HPPA this function is handled by BSP */ _CPU_Fatal_halt( 0xdeaddead ); } /* * This is the default handler which is called if * _CPU_ISR_install_vector() has not been called for the * specified vector. It simply forwards onto the spurious * handler defined in the cpu-table. */ static ISR_Handler hppa_interrupt_report_spurious(ISR_Vector_number vector, void* rtems_isr_frame) /* HPPA extension */ { /* * If the CPU table defines a spurious_handler, then * call it. If the handler returns halt. */ if ( _CPU_Table.spurious_handler ) _CPU_Table.spurious_handler(vector, rtems_isr_frame); hppa_cpu_halt(vector); } /*PAGE * * _CPU_ISR_Get_level */ unsigned32 _CPU_ISR_Get_level(void) { int level; HPPA_ASM_SSM(0, level); /* change no bits; just get copy */ if (level & HPPA_PSW_I) return 0; return 1; } /*PAGE * * _CPU_ISR_install_vector * * This kernel routine installs the RTEMS handler for the * specified vector. The handler is a C callable routine. * * Input parameters: * vector - interrupt vector number * old_handler - former ISR for this vector number * new_handler - replacement ISR for this vector number * * Output parameters: NONE * */ void _CPU_ISR_install_vector( unsigned32 vector, proc_ptr new_handler, proc_ptr *old_handler ) { *old_handler = _ISR_Vector_table[vector]; _ISR_Vector_table[vector] = new_handler; } /* _CPU_Initialize * * This routine performs processor dependent initialization. * * INPUT PARAMETERS: * cpu_table - CPU table to initialize * thread_dispatch - address of disptaching routine * */ void _CPU_Initialize( rtems_cpu_table *cpu_table, void (*thread_dispatch) /* ignored on this CPU */ ) { register unsigned8 *fp_context; unsigned32 i; proc_ptr old_handler; /* * This is the default fp context for all tasks * Set it up so that denormalized results go to zero. */ fp_context = (unsigned8*) &_CPU_Null_fp_context; for (i=0 ; i