source: rtems/cpukit/score/cpu/powerpc/rtems/score/powerpc.h @ 52ebfcb

4.104.114.84.95
Last change on this file since 52ebfcb was 52ebfcb, checked in by Ralf Corsepius <ralf.corsepius@…>, on 02/10/05 at 05:29:02

2005-02-10 Ralf Corsepius <ralf.corsepius@…>

  • rtems/score/powerpc.h: Remove hard-coded PPC_HAS_FPU. Tie PPC_HAS_FPU to _SOFT_FLOAT.
  • Property mode set to 100644
File size: 22.7 KB
Line 
1/**
2 * @file rtems/score/powerpc.h
3 */
4
5/*
6 *  This file contains definitions for the IBM/Motorola PowerPC
7 *  family members.
8 *
9 *  Author:     Andrew Bray <andy@i-cubed.co.uk>
10 *
11 *  COPYRIGHT (c) 1995 by i-cubed ltd.
12 *
13 *  MPC860 support code was added by Jay Monkman <jmonkman@frasca.com>
14 *  MPC8260 support added by Andy Dachs <a.dachs@sstl.co.uk>
15 *  Surrey Satellite Technology Limited
16 *
17 *  To anyone who acknowledges that this file is provided "AS IS"
18 *  without any express or implied warranty:
19 *      permission to use, copy, modify, and distribute this file
20 *      for any purpose is hereby granted without fee, provided that
21 *      the above copyright notice and this notice appears in all
22 *      copies, and that the name of i-cubed limited not be used in
23 *      advertising or publicity pertaining to distribution of the
24 *      software without specific, written prior permission.
25 *      i-cubed limited makes no representations about the suitability
26 *      of this software for any purpose.
27 *
28 *  Derived from c/src/exec/cpu/no_cpu/no_cpu.h:
29 *
30 *  COPYRIGHT (c) 1989-1997.
31 *  On-Line Applications Research Corporation (OAR).
32 *
33 *  The license and distribution terms for this file may in
34 *  the file LICENSE in this distribution or at
35 *  http://www.rtems.com/license/LICENSE.
36 *
37 *
38 * Note:
39 *      This file is included by both C and assembler code ( -DASM )
40 *
41 *  $Id$
42 */
43
44
45#ifndef _RTEMS_SCORE_POWERPC_H
46#define _RTEMS_SCORE_POWERPC_H
47
48#ifdef __cplusplus
49extern "C" {
50#endif
51
52#include <rtems/score/types.h>
53
54/*
55 *  Define the name of the CPU family.
56 */
57
58#define CPU_NAME "PowerPC"
59
60/*
61 *  This file contains the information required to build
62 *  RTEMS for a particular member of the PowerPC family.  It does
63 *  this by setting variables to indicate which implementation
64 *  dependent features are present in a particular member
65 *  of the family.
66 *
67 *  The following architectural feature definitions are defaulted
68 *  unless specifically set by the model definition:
69 *
70 *    + PPC_INTERRUPT_MAX        - 16
71 *    + PPC_CACHE_ALIGNMENT      - 32
72 *    + PPC_LOW_POWER_MODE       - PPC_LOW_POWER_MODE_NONE
73 *    + PPC_HAS_EXCEPTION_PREFIX - 1
74 *    + PPC_HAS_FPU              - 1
75 *    + PPC_HAS_DOUBLE           - 1 if PPC_HAS_FPU,
76 *                               - 0 otherwise
77 *    + PPC_USE_MULTIPLE         - 0
78 */
79 
80/*
81 *  Define the low power mode models
82 *
83 *  Standard:   as defined for 603e
84 *  Nap Mode:   nap mode only (604)
85 *  XXX 403GB, 603, 603e, 604, 821
86 */
87
88#define PPC_LOW_POWER_MODE_NONE      0
89#define PPC_LOW_POWER_MODE_STANDARD  1
90
91/*
92 *  Figure out all CPU Model Feature Flags based upon compiler
93 *  predefines.
94 */
95
96#if defined(ppc403) || defined(ppc405)
97/*
98 *  IBM 403
99 *
100 *  Developed for 403GA.  Book checked for 403GB.
101 *
102 *  Does not have user mode.
103 */
104 
105#if defined(ppc403)
106#define CPU_MODEL_NAME "PowerPC 403"
107#elif defined (ppc405)
108#define CPU_MODEL_NAME "PowerPC 405"
109#endif
110#define PPC_ALIGNMENT           4 
111#define PPC_CACHE_ALIGNMENT     16
112#define PPC_HAS_RFCI            1
113#define PPC_USE_MULTIPLE        1
114#define PPC_I_CACHE             2048
115#define PPC_D_CACHE             1024
116
117#define PPC_HAS_EXCEPTION_PREFIX 0
118#define PPC_HAS_EVPR             1
119
120#elif defined(mpc555)
121
122#define CPU_MODEL_NAME  "PowerPC 555"
123
124/* Copied from mpc505 */
125#define PPC_ALIGNMENT           4
126#define PPC_CACHE_ALIGNMENT     16
127
128/* Added by querbach@realtime.bc.ca */
129#define PPC_LOW_POWER_MODE      PPC_LOW_POWER_MODE_STANDARD
130
131/* Based on comments by Sergei Organov <osv@Javad.RU> */
132#define PPC_I_CACHE             0
133#define PPC_D_CACHE             0
134
135#elif defined(mpc505) || defined(mpc509)
136/*
137 *  Submitted by Sergei Organov <osv@Javad.RU> as a patch against
138 *  3.6.0 long after 4.0 was released.   This is just an attempt
139 *  to get the setting correct.
140 */
141
142#define CPU_MODEL_NAME  "PowerPC 505/509"
143
144#define PPC_ALIGNMENT           4
145#define PPC_CACHE_ALIGNMENT     16
146#define PPC_I_CACHE             4096
147#define PPC_D_CACHE             0
148
149
150#elif defined(ppc601)
151
152/*
153 *  Submitted with original port -- book checked only.
154 */
155 
156#define CPU_MODEL_NAME  "PowerPC 601"
157
158#define PPC_ALIGNMENT           8
159#define PPC_USE_MULTIPLE        1
160#define PPC_I_CACHE             0
161#define PPC_D_CACHE             32768
162
163#elif defined(ppc602)
164/*
165 *  Submitted with original port -- book checked only.
166 */
167 
168#define CPU_MODEL_NAME  "PowerPC 602"
169
170#define PPC_ALIGNMENT           4
171#define PPC_HAS_DOUBLE          0
172#define PPC_I_CACHE             4096
173#define PPC_D_CACHE             4096
174
175#elif defined(ppc603)
176/*
177 *  Submitted with original port -- book checked only.
178 */
179 
180#define CPU_MODEL_NAME  "PowerPC 603"
181
182#define PPC_ALIGNMENT           8
183#define PPC_I_CACHE             8192
184#define PPC_D_CACHE             8192
185
186#elif defined(ppc603e)
187 
188#define CPU_MODEL_NAME  "PowerPC 603e"
189/*
190 *  Submitted with original port.
191 *
192 *  Known to work on real hardware.
193 */
194
195#define PPC_ALIGNMENT           8
196#define PPC_I_CACHE             16384
197#define PPC_D_CACHE             16384
198
199#define PPC_LOW_POWER_MODE PPC_LOW_POWER_MODE_STANDARD
200
201#elif defined(mpc604)
202/*
203 *  Submitted with original port -- book checked only.
204 */
205 
206#define CPU_MODEL_NAME  "PowerPC 604"
207
208#define PPC_ALIGNMENT           8
209#define PPC_I_CACHE             16384
210#define PPC_D_CACHE             16384
211 
212#elif defined(mpc860)
213/*
214 *  Added by Jay Monkman (jmonkman@frasca.com) 6/28/98
215 *  with some changes by Darlene Stewart (Darlene.Stewart@iit.nrc.ca)
216 */
217#define CPU_MODEL_NAME  "PowerPC MPC860"
218
219#define PPC_ALIGNMENT           4
220#define PPC_I_CACHE             4096
221#define PPC_D_CACHE             4096
222#define PPC_CACHE_ALIGNMENT     16
223#define PPC_INTERRUPT_MAX       71
224#define PPC_USE_MULTIPLE        1
225
226#define PPC_MSR_0               0x00009000
227#define PPC_MSR_1               0x00001000
228#define PPC_MSR_2               0x00001000
229#define PPC_MSR_3               0x00000000
230
231#elif defined(mpc821)
232/*
233 *  Added by Andrew Bray <andy@chaos.org.uk> 6/April/1999
234 */
235#define CPU_MODEL_NAME  "PowerPC MPC821"
236
237#define PPC_ALIGNMENT           4
238#define PPC_I_CACHE             4096
239#define PPC_D_CACHE             4096
240#define PPC_CACHE_ALIGNMENT     16
241#define PPC_INTERRUPT_MAX       71
242
243#define PPC_MSR_0               0x00009000
244#define PPC_MSR_1               0x00001000
245#define PPC_MSR_2               0x00001000
246#define PPC_MSR_3               0x00000000
247
248#elif defined(mpc750)
249
250#define CPU_MODEL_NAME  "PowerPC 750"
251
252#define PPC_ALIGNMENT           8
253#define PPC_I_CACHE             16384
254#define PPC_D_CACHE             16384
255
256#elif defined(mpc7400)
257
258#define CPU_MODEL_NAME  "PowerPC 7400"
259
260#define PPC_ALIGNMENT           8
261#define PPC_I_CACHE             32768
262#define PPC_D_CACHE             32768
263
264#elif defined(mpc7455)
265/*
266 *  Added by S.K. Feng <feng1@bnl.gov> 10/03
267 */
268
269#define CPU_MODEL_NAME  "PowerPC 7455"
270
271#define PPC_ALIGNMENT           8
272#define PPC_CACHE_ALIGNMENT     32
273#define PPC_I_CACHE             32768
274#define PPC_D_CACHE             32768
275
276#elif defined(mpc8260)
277/*
278 *  Added by Andy Dachs <a.dachs@sstl.co.uk> 23/11/2000
279 */
280#define CPU_MODEL_NAME  "PowerPC MPC8260"
281
282#define PPC_ALIGNMENT           4
283#define PPC_I_CACHE             16384
284#define PPC_D_CACHE             16384
285#define PPC_CACHE_ALIGNMENT     32
286#define PPC_INTERRUPT_MAX       125
287#define PPC_USE_MULTIPLE        1
288#else
289 
290#error "Unsupported CPU Model"
291 
292#endif
293
294/*
295 *  Application binary interfaces.
296 *
297 *  PPC_ABI MUST be defined as one of these.
298 *  Only PPC_ABI_POWEROPEN is currently fully supported.
299 *  Only EABI will be supported in the end when
300 *  the tools are there.
301 *  Only big endian is currently supported.
302 */
303/*
304 *  PowerOpen ABI.  This is Andy's hack of the
305 *  PowerOpen ABI to ELF.  ELF rather than a
306 *  XCOFF assembler is used.
307 */
308#define PPC_ABI_POWEROPEN       0
309/*
310 *  SVR4 ABI
311 */
312#define PPC_ABI_SVR4            2
313/*
314 *  Embedded ABI
315 */
316#define PPC_ABI_EABI            3
317
318/*
319 *  Default to the EABI used by current GNU tools
320 */
321
322#ifndef PPC_ABI
323#define PPC_ABI PPC_ABI_EABI
324#endif
325
326#if (PPC_ABI == PPC_ABI_POWEROPEN)
327#define PPC_STACK_ALIGNMENT     8
328#elif (PPC_ABI == PPC_ABI_SVR4)
329#define PPC_STACK_ALIGNMENT     16
330#elif (PPC_ABI == PPC_ABI_EABI)
331#define PPC_STACK_ALIGNMENT     8
332#else
333#error  "PPC_ABI is not properly defined"
334#endif
335#ifndef PPC_ABI
336#error  "PPC_ABI is not properly defined"
337#endif
338
339/*
340 *  Assemblers.
341 *  PPC_ASM MUST be defined as one of these.
342 *
343 *  PPC_ASM_ELF:   ELF assembler. Currently used for all ABIs.
344 *
345 *  NOTE: Only PPC_ABI_ELF is currently fully supported.
346 */
347
348#define PPC_ASM_ELF   0
349
350/*
351 *  Default to the assembler format used by the current GNU tools.
352 */
353
354#ifndef PPC_ASM
355#define PPC_ASM PPC_ASM_ELF
356#endif
357
358/*
359 *  If the maximum number of exception sources has not been defined,
360 *  then default it to 16.
361 */
362
363#ifndef PPC_INTERRUPT_MAX
364#define PPC_INTERRUPT_MAX       16
365#endif
366
367/*
368 *  Unless specified otherwise, the cache line size is defaulted to 32.
369 *
370 *  The derive the power of 2 the cache line is.
371 */
372
373#ifndef PPC_CACHE_ALIGNMENT
374#define PPC_CACHE_ALIGNMENT 32
375#endif
376
377#if (PPC_CACHE_ALIGNMENT == 16)
378#define PPC_CACHE_ALIGN_POWER 4
379#elif (PPC_CACHE_ALIGNMENT == 32)
380#define PPC_CACHE_ALIGN_POWER 5
381#else
382#error "Undefined power of 2 for PPC_CACHE_ALIGNMENT"
383#endif
384
385/*
386 *  Unless otherwise specified, assume the model has an IP/EP bit to
387 *  set the exception address prefix.
388 */
389
390#ifndef PPC_HAS_EXCEPTION_PREFIX
391#define PPC_HAS_EXCEPTION_PREFIX 1
392#endif
393
394/*
395 *  Unless otherwise specified, assume the model does NOT have
396 *  403 style EVPR register to set the exception address prefix.
397 */
398
399#ifndef PPC_HAS_EVPR
400#define PPC_HAS_EVPR 0
401#endif
402
403/*
404 *  If no low power mode model was specified, then assume there is none.
405 */
406
407#ifndef PPC_LOW_POWER_MODE
408#define PPC_LOW_POWER_MODE PPC_LOW_POWER_MODE_NONE
409#endif
410
411/*
412 *  Unless specified above, assume PPC_HAS_FPU to be a synonym for _SOFT_FLOAT.
413 *  FIXME: Should we tie PPC_HAS_FPU to _SOFT_FLOAT, directly
414 *     and disallow explicitly setting PPC_HAS_FPU?
415 */
416
417#ifndef PPC_HAS_FPU
418#ifdef _SOFT_FLOAT
419#define PPC_HAS_FPU 0
420#else
421#define PPC_HAS_FPU 1
422#endif
423#endif
424
425/*
426 *  Unless specified above, If the model has FP support, it is assumed to
427 *  support doubles (8-byte floating point numbers).
428 *
429 *  If the model does NOT have FP support, then the model does
430 *  NOT have double length FP registers.
431 */
432
433#ifndef PPC_HAS_DOUBLE
434#if (PPC_HAS_FPU)
435#define PPC_HAS_DOUBLE 1
436#else
437#define PPC_HAS_DOUBLE 0
438#endif
439#endif
440
441/*
442 *  Unless specified above, then assume the model does NOT have critical
443 *  interrupt support.
444 */
445
446#ifndef PPC_HAS_RFCI
447#define PPC_HAS_RFCI 0
448#endif
449
450/*
451 *  Unless specified above, do not use the load/store multiple instructions
452 *  in a context switch.
453 */
454
455#ifndef PPC_USE_MULTIPLE
456#define PPC_USE_MULTIPLE 0
457#endif
458
459/*
460 *  The following exceptions are not maskable, and are not
461 *  necessarily predictable, so cannot be offered to RTEMS:
462 *    Alignment exception - handled by the CPU module
463 *    Data exceptions.
464 *    Instruction exceptions.
465 */
466
467/*
468 *  Base Interrupt vectors supported on all models.
469 */
470#define PPC_IRQ_SYSTEM_RESET     0 /* 0x00100 - System reset.              */
471#define PPC_IRQ_MCHECK           1 /* 0x00200 - Machine check              */
472#define PPC_IRQ_PROTECT          2 /* 0x00300 - Protection violation       */
473#define PPC_IRQ_ISI              3 /* 0x00400 - Instruction Fetch error    */
474#define PPC_IRQ_EXTERNAL         4 /* 0x00500 - External interrupt         */
475#define PPC_IRQ_ALIGNMENT        5 /* 0X00600 - Alignment exception        */
476#define PPC_IRQ_PROGRAM          6 /* 0x00700 - Program exception          */
477#define PPC_IRQ_NOFP             7 /* 0x00800 - Floating point unavailable */
478#define PPC_IRQ_DECREMENTER      8 /* 0x00900 - Decrementer interrupt      */
479#define PPC_IRQ_RESERVED_A       9 /* 0x00a00 - Implementation Reserved    */
480#define PPC_IRQ_RESERVED_B      10 /* 0x00b00 - Implementation Reserved    */
481#define PPC_IRQ_SCALL           11 /* 0x00c00 - System call                */
482#define PPC_IRQ_TRACE           12 /* 0x00d00 - Trace Exception            */
483#define PPC_IRQ_FP_ASST         13 /* ox00e00 - Floating point assist      */
484#define PPC_STD_IRQ_LAST        PPC_IRQ_FP_ASST
485
486#define PPC_IRQ_FIRST           PPC_IRQ_SYSTEM_RESET
487
488#if defined(ppc403) || defined(ppc405)
489                                 
490#define PPC_IRQ_CRIT     PPC_IRQ_SYSTEM_RESET /*0x00100- Critical int. pin */
491#define PPC_IRQ_PIT      (PPC_STD_IRQ_LAST+1) /*0x01000- Pgm interval timer*/
492#define PPC_IRQ_FIT      (PPC_STD_IRQ_LAST+2) /*0x01010- Fixed int. timer  */
493#define PPC_IRQ_WATCHDOG (PPC_STD_IRQ_LAST+3) /*0x01020- Watchdog timer    */
494#define PPC_IRQ_DEBUG    (PPC_STD_IRQ_LAST+4) /*0x02000- Debug exceptions  */
495#define PPC_IRQ_LAST     PPC_IRQ_DEBUG
496
497#elif defined(mpc505) || defined(mpc509)
498#define PPC_IRQ_SOFTEMU   (PPC_STD_IRQ_LAST+1)    /* Software emulation. */
499#define PPC_IRQ_DATA_BP   (PPC_STD_IRQ_LAST+ 2)
500#define PPC_IRQ_INST_BP   (PPC_STD_IRQ_LAST+ 3)
501#define PPC_IRQ_MEXT_BP   (PPC_STD_IRQ_LAST+ 4)
502#define PPC_IRQ_NMEXT_BP  (PPC_STD_IRQ_LAST+ 5)
503
504#elif defined(mpc555)
505#define PPC_IRQ_SOFTEMU   (PPC_STD_IRQ_LAST+1)  /* Software emulation. */
506#define PPC_IRQ_INST_PE   (PPC_STD_IRQ_LAST+2)  /* Insn protection error */
507#define PPC_IRQ_DATA_PE   (PPC_STD_IRQ_LAST+3)  /* Data protection error */
508#define PPC_IRQ_DATA_BP   (PPC_STD_IRQ_LAST+4)  /* Data breakpoint */
509#define PPC_IRQ_INST_BP   (PPC_STD_IRQ_LAST+5)  /* Insn breakpoint */
510#define PPC_IRQ_MEXT_BP   (PPC_STD_IRQ_LAST+6)  /* Maskable ext bkpt */
511#define PPC_IRQ_NMEXT_BP  (PPC_STD_IRQ_LAST+7)  /* Non-maskable ext bkpt */
512#define PPC_IRQ_LAST      PPC_IRQ_NMEXT_BP
513
514#elif defined(ppc601)
515#define PPC_IRQ_TRACE    (PPC_STD_IRQ_LAST+1) /*0x02000-Run/Trace Exception*/
516#define PPC_IRQ_LAST     PPC_IRQ_TRACE       
517
518#elif defined(ppc602)
519#define PPC_IRQ_LAST     (PPC_STD_IRQ_LAST)
520
521#elif defined(ppc603)
522#define PPC_IRQ_TRANS_MISS (PPC_STD_IRQ_LAST+1) /*0x1000-Ins Translation Miss*/
523#define PPC_IRQ_DATA_LOAD  (PPC_STD_IRQ_LAST+2) /*0x1100-Data Load Trans Miss*/
524#define PPC_IRQ_DATA_STORE (PPC_STD_IRQ_LAST+3) /*0x1200-Data Store Miss     */
525#define PPC_IRQ_ADDR_BRK   (PPC_STD_IRQ_LAST+4) /*0x1300-Instruction Bkpoint */
526#define PPC_IRQ_SYS_MGT    (PPC_STD_IRQ_LAST+5) /*0x1400-System Management   */
527#define PPC_IRQ_LAST       PPC_IRQ_SYS_MGT   
528
529#elif defined(ppc603e)
530#define PPC_TLB_INST_MISS  (PPC_STD_IRQ_LAST+1) /*0x1000-Instruction TLB Miss*/
531#define PPC_TLB_LOAD_MISS  (PPC_STD_IRQ_LAST+2) /*0x1100-TLB miss on load  */
532#define PPC_TLB_STORE_MISS (PPC_STD_IRQ_LAST+3) /*0x1200-TLB Miss on store */
533#define PPC_IRQ_ADDRBRK    (PPC_STD_IRQ_LAST+4) /*0x1300-Instruct addr break */
534#define PPC_IRQ_SYS_MGT    (PPC_STD_IRQ_LAST+5) /*0x1400-System Management   */
535#define PPC_IRQ_LAST       PPC_IRQ_SYS_MGT   
536
537
538#elif defined(mpc604)
539#define PPC_IRQ_ADDR_BRK (PPC_STD_IRQ_LAST+1) /*0x1300- Inst. addr break  */
540#define PPC_IRQ_SYS_MGT  (PPC_STD_IRQ_LAST+2) /*0x1400- System Management */
541#define PPC_IRQ_LAST     PPC_IRQ_SYS_MGT 
542
543#elif defined(mpc860) || defined(mpc821)
544#define PPC_IRQ_EMULATE         (PPC_STD_IRQ_LAST+1) /*0x1000-Software emulation  */
545#define PPC_IRQ_INST_MISS       (PPC_STD_IRQ_LAST+2) /*0x1100-Instruction TLB miss*/
546#define PPC_IRQ_DATA_MISS       (PPC_STD_IRQ_LAST+3) /*0x1200-Data TLB miss */
547#define PPC_IRQ_INST_ERR        (PPC_STD_IRQ_LAST+4) /*0x1300-Instruction TLB err */
548#define PPC_IRQ_DATA_ERR        (PPC_STD_IRQ_LAST+5) /*0x1400-Data TLB error */
549#define PPC_IRQ_DATA_BPNT       (PPC_STD_IRQ_LAST+6) /*0x1C00-Data breakpoint */
550#define PPC_IRQ_INST_BPNT       (PPC_STD_IRQ_LAST+7) /*0x1D00-Inst breakpoint */
551#define PPC_IRQ_IO_BPNT         (PPC_STD_IRQ_LAST+8) /*0x1E00-Peripheral breakpnt */
552#define PPC_IRQ_DEV_PORT        (PPC_STD_IRQ_LAST+9) /*0x1F00-Development port */
553#define PPC_IRQ_IRQ0            (PPC_STD_IRQ_LAST + 10)
554#define PPC_IRQ_LVL0            (PPC_STD_IRQ_LAST + 11)
555#define PPC_IRQ_IRQ1            (PPC_STD_IRQ_LAST + 12)
556#define PPC_IRQ_LVL1            (PPC_STD_IRQ_LAST + 13)
557#define PPC_IRQ_IRQ2            (PPC_STD_IRQ_LAST + 14)
558#define PPC_IRQ_LVL2            (PPC_STD_IRQ_LAST + 15)
559#define PPC_IRQ_IRQ3            (PPC_STD_IRQ_LAST + 16)
560#define PPC_IRQ_LVL3            (PPC_STD_IRQ_LAST + 17)
561#define PPC_IRQ_IRQ4            (PPC_STD_IRQ_LAST + 18)
562#define PPC_IRQ_LVL4            (PPC_STD_IRQ_LAST + 19)
563#define PPC_IRQ_IRQ5            (PPC_STD_IRQ_LAST + 20)
564#define PPC_IRQ_LVL5            (PPC_STD_IRQ_LAST + 21)
565#define PPC_IRQ_IRQ6            (PPC_STD_IRQ_LAST + 22)
566#define PPC_IRQ_LVL6            (PPC_STD_IRQ_LAST + 23)
567#define PPC_IRQ_IRQ7            (PPC_STD_IRQ_LAST + 24)
568#define PPC_IRQ_LVL7            (PPC_STD_IRQ_LAST + 25)
569#define PPC_IRQ_CPM_ERROR       (PPC_STD_IRQ_LAST + 26)
570#define PPC_IRQ_CPM_PC4         (PPC_STD_IRQ_LAST + 27)
571#define PPC_IRQ_CPM_PC5         (PPC_STD_IRQ_LAST + 28)
572#define PPC_IRQ_CPM_SMC2        (PPC_STD_IRQ_LAST + 29)
573#define PPC_IRQ_CPM_SMC1        (PPC_STD_IRQ_LAST + 30)
574#define PPC_IRQ_CPM_SPI         (PPC_STD_IRQ_LAST + 31)
575#define PPC_IRQ_CPM_PC6         (PPC_STD_IRQ_LAST + 32)
576#define PPC_IRQ_CPM_TIMER4      (PPC_STD_IRQ_LAST + 33)
577#define PPC_IRQ_CPM_RESERVED_8  (PPC_STD_IRQ_LAST + 34)
578#define PPC_IRQ_CPM_PC7         (PPC_STD_IRQ_LAST + 35)
579#define PPC_IRQ_CPM_PC8         (PPC_STD_IRQ_LAST + 36)
580#define PPC_IRQ_CPM_PC9         (PPC_STD_IRQ_LAST + 37)
581#define PPC_IRQ_CPM_TIMER3      (PPC_STD_IRQ_LAST + 38)
582#define PPC_IRQ_CPM_RESERVED_D  (PPC_STD_IRQ_LAST + 39)
583#define PPC_IRQ_CPM_PC10        (PPC_STD_IRQ_LAST + 40)
584#define PPC_IRQ_CPM_PC11        (PPC_STD_IRQ_LAST + 41)
585#define PPC_IRQ_CPM_I2C         (PPC_STD_IRQ_LAST + 42)
586#define PPC_IRQ_CPM_RISC_TIMER  (PPC_STD_IRQ_LAST + 43)
587#define PPC_IRQ_CPM_TIMER2      (PPC_STD_IRQ_LAST + 44)
588#define PPC_IRQ_CPM_RESERVED_13 (PPC_STD_IRQ_LAST + 45)
589#define PPC_IRQ_CPM_IDMA2       (PPC_STD_IRQ_LAST + 46)
590#define PPC_IRQ_CPM_IDMA1       (PPC_STD_IRQ_LAST + 47)
591#define PPC_IRQ_CPM_SDMA_ERROR  (PPC_STD_IRQ_LAST + 48)
592#define PPC_IRQ_CPM_PC12        (PPC_STD_IRQ_LAST + 49)
593#define PPC_IRQ_CPM_PC13        (PPC_STD_IRQ_LAST + 50)
594#define PPC_IRQ_CPM_TIMER1      (PPC_STD_IRQ_LAST + 51)
595#define PPC_IRQ_CPM_PC14        (PPC_STD_IRQ_LAST + 52)
596#define PPC_IRQ_CPM_SCC4        (PPC_STD_IRQ_LAST + 53)
597#define PPC_IRQ_CPM_SCC3        (PPC_STD_IRQ_LAST + 54)
598#define PPC_IRQ_CPM_SCC2        (PPC_STD_IRQ_LAST + 55)
599#define PPC_IRQ_CPM_SCC1        (PPC_STD_IRQ_LAST + 56)
600#define PPC_IRQ_CPM_PC15        (PPC_STD_IRQ_LAST + 57)
601
602#define PPC_IRQ_LAST             PPC_IRQ_CPM_PC15
603
604#elif defined(mpc8260)
605
606#define PPC_IRQ_INST_MISS       (PPC_STD_IRQ_LAST+1) /*0x1000-Instruction TLB miss*/
607#define PPC_IRQ_DATA_MISS       (PPC_STD_IRQ_LAST+2) /*0x1100-Data TLB miss */
608#define PPC_IRQ_DATA_L_MISS     (PPC_STD_IRQ_LAST+3) /*0x1200-Data TLB load miss */
609#define PPC_IRQ_DATA_S_MISS     (PPC_STD_IRQ_LAST+4) /*0x1300-Data TLB store miss */
610#define PPC_IRQ_INST_BPNT       (PPC_STD_IRQ_LAST+5) /*0x1400-Inst address breakpoint */
611#define PPC_IRQ_SYS_MGT         (PPC_STD_IRQ_LAST+6) /*0x1500-System Management */
612/* 0x1600 - 0x2F00 reserved */
613#define PPC_IRQ_CPM_NONE        (PPC_STD_IRQ_LAST + 50)
614#define PPC_IRQ_CPM_I2C         (PPC_STD_IRQ_LAST + 51)
615#define PPC_IRQ_CPM_SPI         (PPC_STD_IRQ_LAST + 52)
616#define PPC_IRQ_CPM_RISC_TIMER  (PPC_STD_IRQ_LAST + 53)
617#define PPC_IRQ_CPM_SMC1        (PPC_STD_IRQ_LAST + 54)
618#define PPC_IRQ_CPM_SMC2        (PPC_STD_IRQ_LAST + 55)
619#define PPC_IRQ_CPM_IDMA1       (PPC_STD_IRQ_LAST + 56)
620#define PPC_IRQ_CPM_IDMA2       (PPC_STD_IRQ_LAST + 57)
621#define PPC_IRQ_CPM_IDMA3       (PPC_STD_IRQ_LAST + 58)
622#define PPC_IRQ_CPM_IDMA4       (PPC_STD_IRQ_LAST + 59)
623#define PPC_IRQ_CPM_SDMA        (PPC_STD_IRQ_LAST + 60)
624#define PPC_IRQ_CPM_RES_A       (PPC_STD_IRQ_LAST + 61)
625#define PPC_IRQ_CPM_TIMER1      (PPC_STD_IRQ_LAST + 62)
626#define PPC_IRQ_CPM_TIMER2      (PPC_STD_IRQ_LAST + 63)
627#define PPC_IRQ_CPM_TIMER3      (PPC_STD_IRQ_LAST + 64)
628#define PPC_IRQ_CPM_TIMER4      (PPC_STD_IRQ_LAST + 65)
629#define PPC_IRQ_CPM_TMCNT       (PPC_STD_IRQ_LAST + 66)
630#define PPC_IRQ_CPM_PIT         (PPC_STD_IRQ_LAST + 67)
631#define PPC_IRQ_CPM_RES_B       (PPC_STD_IRQ_LAST + 68)
632#define PPC_IRQ_CPM_IRQ1        (PPC_STD_IRQ_LAST + 69)
633#define PPC_IRQ_CPM_IRQ2        (PPC_STD_IRQ_LAST + 70)
634#define PPC_IRQ_CPM_IRQ3        (PPC_STD_IRQ_LAST + 71)
635#define PPC_IRQ_CPM_IRQ4        (PPC_STD_IRQ_LAST + 72)
636#define PPC_IRQ_CPM_IRQ5        (PPC_STD_IRQ_LAST + 73)
637#define PPC_IRQ_CPM_IRQ6        (PPC_STD_IRQ_LAST + 74)
638#define PPC_IRQ_CPM_IRQ7        (PPC_STD_IRQ_LAST + 75)
639#define PPC_IRQ_CPM_RES_C       (PPC_STD_IRQ_LAST + 76)
640#define PPC_IRQ_CPM_RES_D       (PPC_STD_IRQ_LAST + 77)
641#define PPC_IRQ_CPM_RES_E       (PPC_STD_IRQ_LAST + 78)
642#define PPC_IRQ_CPM_RES_F       (PPC_STD_IRQ_LAST + 79)
643#define PPC_IRQ_CPM_RES_G       (PPC_STD_IRQ_LAST + 80)
644#define PPC_IRQ_CPM_RES_H       (PPC_STD_IRQ_LAST + 81)
645#define PPC_IRQ_CPM_FCC1        (PPC_STD_IRQ_LAST + 82)
646#define PPC_IRQ_CPM_FCC2        (PPC_STD_IRQ_LAST + 83)
647#define PPC_IRQ_CPM_FCC3        (PPC_STD_IRQ_LAST + 84)
648#define PPC_IRQ_CPM_RES_I       (PPC_STD_IRQ_LAST + 85)
649#define PPC_IRQ_CPM_MCC1        (PPC_STD_IRQ_LAST + 86)
650#define PPC_IRQ_CPM_MCC2        (PPC_STD_IRQ_LAST + 87)
651#define PPC_IRQ_CPM_RES_J       (PPC_STD_IRQ_LAST + 88)
652#define PPC_IRQ_CPM_RES_K       (PPC_STD_IRQ_LAST + 89)
653#define PPC_IRQ_CPM_SCC1        (PPC_STD_IRQ_LAST + 90)
654#define PPC_IRQ_CPM_SCC2        (PPC_STD_IRQ_LAST + 91)
655#define PPC_IRQ_CPM_SCC3        (PPC_STD_IRQ_LAST + 92)
656#define PPC_IRQ_CPM_SCC4        (PPC_STD_IRQ_LAST + 93)
657#define PPC_IRQ_CPM_RES_L       (PPC_STD_IRQ_LAST + 94)
658#define PPC_IRQ_CPM_RES_M       (PPC_STD_IRQ_LAST + 95)
659#define PPC_IRQ_CPM_RES_N       (PPC_STD_IRQ_LAST + 96)
660#define PPC_IRQ_CPM_RES_O       (PPC_STD_IRQ_LAST + 97)
661#define PPC_IRQ_CPM_PC15        (PPC_STD_IRQ_LAST + 98)
662#define PPC_IRQ_CPM_PC14        (PPC_STD_IRQ_LAST + 99)
663#define PPC_IRQ_CPM_PC13        (PPC_STD_IRQ_LAST + 100)
664#define PPC_IRQ_CPM_PC12        (PPC_STD_IRQ_LAST + 101)
665#define PPC_IRQ_CPM_PC11        (PPC_STD_IRQ_LAST + 102)
666#define PPC_IRQ_CPM_PC10        (PPC_STD_IRQ_LAST + 103)
667#define PPC_IRQ_CPM_PC9         (PPC_STD_IRQ_LAST + 104)
668#define PPC_IRQ_CPM_PC8         (PPC_STD_IRQ_LAST + 105)
669#define PPC_IRQ_CPM_PC7         (PPC_STD_IRQ_LAST + 106)
670#define PPC_IRQ_CPM_PC6         (PPC_STD_IRQ_LAST + 107)
671#define PPC_IRQ_CPM_PC5         (PPC_STD_IRQ_LAST + 108)
672#define PPC_IRQ_CPM_PC4         (PPC_STD_IRQ_LAST + 109)
673#define PPC_IRQ_CPM_PC3         (PPC_STD_IRQ_LAST + 110)
674#define PPC_IRQ_CPM_PC2         (PPC_STD_IRQ_LAST + 111)
675#define PPC_IRQ_CPM_PC1         (PPC_STD_IRQ_LAST + 112)
676#define PPC_IRQ_CPM_PC0         (PPC_STD_IRQ_LAST + 113)
677
678#define PPC_IRQ_LAST             PPC_IRQ_CPM_PC0
679
680#endif
681
682
683/*
684 *  If the maximum number of exception sources is too low,
685 *  then fix it
686 */
687
688#if PPC_INTERRUPT_MAX <= PPC_IRQ_LAST
689#undef PPC_INTERRUPT_MAX
690#define PPC_INTERRUPT_MAX ((PPC_IRQ_LAST) + 1)
691#endif
692
693/*
694 *  Machine Status Register (MSR) Constants Used by RTEMS
695 */
696
697/*
698 *  Some PPC model manuals refer to the Exception Prefix (EP) bit as
699 *  IP for no apparent reason.
700 */
701
702#define PPC_MSR_RI       0x000000002 /* bit 30 - recoverable exception */
703#define PPC_MSR_DR       0x000000010 /* bit 27 - data address translation */
704#define PPC_MSR_IR       0x000000020 /* bit 26 - instruction addr translation*/
705
706#if (PPC_HAS_EXCEPTION_PREFIX)
707#define PPC_MSR_EP       0x000000040 /* bit 25 - exception prefix */
708#else
709#define PPC_MSR_EP       0x000000000 /* bit 25 - exception prefix */
710#endif
711
712#if (PPC_HAS_FPU)
713#define PPC_MSR_FP       0x000002000 /* bit 18 - floating point enable */
714#else
715#define PPC_MSR_FP       0x000000000 /* bit 18 - floating point enable */
716#endif
717
718#if (PPC_LOW_POWER_MODE == PPC_LOW_POWER_MODE_NONE)
719#define PPC_MSR_POW      0x000000000 /* bit 13 - power management enable */
720#else
721#define PPC_MSR_POW      0x000040000 /* bit 13 - power management enable */
722#endif
723
724#define PPC_MSR_ME       0x000001000 /* bit 19 - machine check enable */
725#define PPC_MSR_EE       0x000008000 /* bit 16 - external interrupt enable */
726
727#if (PPC_HAS_RFCI)
728#define PPC_MSR_CE       0x000020000 /* bit 14 - critical interrupt enable */
729#else
730#define PPC_MSR_CE       0x000000000 /* bit 14 - critical interrupt enable */
731#endif
732
733#define PPC_MSR_DISABLE_MASK (PPC_MSR_ME|PPC_MSR_EE|PPC_MSR_CE)
734
735/*
736 *  Initial value for the FPSCR register
737 */
738
739#define PPC_INIT_FPSCR          0x000000f8
740
741#ifdef __cplusplus
742}
743#endif
744
745#endif /* _RTEMS_SCORE_POWERPC_H */
Note: See TracBrowser for help on using the repository browser.