source: rtems/cpukit/score/cpu/powerpc/include/rtems/score/powerpc.h @ bc16c65

5
Last change on this file since bc16c65 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: 4.1 KB
Line 
1/**
2 * @file
3 *
4 * @brief IBM/Motorola Power Pc Definitions
5 *
6 * This file contains definitions for the IBM/Motorola PowerPC
7 * family members.
8 */
9
10/*
11 *  Author:     Andrew Bray <andy@i-cubed.co.uk>
12 *
13 *  COPYRIGHT (c) 1995 by i-cubed ltd.
14 *
15 *  MPC860 support code was added by Jay Monkman <jmonkman@frasca.com>
16 *  MPC8260 support added by Andy Dachs <a.dachs@sstl.co.uk>
17 *  Surrey Satellite Technology Limited
18 *
19 *  To anyone who acknowledges that this file is provided "AS IS"
20 *  without any express or implied warranty:
21 *      permission to use, copy, modify, and distribute this file
22 *      for any purpose is hereby granted without fee, provided that
23 *      the above copyright notice and this notice appears in all
24 *      copies, and that the name of i-cubed limited not be used in
25 *      advertising or publicity pertaining to distribution of the
26 *      software without specific, written prior permission.
27 *      i-cubed limited makes no representations about the suitability
28 *      of this software for any purpose.
29 *
30 *  Derived from c/src/exec/cpu/no_cpu/no_cpu.h:
31 *
32 *  COPYRIGHT (c) 1989-1997.
33 *  On-Line Applications Research Corporation (OAR).
34 *
35 *  The license and distribution terms for this file may in
36 *  the file LICENSE in this distribution or at
37 *  http://www.rtems.org/license/LICENSE.
38 *
39 *
40 * Note:
41 *      This file is included by both C and assembler code ( -DASM )
42 */
43
44
45#ifndef _RTEMS_SCORE_POWERPC_H
46#define _RTEMS_SCORE_POWERPC_H
47
48#ifdef __cplusplus
49extern "C" {
50#endif
51
52#include <rtems/score/types.h>
53
54/*
55 *  Define the name of the CPU family.
56 */
57
58#define CPU_NAME "PowerPC"
59
60/*
61 *  This file contains the information required to build
62 *  RTEMS for the PowerPC family.
63 */
64
65/* Generic ppc */
66
67#ifdef _SOFT_FLOAT
68#define CPU_MODEL_NAME "Generic (no FPU)"
69#elif defined(__NO_FPRS__) || defined(__SPE__)
70#define CPU_MODEL_NAME "Generic (E500/float-gprs/SPE)"
71#else
72#define CPU_MODEL_NAME "Generic (classic FPU)"
73#endif
74
75#ifdef __PPC_CPU_E6500__
76#define PPC_DEFAULT_CACHE_LINE_POWER 6
77#else
78#define PPC_DEFAULT_CACHE_LINE_POWER 5
79#endif
80
81#define PPC_DEFAULT_CACHE_LINE_SIZE (1 << PPC_DEFAULT_CACHE_LINE_POWER)
82
83#define PPC_STRUCTURE_ALIGNMENT PPC_DEFAULT_CACHE_LINE_SIZE
84
85/*
86 *  Application binary interfaces.
87 *
88 *  PPC_ABI MUST be defined as one of these.
89 *  Only big endian is currently supported.
90 */
91
92/*
93 *  SVR4 ABI
94 */
95#define PPC_ABI_SVR4            2
96/*
97 *  Embedded ABI
98 */
99#define PPC_ABI_EABI            3
100
101/*
102 *  Default to the EABI used by current GNU tools
103 */
104
105#ifndef PPC_ABI
106#define PPC_ABI PPC_ABI_EABI
107#endif
108
109/*
110 *  Use worst case stack alignment.  For the EABI an 8-byte alignment would be
111 *  sufficient.
112 */
113
114#define PPC_STACK_ALIGN_POWER 4
115#define PPC_STACK_ALIGNMENT (1 << PPC_STACK_ALIGN_POWER)
116
117/*
118 *  Assume PPC_HAS_FPU to be a synonym for _SOFT_FLOAT.
119 */
120
121#if defined(_SOFT_FLOAT) \
122  || defined(__NO_FPRS__) /* e500 has unified integer/FP registers */ \
123  || defined(__PPC_CPU_E6500__)
124#define PPC_HAS_FPU 0
125#else
126#define PPC_HAS_FPU 1
127#endif
128
129#if defined(__PPC_CPU_E6500__) && defined(__ALTIVEC__)
130#define PPC_MULTILIB_ALTIVEC
131#endif
132
133#if defined(__PPC_CPU_E6500__) && !defined(_SOFT_FLOAT)
134#define PPC_MULTILIB_FPU
135#endif
136
137#ifdef PPC_MULTILIB_ALTIVEC
138#define PPC_ALIGNMENT 16
139#else
140#define PPC_ALIGNMENT 8
141#endif
142
143#ifdef __powerpc64__
144#define PPC_STACK_RED_ZONE_SIZE 512
145#else
146#define PPC_STACK_RED_ZONE_SIZE 0
147#endif
148
149/*
150 *  Unless specified above, If the model has FP support, it is assumed to
151 *  support doubles (8-byte floating point numbers).
152 *
153 *  If the model does NOT have FP support, then the model does
154 *  NOT have double length FP registers.
155 */
156
157#if (PPC_HAS_FPU)
158#define PPC_HAS_DOUBLE 1
159#else
160#define PPC_HAS_DOUBLE 0
161#endif
162
163/*
164 *  Assemblers.
165 *  PPC_ASM MUST be defined as one of these.
166 *
167 *  PPC_ASM_ELF:   ELF assembler. Currently used for all ABIs.
168 *
169 *  NOTE: Only PPC_ABI_ELF is currently fully supported.
170 *
171 *  Also NOTE: cpukit doesn't need this but asm.h which is defined
172 *             in cpukit for consistency with other ports does.
173 */
174
175#define PPC_ASM_ELF   0
176
177/*
178 *  Default to the assembler format used by the current GNU tools.
179 */
180#define PPC_ASM PPC_ASM_ELF
181
182
183#ifdef __cplusplus
184}
185#endif
186
187#endif /* _RTEMS_SCORE_POWERPC_H */
Note: See TracBrowser for help on using the repository browser.