From c932d85019761fbafef02fc72119e4bcd4e50978 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sat, 30 May 1998 10:09:14 +0000 Subject: New files -- from rtems-LM-980406 which was based on an RTEMS from 12/97. This was called the dmv170 BSP in that source tree but since the DMV171 is now obsolete, we have transitioned to the DMV177 and have no intention of checking compatibility with any other models. --- c/src/lib/libbsp/powerpc/dmv177/startup/genpvec.c | 184 ++++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 c/src/lib/libbsp/powerpc/dmv177/startup/genpvec.c (limited to 'c/src/lib/libbsp/powerpc/dmv177/startup/genpvec.c') diff --git a/c/src/lib/libbsp/powerpc/dmv177/startup/genpvec.c b/c/src/lib/libbsp/powerpc/dmv177/startup/genpvec.c new file mode 100644 index 0000000000..98989c2401 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/dmv177/startup/genpvec.c @@ -0,0 +1,184 @@ +/* genpvec.c + * + * These routines handle the external exception. Multiple ISRs occur off + * of this one interrupt. This method will allow multiple ISRs to be + * called using the same IRQ index. However, removing the ISR routines is + * presently not supported. + * + * The external exception vector numbers begin with DMV170_IRQ_FIRST. + * DMV170_IRQ_FIRST is defined to be one greater than the last processor + * interrupt. + * + * COPYRIGHT (c) 1989-1998. + * On-Line Applications Research Corporation (OAR). + * Copyright assigned to U.S. Government, 1994. + * + * The license and distribution terms for this file may in + * the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * $Id: + */ + +#include +#include "chain.h" +#include + +#define NUM_LIRQ_HANDLERS 20 +#define NUM_LIRQ ( MAX_BOARD_IRQS - PPC_IRQ_LAST ) + +/* + * Structure to for one of possible multiple interrupt handlers for + * a given interrupt. + */ +typedef struct +{ + Chain_Node Node; + rtems_isr_entry handler; /* isr routine */ + rtems_vector_number vector; /* vector number */ +} EE_ISR_Type; + +/* + * Note: The following will not work if we add a method to remove + * handlers at a later time. + */ +EE_ISR_Type ISR_Nodes [NUM_LIRQ_HANDLERS]; +rtems_unsigned16 Nodes_Used; +Chain_Control ISR_Array [NUM_LIRQ]; + + +/* PAGE + * + * initialize_external_exception_vector + * + * This routine initializes the external exception vector + * + * Input parameters: NONE + * + * Output parameters: NONE + * + * Return values: NONE + */ + +void initialize_external_exception_vector () +{ + int i; + rtems_isr_entry previous_isr; + rtems_status_code status; + + Nodes_Used = 0; + + for (i=0; i handler)( node->vector ); + node = node->Node.next; + } + + /* + * Clear the interrupt. + */ +} + -- cgit v1.2.3