source: rtems/cpukit/score/cpu/powerpc/rtems/score/ppc.h @ 3ddf3b5

4.104.114.84.95
Last change on this file since 3ddf3b5 was 95e0ca93, checked in by Joel Sherrill <joel.sherrill@…>, on 11/08/01 at 23:32:59

2001-11-08 Dennis Ehlin (ECS) <Dennis.Ehlin@…>

This modification is part of the submitted modifications necessary to
support the IBM PPC405 family. This submission was reviewed by
Thomas Doerfler <Thomas.Doerfler@…> who ensured it did
not negatively impact the ppc403 BSPs. The submission and tracking
process was captured as PR50.

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