source: rtems/bsps/powerpc/qoriq/include/bsp.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 *
4 * @ingroup QorIQ
5 *
6 * @brief BSP API.
7 */
8
9/*
10 * Copyright (c) 2010, 2017 embedded brains GmbH.  All rights reserved.
11 *
12 *  embedded brains GmbH
13 *  Dornierstr. 4
14 *  82178 Puchheim
15 *  Germany
16 *  <rtems@embedded-brains.de>
17 *
18 * The license and distribution terms for this file may be
19 * found in the file LICENSE in this distribution or at
20 * http://www.rtems.org/license/LICENSE.
21 */
22
23#ifndef LIBBSP_POWERPC_QORIQ_BSP_H
24#define LIBBSP_POWERPC_QORIQ_BSP_H
25
26#include <bspopts.h>
27
28#ifdef QORIQ_IS_HYPERVISOR_GUEST
29#define QORIQ_THREAD_COUNT 1
30#else
31#define QORIQ_THREAD_COUNT QORIQ_PHYSICAL_THREAD_COUNT
32#endif
33
34#ifndef ASM
35
36#include <rtems.h>
37
38#include <bsp/default-initial-extension.h>
39
40#ifdef __cplusplus
41extern "C" {
42#endif /* __cplusplus */
43
44#define BSP_FEATURE_IRQ_EXTENSION
45
46#define BSP_FDT_IS_SUPPORTED
47
48#define QORIQ_CHIP(alpha, num) ((alpha) * 10000 + (num))
49
50#define QORIQ_CHIP_P1020 QORIQ_CHIP('P', 1020)
51
52#define QORIQ_CHIP_T2080 QORIQ_CHIP('T', 2080)
53
54#define QORIQ_CHIP_T4240 QORIQ_CHIP('T', 4240)
55
56#define QORIQ_CHIP_VARIANT QORIQ_CHIP(QORIQ_CHIP_SERIES, QORIQ_CHIP_NUMBER)
57
58#define QORIQ_CHIP_IS_T_VARIANT(variant) ((variant) / 10000 == 'T')
59
60extern unsigned BSP_bus_frequency;
61
62struct rtems_bsdnet_ifconfig;
63
64int BSP_tsec_attach(
65  struct rtems_bsdnet_ifconfig *config,
66  int attaching
67);
68
69int qoriq_if_intercom_attach_detach(
70  struct rtems_bsdnet_ifconfig *config,
71  int attaching
72);
73
74#if defined(HAS_UBOOT)
75  /* Routine to obtain U-Boot environment variables */
76  const char *bsp_uboot_getenv(
77    const char *name
78  );
79#endif
80
81void bsp_restart(void *addr) RTEMS_NO_RETURN;
82
83void *bsp_idle_thread( uintptr_t ignored );
84#define BSP_IDLE_TASK_BODY bsp_idle_thread
85
86#define RTEMS_BSP_NETWORK_DRIVER_ATTACH BSP_tsec_attach
87#define RTEMS_BSP_NETWORK_DRIVER_ATTACH4 qoriq_if_intercom_attach_detach
88
89#define RTEMS_BSP_NETWORK_DRIVER_NAME "tsec1"
90#define RTEMS_BSP_NETWORK_DRIVER_NAME2 "tsec2"
91#define RTEMS_BSP_NETWORK_DRIVER_NAME3 "tsec3"
92#define RTEMS_BSP_NETWORK_DRIVER_NAME4 "intercom1"
93
94/* Internal data and functions */
95
96typedef struct {
97  uint64_t addr;
98  uint64_t r3;
99  uint32_t reserved_0;
100  uint32_t pir;
101  uint64_t r6;
102  uint32_t reserved_1[8];
103} qoriq_start_spin_table;
104
105extern qoriq_start_spin_table *
106qoriq_start_spin_table_addr[QORIQ_CPU_COUNT / QORIQ_THREAD_COUNT];
107
108void qoriq_start_thread(void);
109
110void qoriq_restart_secondary_processor(
111  const qoriq_start_spin_table *spin_table
112) RTEMS_NO_RETURN;
113
114void qoriq_initialize_exceptions(void *interrupt_stack_begin);
115
116void qoriq_decrementer_dispatch(void);
117
118extern uint32_t bsp_time_base_frequency;
119
120extern uint32_t qoriq_clock_frequency;
121
122#ifdef __cplusplus
123}
124#endif /* __cplusplus */
125
126#endif /* ASM */
127
128#endif /* LIBBSP_POWERPC_QORIQ_BSP_H */
Note: See TracBrowser for help on using the repository browser.