source: rtems/bsps/arm/atsam/include/libchip/include/icm.h @ 71c5552f

5
Last change on this file since 71c5552f 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: 5.8 KB
Line 
1/* ---------------------------------------------------------------------------- */
2/*                  Atmel Microcontroller Software Support                      */
3/*                       SAM Software Package License                           */
4/* ---------------------------------------------------------------------------- */
5/* Copyright (c) 2015, Atmel Corporation                                        */
6/*                                                                              */
7/* All rights reserved.                                                         */
8/*                                                                              */
9/* Redistribution and use in source and binary forms, with or without           */
10/* modification, are permitted provided that the following condition is met:    */
11/*                                                                              */
12/* - Redistributions of source code must retain the above copyright notice,     */
13/* this list of conditions and the disclaimer below.                            */
14/*                                                                              */
15/* Atmel's name may not be used to endorse or promote products derived from     */
16/* this software without specific prior written permission.                     */
17/*                                                                              */
18/* DISCLAIMER:  THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR   */
19/* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
20/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE   */
21/* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,      */
22/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
23/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,  */
24/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF    */
25/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING         */
26/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
27/* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                           */
28/* ---------------------------------------------------------------------------- */
29
30#ifndef _ICM_
31#define _ICM_
32
33/*------------------------------------------------------------------------------
34 *         Headers
35 *------------------------------------------------------------------------------*/
36
37#include "chip.h"
38
39
40/*------------------------------------------------------------------------------*/
41/*         Definition                                                           */
42/*------------------------------------------------------------------------------*/
43#define ICM_RCFG_CDWBN (0x1u << 0)
44/**< \brief (ICM_RCFG) Compare Digest or Write Back Digest */
45#define ICM_RCFG_WRAP (0x1u << 1)
46/**< \brief (ICM_RCFG) Wrap Command */
47#define ICM_RCFG_EOM (0x1u << 2)
48/**< \brief (ICM_RCFG) End Of Monitoring */
49#define ICM_RCFG_RHIEN (0x1u << 4)
50/**< \brief (ICM_RCFG) Region Hash Completed interrupt enable */
51#define ICM_RCFG_DMIEN (0x1u << 5)
52/**< \brief (ICM_RCFG) Digest Mismatch interrupt enable */
53#define ICM_RCFG_BEIEN (0x1u << 6)
54/**< \brief (ICM_RCFG) Bus error interrupt enable  */
55#define ICM_RCFG_WCIEN (0x1u << 7)
56/**< \brief (ICM_RCFG) Warp condition interrupt enable  */
57#define ICM_RCFG_ECIEN (0x1u << 8)
58/**< \brief (ICM_RCFG) End bit condition interrupt enable  */
59#define ICM_RCFG_SUIEN (0x1u << 9)
60/**< \brief (ICM_RCFG) Monitoring Status Updated Condition Interrupt Enable  */
61#define ICM_RCFG_PROCDLY (0x1u << 10)
62/**< \brief (ICM_RCFG) Processing Delay*/
63#define ICM_RCFG_UALGO_Pos 12
64#define ICM_RCFG_UALGO_Msk (0x7u << ICM_RCFG_UALGO_Pos)
65/**< \brief (ICM_RCFG) User SHA Algorithm */
66#define   ICM_RCFG_ALGO_SHA1 (0x0u << 12)
67/**< \brief (ICM_RCFG) SHA1 algorithm processed */
68#define   ICM_RCFG_ALGO_SHA256 (0x1u << 12)
69/**< \brief (ICM_RCFG) SHA256 algorithm processed */
70#define   ICM_RCFG_ALGO_SHA224 (0x4u << 12)
71/**< \brief (ICM_RCFG) SHA224 algorithm processed */
72#define ICM_RCFG_MRPROT_Pos 24
73#define ICM_RCFG_MRPROT_Msk (0x3fu << ICM_RCFG_MRPROT_Pos)
74/**< \brief (ICM_RCFG) Memory Region AHB Protection */
75#define ICM_RCFG_MRPROT(value) \
76        ((ICM_RCFG_MRPROT_Msk & ((value) << ICM_RCFG_MRPROT_Pos)))
77
78/*----------------------------------------------------------------------------*/
79/*         Type                                                               */
80/*----------------------------------------------------------------------------*/
81
82/** \brief Structure ICM region descriptor area. */
83typedef struct _LinkedListDescriporIcmRegion {
84        /** the first byte address of the Region. */
85        uint32_t icm_raddr;
86        /** Configuration Structure Member. */
87        uint32_t icm_rcfg;
88        /** Control Structure Member. */
89        uint32_t icm_rctrl;
90        /** Next Address Structure Member. */
91        uint32_t icm_rnext;
92} LinkedListDescriporIcmRegion;
93
94/*----------------------------------------------------------------------------*/
95/*         Exported functions                                                 */
96/*----------------------------------------------------------------------------*/
97extern void ICM_Enable(void);
98extern void ICM_Disable(void);
99extern void ICM_SoftReset(void);
100extern void ICM_ReComputeHash(uint8_t region);
101extern void ICM_EnableMonitor(uint8_t region);
102extern void ICM_DisableMonitor(uint8_t region);
103extern void ICM_Configure(uint32_t mode);
104extern void ICM_EnableIt(uint32_t sources);
105extern void ICM_DisableIt(uint32_t sources);
106extern uint32_t ICM_GetIntStatus(void);
107extern uint32_t ICM_GetStatus(void);
108extern uint32_t ICM_GetUStatus(void);
109extern void ICM_SetDescStartAddress(uint32_t addr);
110extern void ICM_SetHashStartAddress(uint32_t addr);
111extern void ICM_SetInitHashValue(uint32_t val);
112#endif /* #ifndef _ICM_ */
Note: See TracBrowser for help on using the repository browser.