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

5
Last change on this file since 2afb22b was 2afb22b, checked in by Chris Johns <chrisj@…>, on 12/23/17 at 07:18:56

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: 2.7 KB
Line 
1/**
2 * @file
3 * @ingroup i386_irq
4 * @brief Interrupt handlers
5 */
6
7/* irq.h
8 *
9 *  This include file describe the data structure and the functions implemented
10 *  by rtems to write interrupt handlers.
11 *
12 *  CopyRight (C) 1998 valette@crf.canon.fr
13 *
14 *  This code is heavilly inspired by the public specification of STREAM V2
15 *  that can be found at :
16 *
17 *      <http://www.chorus.com/Documentation/index.html> by following
18 *  the STREAM API Specification Document link.
19 *
20 *  The license and distribution terms for this file may be
21 *  found in the file LICENSE in this distribution or at
22 *  http://www.rtems.org/license/LICENSE.
23 */
24
25/**
26 * @defgroup i386_irq Interrupt handlers
27 * @ingroup i386_shared
28 * @brief Data structure and the functions to write interrupt handlers
29 * @{
30 */
31
32#ifndef _IRQ_H_
33#define _IRQ_H_
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39/** @brief
40 * Include some preprocessor value also used by assember code
41 */
42
43#include <bsp/irq_asm.h>
44#include <rtems.h>
45#define BSP_SHARED_HANDLER_SUPPORT      1
46#include <rtems/irq.h>
47#include <rtems/irq-extension.h>
48
49/*-------------------------------------------------------------------------+
50| Constants
51+--------------------------------------------------------------------------*/
52
53/** @brief Base vector for our IRQ handlers. */
54#define BSP_IRQ_VECTOR_BASE             BSP_ASM_IRQ_VECTOR_BASE
55#define BSP_IRQ_LINES_NUMBER            16
56#define BSP_IRQ_MAX_ON_i8259A           (BSP_IRQ_LINES_NUMBER - 1)
57
58/*
59 * Define the number of valid vectors. This is different to the number of IRQ
60 * signals supported. Use this value to allocation vector data or range check.
61 */
62#define BSP_IRQ_VECTOR_NUMBER        17
63#define BSP_IRQ_VECTOR_LOWEST_OFFSET 0
64#define BSP_IRQ_VECTOR_MAX_OFFSET    (BSP_IRQ_VECTOR_NUMBER - 1)
65
66/** @brief
67 * Interrupt offset in comparison to BSP_ASM_IRQ_VECTOR_BASE
68 * NB : 1) Interrupt vector number in IDT = offset + BSP_ASM_IRQ_VECTOR_BASE
69 *          2) The same name should be defined on all architecture
70 *             so that handler connection can be unchanged.
71 */
72#define BSP_PERIODIC_TIMER      0 /* fixed on all builds of PC */
73#define BSP_KEYBOARD            1 /* fixed on all builds of PC */
74#define BSP_UART_COM2_IRQ       3 /* fixed for ISA bus */
75#define BSP_UART_COM1_IRQ       4 /* fixed for ISA bus */
76#define BSP_UART_COM3_IRQ       5
77#define BSP_UART_COM4_IRQ       6
78#define BSP_RT_TIMER1           8
79#define BSP_RT_TIMER3           10
80#define BSP_SMP_IPI             16 /* not part of the ATPIC */
81
82#define BSP_INTERRUPT_VECTOR_MIN BSP_IRQ_VECTOR_LOWEST_OFFSET
83#define BSP_INTERRUPT_VECTOR_MAX BSP_IRQ_VECTOR_MAX_OFFSET
84
85/** @brief
86 * Type definition for RTEMS managed interrupts
87 */
88typedef unsigned short rtems_i8259_masks;
89
90/** @} */
91
92#ifdef __cplusplus
93}
94#endif
95
96#endif /* _IRQ_H_ */
Note: See TracBrowser for help on using the repository browser.