RTEMS 7.0-rc1
Loading...
Searching...
No Matches
arm.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/*
12 * COPYRIGHT (c) 2000 Canon Research Centre France SA.
13 * Emmanuel Raguet, mailto:raguet@crf.canon.fr
14 *
15 * Copyright (c) 2002 Advent Networks, Inc.
16 * Jay Monkman <jmonkman@adventnetworks.com>
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions
20 * are met:
21 * 1. Redistributions of source code must retain the above copyright
22 * notice, this list of conditions and the following disclaimer.
23 * 2. Redistributions in binary form must reproduce the above copyright
24 * notice, this list of conditions and the following disclaimer in the
25 * documentation and/or other materials provided with the distribution.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
31 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37 * POSSIBILITY OF SUCH DAMAGE.
38 *
39 */
40
41#ifndef _RTEMS_SCORE_ARM_H
42#define _RTEMS_SCORE_ARM_H
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
54#if __ARM_ARCH == 8 && __ARM_ARCH_PROFILE == 'M'
55 #define CPU_MODEL_NAME "ARMv8M"
56 #define ARM_MULTILIB_ARCH_V7M
57#elif __ARM_ARCH == 7 && __ARM_ARCH_PROFILE == 'M'
58 #define CPU_MODEL_NAME "ARMv7M"
59 #define ARM_MULTILIB_ARCH_V7M
60#elif defined(__ARM_ARCH_6M__)
61 #define CPU_MODEL_NAME "ARMv6M"
62 #define ARM_MULTILIB_ARCH_V6M
63#else
64 #define CPU_MODEL_NAME "ARMv4"
65 #define ARM_MULTILIB_ARCH_V4
66#endif
67
68#if __ARM_ARCH >= 7
69 #define ARM_MULTILIB_HAS_WFI
70 #define ARM_MULTILIB_HAS_LOAD_STORE_EXCLUSIVE
71 #define ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS
72 #define ARM_MULTILIB_HAS_STORE_RETURN_STATE
73#endif
74
75#ifndef ARM_DISABLE_THREAD_ID_REGISTER_USE
76 #if (__ARM_ARCH >= 7 && __ARM_ARCH_PROFILE != 'M') \
77 || __ARM_ARCH == 6
78 #define ARM_MULTILIB_HAS_THREAD_ID_REGISTER
79 #endif
80#endif
81
82#if defined(__ARM_ARCH_7A__) || (__ARM_ARCH >= 8 && __ARM_ARCH_PROFILE != 'M')
83 #define ARM_MULTILIB_CACHE_LINE_MAX_64
84#endif
85
86#if __ARM_ARCH >= 7
87 #define ARM_MULTILIB_HAS_CPACR
88#endif
89
90#if !defined(__SOFTFP__)
91 #if defined(__ARM_NEON__)
92 #define ARM_MULTILIB_VFP_D32
93 #elif defined(__VFP_FP__)
94 #define ARM_MULTILIB_VFP_D16
95 #else
96 #error "FPU support not implemented"
97 #endif
98#endif
99
100#if defined(ARM_MULTILIB_VFP_D16) \
101 || defined(ARM_MULTILIB_VFP_D32)
102 #define ARM_MULTILIB_VFP
103#endif
104
105/*
106 * Define the name of the CPU family.
107 */
108
109#define CPU_NAME "ARM"
110
113#ifdef __cplusplus
114}
115#endif
116
117#endif /* _RTEMS_SCORE_ARM_H */