source: rtems/bsps/powerpc/haleakala/include/mmu_405.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: 1.9 KB
Line 
1#ifndef _mmu_405_h
2#define _mmu_405_h
3
4/*
5   Simple interface to the PowerPC 405 MMU
6   
7   The intention here is just to allow the MMU to be used to define cacheability and
8   read/write/execute permissions in a simple enough way to fit entirely into the
9   64-entry TLB cache.
10   
11   This code does not do address relocation and does not generate any MMU-related interrupts.
12   
13   The process ID support is there for a possible future extension where RTEMS supports
14   setting the process ID on task switches, which allows per-process stack protection
15   
16   This code will call fatal_error() if your add_space() calls overrun the 64 entries
17
18   Michael Hamel ADInstruments 2008
19
20*/
21
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include "stdint.h"
28
29enum {
30        kAllProcessIDs = 0
31};
32
33typedef enum MMUAccessType {
34        executable,
35        readOnlyData,
36        readOnlyNoCache,
37        readWriteData,
38        readWriteNoCache,
39        readWriteExecutable
40} MMUAccessType;
41
42/* Initialise and clear the MMU */
43void            mmu_initialise();
44
45/* Turn on/off data access translation */
46bool            mmu_enable_data(bool enable);
47
48/* Turn on instruction translation */
49bool            mmu_enable_code(bool enable);
50
51/* Define properties for an area of memory (must be 1K-aligned) */
52void            mmu_add_space(uint32_t startAddr, uint32_t endAddr, MMUAccessType permissions, uint8_t processID);
53
54/* Delete a memory property definition */
55void            mmu_remove_space(uint32_t startAddr, uint32_t endAddr);
56
57/* Return number of TLB entries out of total in use */
58int                     mmu_get_tlb_count();
59
60/* Allocate a new process ID and return it */
61uint8_t         mmu_new_processID();
62
63/* Free a process ID that has been in use */
64void            mmu_free_processID(uint8_t freeThis);
65
66/* Return the current process ID */
67uint8_t         mmu_current_processID();
68
69/* Change the process ID to ID and return the old value */
70uint8_t         mmu_set_processID(uint8_t toID);
71
72
73#ifdef __cplusplus
74}
75#endif
76
77#endif //_mmu_405.h
Note: See TracBrowser for help on using the repository browser.