source: rtems/bsps/powerpc/mvme5500/include/bsp.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.2 KB
Line 
1/*
2 *  Copyright (C) 1999 Eric Valette. valette@crf.canon.fr
3 *
4 *  The license and distribution terms for this file may be
5 *  found in the file LICENSE in this distribution or at
6 *  http://www.rtems.org/license/LICENSE.
7 *
8 *  (C) S. Kate Feng 2003-2007 : Modified it to support the mvme5500 BSP.
9 */
10
11#ifndef LIBBSP_POWERPC_MVME5500_BSP_H
12#define LIBBSP_POWERPC_MVME5500_BSP_H
13
14#ifndef ASM
15
16#include <bspopts.h>
17#include <bsp/default-initial-extension.h>
18
19#include <rtems.h>
20#include <libcpu/io.h>
21#include <bsp/vectors.h>
22
23/* Board type */
24typedef enum {
25  undefined = 0,
26  MVME5500,
27  MVME6100
28} BSP_BoardTypes;
29
30BSP_BoardTypes BSP_getBoardType(void);
31
32/* Board type */
33typedef enum {
34  Undefined,
35  UNIVERSE2,
36  TSI148,
37} BSP_VMEchipTypes;
38
39BSP_VMEchipTypes BSP_getVMEchipType(void);
40
41/* The version of Discovery system controller */
42
43typedef enum {
44  notdefined,
45  GT64260A,
46  GT64260B,
47  MV64360,
48} DiscoveryChipVersion;
49
50DiscoveryChipVersion BSP_getDiscoveryChipVersion(void);
51
52#define _256M           0x10000000
53#define _512M           0x20000000
54
55#define GT64x60_REG_BASE        0xf1000000  /* Base of GT64260 Reg Space */
56#define GT64x60_REG_SPACE_SIZE  0x10000     /* 64Kb Internal Reg Space */
57
58#define GT64x60_DEV1_BASE       0xf1100000  /* Device bank1(chip select 1) base
59                                             */
60#define GT64260_DEV1_SIZE       0x00100000 /* Device bank size */
61
62/* fundamental addresses for this BSP (PREPxxx are from libcpu/io.h) */
63#define _IO_BASE GT64x60_REG_BASE
64
65#define BSP_NVRAM_BASE_ADDR     0xf1110000
66
67#define BSP_RTC_INTA_REG        0x7ff0
68#define BSP_RTC_SECOND          0x7ff2
69#define BSP_RTC_MINUTE          0x7ff3
70#define BSP_RTC_HOUR            0x7ff4
71#define BSP_RTC_DATE            0x7ff5
72#define BSP_RTC_INTERRUPTS      0x7ff6
73#define BSP_RTC_WATCHDOG        0x7ff7
74
75/* PCI0 Domain I/O space */
76#define PCI0_IO_BASE            0xf0000000
77#define PCI1_IO_BASE            0xf0800000
78
79/* PCI 0 memory space as seen from the CPU */
80#define PCI0_MEM_BASE                  0x80000000
81#define PCI_MEM_BASE                   0  /* glue for vmeUniverse */
82#define PCI_MEM_BASE_ADJUSTMENT        0
83
84/* address of our ram on the PCI bus */
85#define  PCI_DRAM_OFFSET          0
86
87/* PCI 1 memory space as seen from the CPU */
88#define PCI1_MEM_BASE           0xe0000000
89#define PCI1_MEM_SIZE           0x10000000
90
91/* Needed for hot adding via PMCspan on the PCI0 local bus.
92 * This is board dependent, only because mvme5500
93 * supports hot adding and has more than one local PCI
94 * bus.
95 */
96#define BSP_MAX_PCI_BUS_ON_PCI0 8
97#define BSP_MAX_PCI_BUS_ON_PCI1 2
98#define BSP_MAX_PCI_BUS  (BSP_MAX_PCI_BUS_ON_PCI0+BSP_MAX_PCI_BUS_ON_PCI1)
99
100
101/* The glues to Till's vmeUniverse, although the name does not
102 * actually reflect the relevant architect of the MVME5500.
103 */
104#define BSP_PCI_IRQ0 BSP_GPP_IRQ_LOWEST_OFFSET
105
106/*
107 *  confdefs.h overrides for this BSP:
108 *   - Interrupt stack space is not minimum if defined.
109 */
110#define BSP_INTERRUPT_STACK_SIZE  (16 * 1024) /* <skf> 2/09 wants it to be adjustable by BSP */
111
112/* uart.c uses out_8 instead of outb  */
113#define BSP_UART_IOBASE_COM1  GT64x60_DEV1_BASE + 0x20000
114#define BSP_UART_IOBASE_COM2  GT64x60_DEV1_BASE + 0x21000
115
116#define BSP_CONSOLE_PORT    BSP_UART_COM1  /* console */
117#define BSP_UART_BAUD_BASE    115200
118
119/*
120 * Total memory using RESIDUAL DATA
121 */
122extern unsigned int BSP_mem_size;
123/*
124 * PCI Bus Frequency
125 */
126extern unsigned int BSP_bus_frequency;
127/*
128 * processor clock frequency
129 */
130extern unsigned int BSP_processor_frequency;
131/*
132 * Time base divisior (how many tick for 1 second).
133 */
134extern unsigned int BSP_time_base_divisor;
135
136#define BSP_Convert_decrementer( _value ) \
137  ((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value)))
138
139extern void bsp_reset(void);
140/* extern int printk(const char *, ...) __attribute__((format(printf, 1, 2))); */
141extern int BSP_disconnect_clock_handler(void);
142extern int BSP_connect_clock_handler(void);
143
144unsigned long _BSP_clear_hostbridge_errors(int enableMCP, int quiet);
145
146/*
147 * Prototypes for methods called only from .S for dependency tracking
148 */
149char *save_boot_params(
150  void *r3,
151  void *r4,
152  void *r5,
153  char *cmdline_start,
154  char *cmdline_end
155);
156void zero_bss(void);
157
158/*
159 * Prototypes for methods in the BSP that cross file boundaries
160 */
161uint32_t probeMemoryEnd(void);
162void     pci_interface(void);
163void     BSP_printPicIsrTbl(void);
164int I2Cread_eeprom(
165  unsigned char  I2cBusAddr,
166  uint32_t       devA2A1A0,
167  uint32_t       AddrBytes,
168  unsigned char *pBuff,
169  uint32_t       numBytes
170);
171
172#if 0
173#define RTEMS_BSP_NETWORK_DRIVER_NAME  "gt1"
174#define RTEMS_BSP_NETWORK_DRIVER_ATTACH  rtems_GT64260eth_driver_attach
175#else
176#define RTEMS_BSP_NETWORK_DRIVER_NAME  "wmG1"
177#define RTEMS_BSP_NETWORK_DRIVER_ATTACH  rtems_i82544EI_driver_attach
178#endif
179
180extern int RTEMS_BSP_NETWORK_DRIVER_ATTACH();
181
182#define gccMemBar() RTEMS_COMPILER_MEMORY_BARRIER()
183
184static inline void lwmemBar(void)
185{
186    __asm__ volatile("lwsync":::"memory");
187}
188
189static inline void io_flush(void)
190{
191    __asm__ volatile("isync":::"memory");
192}
193
194static inline void memBar(void)
195{
196    __asm__ volatile("sync":::"memory");
197}
198
199static inline void ioBar(void)
200{
201    __asm__ volatile("eieio":::"memory");
202}
203
204#endif
205
206#endif /* !ASM */
Note: See TracBrowser for help on using the repository browser.