RTEMS
6.1-rc7
Loading...
Searching...
No Matches
cpukit
score
cpu
powerpc
include
rtems
score
powerpc.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
12
/*
13
* Author: Andrew Bray <andy@i-cubed.co.uk>
14
*
15
* COPYRIGHT (c) 1995 by i-cubed ltd.
16
*
17
* MPC860 support code was added by Jay Monkman <jmonkman@frasca.com>
18
* MPC8260 support added by Andy Dachs <a.dachs@sstl.co.uk>
19
* Surrey Satellite Technology Limited
20
*
21
* To anyone who acknowledges that this file is provided "AS IS"
22
* without any express or implied warranty:
23
* permission to use, copy, modify, and distribute this file
24
* for any purpose is hereby granted without fee, provided that
25
* the above copyright notice and this notice appears in all
26
* copies, and that the name of i-cubed limited not be used in
27
* advertising or publicity pertaining to distribution of the
28
* software without specific, written prior permission.
29
* i-cubed limited makes no representations about the suitability
30
* of this software for any purpose.
31
*
32
* Derived from c/src/exec/cpu/no_cpu/no_cpu.h:
33
*
34
* COPYRIGHT (c) 1989-1997.
35
* On-Line Applications Research Corporation (OAR).
36
*
37
* Redistribution and use in source and binary forms, with or without
38
* modification, are permitted provided that the following conditions
39
* are met:
40
* 1. Redistributions of source code must retain the above copyright
41
* notice, this list of conditions and the following disclaimer.
42
* 2. Redistributions in binary form must reproduce the above copyright
43
* notice, this list of conditions and the following disclaimer in the
44
* documentation and/or other materials provided with the distribution.
45
*
46
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
47
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
48
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
49
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
50
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
51
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
52
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
53
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
54
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
55
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
56
* POSSIBILITY OF SUCH DAMAGE.
57
*/
58
59
60
#ifndef _RTEMS_SCORE_POWERPC_H
61
#define _RTEMS_SCORE_POWERPC_H
62
63
#ifdef __cplusplus
64
extern
"C"
{
65
#endif
66
67
#include <
rtems/score/basedefs.h
>
68
69
/*
70
* Define the name of the CPU family.
71
*/
72
73
#define CPU_NAME "PowerPC"
74
75
/*
76
* This file contains the information required to build
77
* RTEMS for the PowerPC family.
78
*/
79
80
/* Generic ppc */
81
82
#ifdef _SOFT_FLOAT
83
#define CPU_MODEL_NAME "Generic (no FPU)"
84
#elif defined(__NO_FPRS__) || defined(__SPE__)
85
#define CPU_MODEL_NAME "Generic (E500/float-gprs/SPE)"
86
#else
87
#define CPU_MODEL_NAME "Generic (classic FPU)"
88
#endif
89
90
#ifdef __PPC_CPU_E6500__
91
#define PPC_DEFAULT_CACHE_LINE_POWER 6
92
#else
93
#define PPC_DEFAULT_CACHE_LINE_POWER 5
94
#endif
95
96
#define PPC_DEFAULT_CACHE_LINE_SIZE (1 << PPC_DEFAULT_CACHE_LINE_POWER)
97
98
#define PPC_STRUCTURE_ALIGNMENT PPC_DEFAULT_CACHE_LINE_SIZE
99
100
/*
101
* Application binary interfaces.
102
*
103
* PPC_ABI MUST be defined as one of these.
104
* Only big endian is currently supported.
105
*/
106
107
/*
108
* SVR4 ABI
109
*/
110
#define PPC_ABI_SVR4 2
111
/*
112
* Embedded ABI
113
*/
114
#define PPC_ABI_EABI 3
115
116
/*
117
* Default to the EABI used by current GNU tools
118
*/
119
120
#ifndef PPC_ABI
121
#define PPC_ABI PPC_ABI_EABI
122
#endif
123
124
/*
125
* Use worst case stack alignment. For the EABI an 8-byte alignment would be
126
* sufficient.
127
*/
128
129
#define PPC_STACK_ALIGN_POWER 4
130
#define PPC_STACK_ALIGNMENT (1 << PPC_STACK_ALIGN_POWER)
131
132
/*
133
* Assume PPC_HAS_FPU to be a synonym for _SOFT_FLOAT.
134
*/
135
136
#if defined(_SOFT_FLOAT) \
137
|| defined(__NO_FPRS__)
/* e500 has unified integer/FP registers */
\
138
|| defined(__PPC_CPU_E6500__)
139
#define PPC_HAS_FPU 0
140
#else
141
#define PPC_HAS_FPU 1
142
#endif
143
144
#if defined(__PPC_CPU_E6500__) && defined(__ALTIVEC__)
145
#define PPC_MULTILIB_ALTIVEC
146
#endif
147
148
#if defined(__PPC_CPU_E6500__) && !defined(_SOFT_FLOAT)
149
#define PPC_MULTILIB_FPU
150
#endif
151
152
#ifdef PPC_MULTILIB_ALTIVEC
153
#define PPC_ALIGNMENT 16
154
#else
155
#define PPC_ALIGNMENT 8
156
#endif
157
158
#ifdef __powerpc64__
159
#define PPC_STACK_RED_ZONE_SIZE 512
160
#else
161
#define PPC_STACK_RED_ZONE_SIZE 0
162
#endif
163
164
/*
165
* Unless specified above, If the model has FP support, it is assumed to
166
* support doubles (8-byte floating point numbers).
167
*
168
* If the model does NOT have FP support, then the model does
169
* NOT have double length FP registers.
170
*/
171
172
#if (PPC_HAS_FPU)
173
#define PPC_HAS_DOUBLE 1
174
#else
175
#define PPC_HAS_DOUBLE 0
176
#endif
177
178
/*
179
* Assemblers.
180
* PPC_ASM MUST be defined as one of these.
181
*
182
* PPC_ASM_ELF: ELF assembler. Currently used for all ABIs.
183
*
184
* NOTE: Only PPC_ABI_ELF is currently fully supported.
185
*
186
* Also NOTE: cpukit doesn't need this but asm.h which is defined
187
* in cpukit for consistency with other ports does.
188
*/
189
190
#define PPC_ASM_ELF 0
191
192
/*
193
* Default to the assembler format used by the current GNU tools.
194
*/
195
#define PPC_ASM PPC_ASM_ELF
196
197
198
#ifdef __cplusplus
199
}
200
#endif
201
202
#endif
/* _RTEMS_SCORE_POWERPC_H */
basedefs.h
This header file provides basic definitions used by the API and the implementation.
Generated by
1.9.6