source: rtems/c/src/exec/score/cpu/powerpc/ppc.h @ 541dfb2

4.104.114.84.95
Last change on this file since 541dfb2 was 541dfb2, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 29, 1997 at 12:22:24 AM

Removed definitions which are now in targopts.h. This eliminates the
need for the "sed'ing" of this file. This should be a significant win
when addressing non-unix host and non-gnu toolsets.

  • Property mode set to 100644
File size: 7.2 KB
Line 
1/*  ppc.h
2 *
3 *  This file contains definitions for the IBM/Motorola PowerPC
4 *  family members.
5 *
6 *  Author:     Andrew Bray <andy@i-cubed.co.uk>
7 *
8 *  COPYRIGHT (c) 1995 by i-cubed ltd.
9 *
10 *  To anyone who acknowledges that this file is provided "AS IS"
11 *  without any express or implied warranty:
12 *      permission to use, copy, modify, and distribute this file
13 *      for any purpose is hereby granted without fee, provided that
14 *      the above copyright notice and this notice appears in all
15 *      copies, and that the name of i-cubed limited not be used in
16 *      advertising or publicity pertaining to distribution of the
17 *      software without specific, written prior permission.
18 *      i-cubed limited makes no representations about the suitability
19 *      of this software for any purpose.
20 *
21 *  Derived from c/src/exec/cpu/no_cpu/no_cpu.h:
22 *
23 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
24 *  On-Line Applications Research Corporation (OAR).
25 *
26 *  This material may be reproduced by or for the U.S. Government pursuant
27 *  to the copyright license under the clause at DFARS 252.227-7013.  This
28 *  notice must appear in all copies of this file and its derivatives.
29 *
30 *
31 * Note:
32 *      This file is included by both C and assembler code ( -DASM )
33 *
34 *  $Id$
35 */
36
37#ifndef _INCLUDE_PPC_h
38#define _INCLUDE_PPC_h
39
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44/*
45 *  This file contains the information required to build
46 *  RTEMS for a particular member of the "no cpu"
47 *  family when executing in protected mode.  It does
48 *  this by setting variables to indicate which implementation
49 *  dependent features are present in a particular member
50 *  of the family.
51 */
52 
53#if defined(ppc403)
54 
55#define CPU_MODEL_NAME  "PowerPC 403"
56
57#define PPC_ALIGNMENT           4
58#define PPC_CACHE_ALIGNMENT     16
59#define PPC_CACHE_ALIGN_POWER   4
60#define PPC_INTERRUPT_MAX       16
61#define PPC_HAS_FPU             0
62#define PPC_HAS_DOUBLE          0
63#define PPC_HAS_RFCI            1
64#define PPC_MSR_DISABLE_MASK    0x00029200
65#define PPC_MSR_INITIAL         0x00000000
66#define PPC_INIT_FPSCR          0x00000000
67#define PPC_USE_MULTIPLE        1
68#define PPC_I_CACHE             2048
69#define PPC_D_CACHE             1024
70
71#define PPC_MSR_0               0x00029200
72#define PPC_MSR_1               0x00021200
73#define PPC_MSR_2               0x00021000
74#define PPC_MSR_3               0x00000000
75
76#elif defined(ppc601)
77 
78#define CPU_MODEL_NAME  "PowerPC 601"
79
80#define PPC_ALIGNMENT           8
81#define PPC_CACHE_ALIGNMENT     32
82#define PPC_CACHE_ALIGN_POWER   5
83#define PPC_INTERRUPT_MAX       16
84#define PPC_HAS_FPU             1
85#define PPC_HAS_DOUBLE          1
86#define PPC_HAS_RFCI            0
87#define PPC_MSR_DISABLE_MASK    0x00009900
88#define PPC_MSR_INITIAL         0x00002000
89#define PPC_INIT_FPSCR          0x000000f8
90#define PPC_USE_MULTIPLE        1
91#define PPC_I_CACHE             0
92#define PPC_D_CACHE             32768
93
94#define PPC_MSR_0               0x00009900
95#define PPC_MSR_1               0x00001000
96#define PPC_MSR_2               0x00001000
97#define PPC_MSR_3               0x00000000
98 
99#elif defined(ppc602)
100 
101#define CPU_MODEL_NAME  "PowerPC 602"
102
103#define PPC_ALIGNMENT           4
104#define PPC_CACHE_ALIGNMENT     32
105#define PPC_CACHE_ALIGN_POWER   5
106#define PPC_INTERRUPT_MAX       16
107#define PPC_HAS_FPU             1
108#define PPC_HAS_DOUBLE          0
109#define PPC_HAS_RFCI            0
110#define PPC_MSR_DISABLE_MASK   
111#define PPC_MSR_INITIAL         
112#define PPC_INIT_FPSCR         
113#define PPC_USE_MULTIPLE        0
114#define PPC_I_CACHE             4096
115#define PPC_D_CACHE             4096
116
117#elif defined(ppc603)
118 
119#define CPU_MODEL_NAME  "PowerPC 603"
120
121#define PPC_ALIGNMENT           8
122#define PPC_CACHE_ALIGNMENT     32
123#define PPC_CACHE_ALIGN_POWER   5
124#define PPC_INTERRUPT_MAX       16
125#define PPC_HAS_FPU             1
126#define PPC_HAS_DOUBLE          1
127#define PPC_HAS_RFCI            0
128#define PPC_MSR_DISABLE_MASK    0x00009900
129#define PPC_MSR_INITIAL         0x00002000
130#define PPC_INIT_FPSCR          0x000000f8
131#define PPC_USE_MULTIPLE        0
132#define PPC_I_CACHE             8192
133#define PPC_D_CACHE             8192
134
135#define PPC_MSR_0               0x00009900
136#define PPC_MSR_1               0x00001000
137#define PPC_MSR_2               0x00001000
138#define PPC_MSR_3               0x00000000
139
140#elif defined(ppc603e)
141 
142#define CPU_MODEL_NAME  "PowerPC 603e"
143
144#define PPC_ALIGNMENT           8
145#define PPC_CACHE_ALIGNMENT     32
146#define PPC_CACHE_ALIGN_POWER   5
147#define PPC_INTERRUPT_MAX       16
148#define PPC_HAS_FPU             1
149#define PPC_HAS_DOUBLE          1
150#define PPC_HAS_RFCI            0
151#define PPC_MSR_DISABLE_MASK    0x00009900
152#define PPC_MSR_INITIAL         0x00002000
153#define PPC_INIT_FPSCR          0x000000f8
154#define PPC_USE_MULTIPLE        0
155#define PPC_I_CACHE             16384
156#define PPC_D_CACHE             16384
157
158#define PPC_MSR_0               0x00009900
159#define PPC_MSR_1               0x00001000
160#define PPC_MSR_2               0x00001000
161#define PPC_MSR_3               0x00000000
162
163#elif defined(ppc604)
164 
165#define CPU_MODEL_NAME  "PowerPC 604"
166
167#define PPC_ALIGNMENT           8
168#define PPC_CACHE_ALIGNMENT     32
169#define PPC_CACHE_ALIGN_POWER   5
170#define PPC_INTERRUPT_MAX       16
171#define PPC_HAS_FPU             1
172#define PPC_HAS_DOUBLE          1
173#define PPC_HAS_RFCI            0
174#define PPC_MSR_DISABLE_MASK    0x00009900
175#define PPC_MSR_INITIAL         0x00002000
176#define PPC_INIT_FPSCR          0x000000f8
177#define PPC_USE_MULTIPLE        0
178#define PPC_I_CACHE             16384
179#define PPC_D_CACHE             16384
180 
181#define PPC_MSR_0               0x00009900
182#define PPC_MSR_1               0x00001000
183#define PPC_MSR_2               0x00001000
184#define PPC_MSR_3               0x00000000
185
186#else
187 
188#error "Unsupported CPU Model"
189 
190#endif
191
192/*
193 *  Application binary interfaces.
194 *  PPC_ABI MUST be defined as one of these.
195 *  Only PPC_ABI_POWEROPEN is currently fully supported.
196 *  Only EABI will be supported in the end when
197 *  the tools are there.
198 *  Only big endian is currently supported.
199 */
200/*
201 *  PowerOpen ABI.  This is Andy's hack of the
202 *  PowerOpen ABI to ELF.  ELF rather than a
203 *  XCOFF assembler is used.  This may work
204 *  if PPC_ASM == PPC_ASM_XCOFF is defined.
205 */
206#define PPC_ABI_POWEROPEN       0
207/*
208 *  GCC 2.7.0 munched version of EABI, with
209 *  PowerOpen calling convention and stack frames,
210 *  but EABI style indirect function calls.
211 */
212#define PPC_ABI_GCC27           1
213/*
214 *  SVR4 ABI
215 */
216#define PPC_ABI_SVR4            2
217/*
218 *  Embedded ABI
219 */
220#define PPC_ABI_EABI            3
221
222#if (PPC_ABI == PPC_ABI_POWEROPEN)
223#define PPC_STACK_ALIGNMENT     8
224#elif (PPC_ABI == PPC_ABI_GCC27)
225#define PPC_STACK_ALIGNMENT     8
226#elif (PPC_ABI == PPC_ABI_SVR4)
227#define PPC_STACK_ALIGNMENT     16
228#elif (PPC_ABI == PPC_ABI_EABI)
229#define PPC_STACK_ALIGNMENT     8
230#else
231#error  "PPC_ABI is not properly defined"
232#endif
233#ifndef PPC_ABI
234#error  "PPC_ABI is not properly defined"
235#endif
236
237/*
238 *  Assemblers.
239 *  PPC_ASM MUST be defined as one of these.
240 *  Only PPC_ABI_ELF is currently fully supported.
241 */
242/*
243 *  ELF assembler. Currently used for all ABIs.
244 */
245#define PPC_ASM_ELF             0
246/*
247 *  XCOFF assembler, may be needed for PowerOpen ABI.
248 */
249#define PPC_ASM_XCOFF           1
250
251/*
252 *  Define the name of the CPU family.
253 */
254
255#define CPU_NAME "PowerPC"
256
257/*
258 *  Interrupt vectors.
259 */
260/* Machine check */
261#define PPC_IRQ_MCHECK          0
262/* Protection violation */
263#define PPC_IRQ_PROTECT         1
264/* External interrupt */
265#define PPC_IRQ_EXTERNAL        2
266/* Program exception */
267#define PPC_IRQ_PROGRAM         3
268/* System call */
269#define PPC_IRQ_SCALL           4
270/* Floating point unavailable */
271#define PPC_IRQ_NOFP            5
272/* Program interval timer */
273#define PPC_IRQ_PIT             6
274/* Fixed interval timer */
275#define PPC_IRQ_FIT             7
276/* Critical interrupt pin */
277#define PPC_IRQ_CRIT            8
278/* Watchdog timer */
279#define PPC_IRQ_WATCHDOG        9
280/* Debug exceptions */
281#define PPC_IRQ_DEBUG           10
282
283/*
284 *  The following exceptions are not maskable, and are not
285 *  necessarily predictable, so cannot be offered to RTEMS:
286 *    Alignment exception - handled by the CPU module
287 *    Data exceptions.
288 *    Instruction exceptions.
289 */
290
291#ifdef __cplusplus
292}
293#endif
294
295#endif /* ! _INCLUDE_PPC_h */
296/* end of include file */
Note: See TracBrowser for help on using the repository browser.