source: rtems/bsps/powerpc/mvme5500/include/bsp/irq.h @ 2afb22b

5
Last change on this file since 2afb22b was 2afb22b, checked in by Chris Johns <chrisj@…>, on Dec 23, 2017 at 7:18:56 AM

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

  • Property mode set to 100644
File size: 5.4 KB
Line 
1/* irq.h
2 *
3 *  This include file describe the data structure and the functions implemented
4 *  by rtems to write interrupt handlers.
5 *
6 *  CopyRight (C) 1999 valette@crf.canon.fr
7 *
8 *  This code is heavilly inspired by the public specification of STREAM V2
9 *  that can be found at :
10 *
11 *      <http://www.chorus.com/Documentation/index.html> by following
12 *  the STREAM API Specification Document link.
13 *
14 *  The license and distribution terms for this file may be
15 *  found in the file LICENSE in this distribution or at
16 *  http://www.rtems.org/license/LICENSE.
17 *
18 * Copyright 2004, 2005 Brookhaven National Laboratory and
19 *                 Shuchen Kate Feng <feng1@bnl.gov>
20 *
21 *    - modified shared/irq/irq.h for Mvme5500 (no ISA devices/PIC)
22 *    - Discovery GT64260 interrupt controller instead of 8259.
23 *    - Added support for software IRQ priority levels.
24 *    - modified to optimize the IRQ latency and handling
25 */
26
27#ifndef LIBBSP_POWERPC_MVME5500_IRQ_IRQ_H
28#define LIBBSP_POWERPC_MVME5500_IRQ_IRQ_H
29
30#define BSP_SHARED_HANDLER_SUPPORT      1
31#include <rtems/irq.h>
32
33#ifndef ASM
34
35#define OneTierIrqPrioTbl 1
36
37/*
38 * Symbolic IRQ names and related definitions.
39 */
40
41/* leave the ISA symbols in there, so we can reuse shared/irq.c
42 * Also, we start numbering PCI irqs at 16 because the OPENPIC
43 * driver relies on this when mapping irq number <-> vectors
44 * (OPENPIC_VEC_SOURCE in openpic.h)
45 */
46
47  /* See section 25.2 , Table 734 of GT64260 controller
48   * Main Interrupt Cause Low register
49   */
50#define BSP_MICL_IRQ_NUMBER           (32)
51#define BSP_MICL_IRQ_LOWEST_OFFSET    (0)
52#define BSP_MICL_IRQ_MAX_OFFSET       (BSP_MICL_IRQ_LOWEST_OFFSET + BSP_MICL_IRQ_NUMBER -1)
53  /*
54   * Main Interrupt Cause High register
55   */
56#define BSP_MICH_IRQ_NUMBER           (32)
57#define BSP_MICH_IRQ_LOWEST_OFFSET    (BSP_MICL_IRQ_MAX_OFFSET+1)
58#define BSP_MICH_IRQ_MAX_OFFSET       (BSP_MICH_IRQ_LOWEST_OFFSET + BSP_MICH_IRQ_NUMBER -1)
59 /* External GPP Interrupt assignements
60  */
61#define BSP_GPP_IRQ_NUMBER              (32)
62#define BSP_GPP_IRQ_LOWEST_OFFSET       (BSP_MICH_IRQ_MAX_OFFSET+1)
63#define BSP_GPP_IRQ_MAX_OFFSET          (BSP_GPP_IRQ_LOWEST_OFFSET + BSP_GPP_IRQ_NUMBER - 1)
64
65 /*
66  * PowerPc exceptions handled as interrupt where a rtems managed interrupt
67  * handler might be connected
68  */
69#define BSP_PROCESSOR_IRQ_NUMBER         (1)
70#define BSP_PROCESSOR_IRQ_LOWEST_OFFSET (BSP_GPP_IRQ_MAX_OFFSET + 1)
71#define BSP_PROCESSOR_IRQ_MAX_OFFSET    (BSP_PROCESSOR_IRQ_LOWEST_OFFSET + BSP_PROCESSOR_IRQ_NUMBER - 1)
72
73  /* allow a couple of vectors for VME and counter/timer irq sources etc.
74   * This is probably not needed any more.
75   */
76#define BSP_MISC_IRQ_NUMBER             (30)
77#define BSP_MISC_IRQ_LOWEST_OFFSET      (BSP_PROCESSOR_IRQ_MAX_OFFSET + 1)
78#define BSP_MISC_IRQ_MAX_OFFSET (BSP_MISC_IRQ_LOWEST_OFFSET + BSP_MISC_IRQ_NUMBER - 1)
79
80  /*
81   * Summary
82   */
83#define BSP_IRQ_NUMBER                  (BSP_MISC_IRQ_MAX_OFFSET + 1)
84#define BSP_MAIN_IRQ_NUMBER             (64)
85#define BSP_PIC_IRQ_NUMBER              (96)
86#define BSP_LOWEST_OFFSET               (BSP_MICL_IRQ_LOWEST_OFFSET)
87#define BSP_MAX_OFFSET                  (BSP_MISC_IRQ_MAX_OFFSET)
88
89  /* Main CPU interrupt cause (Low) */
90#define BSP_MAIN_TIMER0_1_IRQ         (BSP_MICL_IRQ_LOWEST_OFFSET+8)
91#define BSP_MAIN_PCI0_7_0             (BSP_MICL_IRQ_LOWEST_OFFSET+12)
92#define BSP_MAIN_PCI0_15_8            (BSP_MICL_IRQ_LOWEST_OFFSET+13)
93#define BSP_MAIN_PCI0_23_16           (BSP_MICL_IRQ_LOWEST_OFFSET+14)
94#define BSP_MAIN_PCI0_31_24           (BSP_MICL_IRQ_LOWEST_OFFSET+15)
95#define BSP_MAIN_PCI1_7_0             (BSP_MICL_IRQ_LOWEST_OFFSET+16)
96#define BSP_MAIN_PCI1_15_8            (BSP_MICL_IRQ_LOWEST_OFFSET+18)
97#define BSP_MAIN_PCI1_23_16           (BSP_MICL_IRQ_LOWEST_OFFSET+19)
98#define BSP_MAIN_PCI1_31_24           (BSP_MICL_IRQ_LOWEST_OFFSET+20)
99
100
101  /* Main CPU interrupt cause (High) */
102#define BSP_MAIN_ETH0_IRQ             (BSP_MICH_IRQ_LOWEST_OFFSET)
103#define BSP_MAIN_ETH1_IRQ             (BSP_MICH_IRQ_LOWEST_OFFSET+1)
104#define BSP_MAIN_ETH2_IRQ             (BSP_MICH_IRQ_LOWEST_OFFSET+2)
105#define BSP_MAIN_GPP7_0_IRQ           (BSP_MICH_IRQ_LOWEST_OFFSET+24)
106#define BSP_MAIN_GPP15_8_IRQ          (BSP_MICH_IRQ_LOWEST_OFFSET+25)
107#define BSP_MAIN_GPP23_16_IRQ         (BSP_MICH_IRQ_LOWEST_OFFSET+26)
108#define BSP_MAIN_GPP31_24_IRQ         (BSP_MICH_IRQ_LOWEST_OFFSET+27)
109
110  /* on the MVME5500, these are the GT64260B external GPP0 interrupt */
111#define BSP_PCI_IRQ_LOWEST_OFFSET       (BSP_GPP_IRQ_LOWEST_OFFSET)
112#define BSP_UART_COM2_IRQ               (BSP_GPP_IRQ_LOWEST_OFFSET)
113#define BSP_UART_COM1_IRQ               (BSP_GPP_IRQ_LOWEST_OFFSET)
114#define BSP_GPP8_IRQ_OFFSET             (BSP_GPP_IRQ_LOWEST_OFFSET+8)
115#define BSP_GPP_PMC1_INTA               (BSP_GPP8_IRQ_OFFSET)
116#define BSP_GPP16_IRQ_OFFSET          (BSP_GPP_IRQ_LOWEST_OFFSET+16)
117#define BSP_GPP24_IRQ_OFFSET          (BSP_GPP_IRQ_LOWEST_OFFSET+24)
118#define BSP_GPP_VME_VLINT0            (BSP_GPP_IRQ_LOWEST_OFFSET+12)
119#define BSP_GPP_VME_VLINT1            (BSP_GPP_IRQ_LOWEST_OFFSET+13)
120#define BSP_GPP_VME_VLINT2            (BSP_GPP_IRQ_LOWEST_OFFSET+14)
121#define BSP_GPP_VME_VLINT3            (BSP_GPP_IRQ_LOWEST_OFFSET+15)
122#define BSP_GPP_PMC2_INTA             (BSP_GPP_IRQ_LOWEST_OFFSET+16)
123#define BSP_GPP_82544_IRQ             (BSP_GPP_IRQ_LOWEST_OFFSET+20)
124#define BSP_GPP_WDT_NMI_IRQ           (BSP_GPP_IRQ_LOWEST_OFFSET+24)
125#define BSP_GPP_WDT_EXP_IRQ           (BSP_GPP_IRQ_LOWEST_OFFSET+25)
126
127 /*
128   * Some Processor execption handled as rtems IRQ symbolic name definition
129   */
130#define BSP_DECREMENTER         (BSP_PROCESSOR_IRQ_LOWEST_OFFSET)
131
132extern void BSP_rtems_irq_mng_init(unsigned cpuId);
133
134#include <bsp/irq_supp.h>
135
136#endif
137#endif
Note: See TracBrowser for help on using the repository browser.