Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:57

0001 /* irq.h
0002  *
0003  *  This include file describe the data structure and the functions implemented
0004  *  by rtems to write interrupt handlers.
0005  *
0006  *  CopyRight (C) 1999 valette@crf.canon.fr
0007  *
0008  *  This code is heavilly inspired by the public specification of STREAM V2
0009  *  that can be found at :
0010  *
0011  *      <http://www.chorus.com/Documentation/index.html> by following
0012  *  the STREAM API Specification Document link.
0013  *
0014  *  The license and distribution terms for this file may be
0015  *  found in the file LICENSE in this distribution or at
0016  *  http://www.rtems.org/license/LICENSE.
0017  */
0018 
0019 #ifndef LIBBSP_POWERPC_IRQ_H
0020 #define LIBBSP_POWERPC_IRQ_H
0021 
0022 #define BSP_SHARED_HANDLER_SUPPORT      1
0023 
0024 #ifndef ASM
0025 
0026 #include <rtems/irq.h>
0027 
0028 
0029 /*
0030  * Symblolic IRQ names and related definitions.
0031  */
0032 
0033 /*
0034  * PCI IRQ handlers related definitions
0035  * CAUTION : BSP_PCI_IRQ_LOWEST_OFFSET should be equal to OPENPIC_VEC_SOURCE
0036  */
0037 #define BSP_PCI_IRQ_NUMBER      (16)
0038 #define BSP_PCI_IRQ_LOWEST_OFFSET   (0)
0039 #define BSP_PCI_IRQ_MAX_OFFSET      (BSP_PCI_IRQ_LOWEST_OFFSET + BSP_PCI_IRQ_NUMBER - 1)
0040 
0041 #define BSP_PROCESSOR_IRQ_NUMBER        (1)
0042 #define BSP_PROCESSOR_IRQ_LOWEST_OFFSET (BSP_PCI_IRQ_MAX_OFFSET)
0043 #define BSP_PROCESSOR_IRQ_MAX_OFFSET    (BSP_PROCESSOR_IRQ_LOWEST_OFFSET+BSP_PROCESSOR_IRQ_NUMBER-1)
0044 
0045 
0046   /*
0047    * Summary
0048    */
0049 #define BSP_IRQ_NUMBER          (BSP_PROCESSOR_IRQ_MAX_OFFSET + 1)
0050 #define BSP_LOWEST_OFFSET       (BSP_PCI_IRQ_LOWEST_OFFSET)
0051 #define BSP_MAX_OFFSET          (BSP_IRQ_NUMBER - 1)
0052 
0053   /*
0054    * Some Processor execption handled as rtems IRQ symbolic name definition
0055    */
0056 #define BSP_DECREMENTER         (BSP_PROCESSOR_IRQ_LOWEST_OFFSET)
0057 
0058 #include <bsp/irq_supp.h>
0059 
0060 #define BSP_INTERRUPT_VECTOR_COUNT BSP_IRQ_NUMBER
0061 
0062 #ifdef __cplusplus
0063 extern "C" {
0064 #endif
0065 
0066 void BSP_rtems_irq_mng_init(unsigned cpuId);
0067 
0068 #ifdef __cplusplus
0069 }
0070 #endif
0071 
0072 #endif
0073 #endif