source: rtems/c/src/lib/libcpu/powerpc/rtems/powerpc/powerpc.h @ 10b0c3f

4.115
Last change on this file since 10b0c3f was 10b0c3f, checked in by Sebastian Huber <sebastian.huber@…>, on 03/31/14 at 14:11:30

bsps/powerpc: PR757: Fix PPC_IRQ_TRACE for ppc601

We could probably also remove the ppc601 support entirely.

  • Property mode set to 100644
File size: 20.6 KB
Line 
1/**
2 * @file rtems/powerpc/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.org/license/LICENSE.
36 *
37 *
38 * Note:
39 *      This file is included by both C and assembler code ( -DASM )
40 */
41
42
43#ifndef _RTEMS_POWERPC_POWERPC_H
44#define _RTEMS_POWERPC_POWERPC_H
45
46#ifdef __cplusplus
47extern "C" {
48#endif
49
50
51/* Till S. 2008/07/10:
52 *
53 * Using the macros/definitions which depend on a preprocessor
54 * symbol defining the CPU flavor is discouraged.
55 * I recommend to not use definitions from this file and
56 * in particular - not to add more bits and pieces.
57 *
58 * Instead, try to use run-time detection (see e.g. cpuIdent.c/cpuIdent.h)
59 * of features etc.
60 */
61
62#include <rtems/score/powerpc.h>
63
64/*
65 *  This file contains the information required to build
66 *  RTEMS for a particular member of the PowerPC family.  It does
67 *  this by setting variables to indicate which implementation
68 *  dependent features are present in a particular member
69 *  of the family.
70 *
71 *  The following architectural feature definitions are defaulted
72 *  unless specifically set by the model definition:
73 *
74 *    + PPC_INTERRUPT_MAX        - 16
75 *    + PPC_CACHE_ALIGNMENT      - 32
76 *    + PPC_LOW_POWER_MODE       - PPC_LOW_POWER_MODE_NONE
77 *    + PPC_HAS_EXCEPTION_PREFIX - 1
78 *    + PPC_USE_MULTIPLE         - 0
79 */
80
81/*
82 *  Define the low power mode models
83 *
84 *  Standard:   as defined for 603e
85 *  Nap Mode:   nap mode only (604)
86 *  XXX 403GB, 603, 603e, 604, 821
87 */
88
89#define PPC_LOW_POWER_MODE_NONE      0
90#define PPC_LOW_POWER_MODE_STANDARD  1
91
92/**
93 * @brief For boards with no cache set PPC_CACHE_ALIGNMENT to this value.
94 */
95#define PPC_NO_CACHE_ALIGNMENT 4
96
97/**
98 * @brief Used to define PPC_CACHE_ALIGN_POWER for boards with no cache (and
99 * PPC_NO_CACHE_ALIGNMENT defined).
100 */
101#define PPC_NO_CACHE_ALIGNMENT_POWER 2
102
103/*
104 *  Figure out all CPU Model Feature Flags based upon compiler
105 *  predefines.
106 */
107
108#if defined(ppc403)
109/*
110 *  IBM 403
111 *
112 *  Developed for 403GA.  Book checked for 403GB.
113 *
114 *  Does not have user mode.
115 */
116
117#define PPC_CACHE_ALIGNMENT     16
118#define PPC_HAS_RI              0
119#define PPC_HAS_RFCI            1
120#define PPC_USE_MULTIPLE        1
121#define PPC_I_CACHE             2048
122#define PPC_D_CACHE             1024
123
124#define PPC_HAS_EXCEPTION_PREFIX 0
125#define PPC_HAS_EVPR             1
126
127#elif defined (ppc405)
128
129#define PPC_CACHE_ALIGNMENT     32
130#define PPC_HAS_RI           0
131#define PPC_HAS_RFCI            1
132#define PPC_USE_MULTIPLE        1
133#define PPC_I_CACHE             16384
134#define PPC_D_CACHE             16384           /* except GP/CR */
135#define PPC_HAS_EXCEPTION_PREFIX 0
136#define PPC_HAS_EVPR             1
137
138#elif defined (ppc440)
139
140#define PPC_CACHE_ALIGNMENT         32
141#define PPC_HAS_RI                   0
142#define PPC_HAS_RFCI                 1
143#define PPC_USE_MULTIPLE             1
144#define PPC_I_CACHE              32768
145#define PPC_D_CACHE              32768
146#define PPC_HAS_EXCEPTION_PREFIX     0
147#define PPC_HAS_EVPR                 1
148
149#elif defined(mpc555)
150
151/* Copied from mpc505 */
152#define PPC_CACHE_ALIGNMENT     PPC_NO_CACHE_ALIGNMENT
153
154/* Added by querbach@realtime.bc.ca */
155#define PPC_LOW_POWER_MODE      PPC_LOW_POWER_MODE_STANDARD
156
157/* Based on comments by Sergei Organov <osv@Javad.RU> */
158#define PPC_I_CACHE             0
159#define PPC_D_CACHE             0
160
161#elif defined(mpc505) || defined(mpc509)
162/*
163 *  Submitted by Sergei Organov <osv@Javad.RU> as a patch against
164 *  3.6.0 long after 4.0 was released.   This is just an attempt
165 *  to get the setting correct.
166 */
167
168#define CPU_MODEL_NAME  "PowerPC 505/509"
169
170#define PPC_CACHE_ALIGNMENT     PPC_NO_CACHE_ALIGNMENT
171#define PPC_I_CACHE             4096
172#define PPC_D_CACHE             0
173
174
175#elif defined(ppc601)
176
177/*
178 *  Submitted with original port -- book checked only.
179 */
180
181#define PPC_USE_MULTIPLE        1
182#define PPC_I_CACHE             0
183#define PPC_D_CACHE             32768
184
185#elif defined(ppc603)
186/*
187 *  Submitted with original port -- book checked only.
188 */
189
190#define PPC_I_CACHE             8192
191#define PPC_D_CACHE             8192
192
193#elif defined(ppc603e)
194
195/*
196 *  Submitted with original port.
197 *
198 *  Known to work on real hardware.
199 */
200
201#define PPC_I_CACHE             16384
202#define PPC_D_CACHE             16384
203
204#define PPC_LOW_POWER_MODE PPC_LOW_POWER_MODE_STANDARD
205
206#elif defined(mpc604)
207/*
208 *  Submitted with original port -- book checked only.
209 */
210
211#define PPC_I_CACHE             16384
212#define PPC_D_CACHE             16384
213
214#elif defined(mpc860)
215/*
216 *  Added by Jay Monkman (jmonkman@frasca.com) 6/28/98
217 *  with some changes by Darlene Stewart (Darlene.Stewart@iit.nrc.ca)
218 */
219#define PPC_I_CACHE             4096
220#define PPC_D_CACHE             4096
221#define PPC_CACHE_ALIGNMENT     16
222#define PPC_INTERRUPT_MAX       71
223#define PPC_USE_MULTIPLE        1
224
225#define PPC_MSR_0               0x00009000
226#define PPC_MSR_1               0x00001000
227#define PPC_MSR_2               0x00001000
228#define PPC_MSR_3               0x00000000
229
230#elif defined(mpc821)
231/*
232 *  Added by Andrew Bray <andy@chaos.org.uk> 6/April/1999
233 */
234#define PPC_I_CACHE             4096
235#define PPC_D_CACHE             4096
236#define PPC_CACHE_ALIGNMENT     16
237#define PPC_INTERRUPT_MAX       71
238
239#define PPC_MSR_0               0x00009000
240#define PPC_MSR_1               0x00001000
241#define PPC_MSR_2               0x00001000
242#define PPC_MSR_3               0x00000000
243
244#elif defined(mpc750)
245
246#define PPC_I_CACHE             16384
247#define PPC_D_CACHE             16384
248
249#elif defined(mpc7400)
250
251#define PPC_I_CACHE             32768
252#define PPC_D_CACHE             32768
253
254#elif defined(mpc7455)
255/*
256 *  Added by S.K. Feng <feng1@bnl.gov> 10/03
257 */
258
259#define PPC_CACHE_ALIGNMENT     32
260#define PPC_I_CACHE             32768
261#define PPC_D_CACHE             32768
262
263#elif defined(mpc8260)
264/*
265 *  Added by Andy Dachs <a.dachs@sstl.co.uk> 23/11/2000
266 */
267#define PPC_I_CACHE             16384
268#define PPC_D_CACHE             16384
269#define PPC_CACHE_ALIGNMENT     32
270#define PPC_INTERRUPT_MAX       125
271#define PPC_USE_MULTIPLE        1
272
273#elif defined(__ppc_generic)
274#define PPC_CACHE_ALIGNMENT 32
275
276#else
277
278#error "Unsupported CPU Model"
279
280#endif
281
282/*
283 *  If the maximum number of exception sources has not been defined,
284 *  then default it to 16.
285 */
286
287#ifndef PPC_INTERRUPT_MAX
288#define PPC_INTERRUPT_MAX       16
289#endif
290
291/*
292 *  Unless specified otherwise, the cache line size is defaulted to 32.
293 *
294 *  The derive the power of 2 the cache line is.
295 */
296
297#ifndef PPC_CACHE_ALIGNMENT
298#define PPC_CACHE_ALIGNMENT 32
299#endif
300
301#if (PPC_CACHE_ALIGNMENT == 16)
302#define PPC_CACHE_ALIGN_POWER 4
303#elif (PPC_CACHE_ALIGNMENT == 32)
304#define PPC_CACHE_ALIGN_POWER 5
305#elif (PPC_CACHE_ALIGNMENT == PPC_NO_CACHE_ALIGNMENT)
306#define PPC_CACHE_ALIGN_POWER PPC_NO_CACHE_ALIGNMENT_POWER
307#else
308#error "Undefined power of 2 for PPC_CACHE_ALIGNMENT"
309#endif
310
311/*
312 *  Unless otherwise specified, assume the model has an IP/EP bit to
313 *  set the exception address prefix.
314 */
315
316#ifndef PPC_HAS_EXCEPTION_PREFIX
317#define PPC_HAS_EXCEPTION_PREFIX 1
318#endif
319/*
320 *  Unless otherwise specified, assume the model has an RI bit to
321 *  identify non-recoverable interrupts
322 */
323
324#ifndef PPC_HAS_RI
325#define PPC_HAS_RI 1
326#endif
327
328/*
329 *  Unless otherwise specified, assume the model does NOT have
330 *  403 style EVPR register to set the exception address prefix.
331 */
332
333#ifndef PPC_HAS_EVPR
334#define PPC_HAS_EVPR 0
335#endif
336
337/*
338 *  If no low power mode model was specified, then assume there is none.
339 */
340
341#ifndef PPC_LOW_POWER_MODE
342#define PPC_LOW_POWER_MODE PPC_LOW_POWER_MODE_NONE
343#endif
344
345/*
346 *  Unless specified above, then assume the model does NOT have critical
347 *  interrupt support.
348 */
349
350#ifndef PPC_HAS_RFCI
351#define PPC_HAS_RFCI 0
352#endif
353
354/*
355 *  Unless specified above, do not use the load/store multiple instructions
356 *  in a context switch.
357 */
358
359#ifndef PPC_USE_MULTIPLE
360#define PPC_USE_MULTIPLE 0
361#endif
362
363/*
364 *  The following exceptions are not maskable, and are not
365 *  necessarily predictable, so cannot be offered to RTEMS:
366 *    Alignment exception - handled by the CPU module
367 *    Data exceptions.
368 *    Instruction exceptions.
369 */
370
371/*
372 *  Base Interrupt vectors supported on all models.
373 */
374#define PPC_IRQ_SYSTEM_RESET     0 /* 0x00100 - System reset.              */
375#define PPC_IRQ_MCHECK           1 /* 0x00200 - Machine check              */
376#define PPC_IRQ_PROTECT          2 /* 0x00300 - Protection violation       */
377#define PPC_IRQ_ISI              3 /* 0x00400 - Instruction Fetch error    */
378#define PPC_IRQ_EXTERNAL         4 /* 0x00500 - External interrupt         */
379#define PPC_IRQ_ALIGNMENT        5 /* 0X00600 - Alignment exception        */
380#define PPC_IRQ_PROGRAM          6 /* 0x00700 - Program exception          */
381#define PPC_IRQ_NOFP             7 /* 0x00800 - Floating point unavailable */
382#define PPC_IRQ_DECREMENTER      8 /* 0x00900 - Decrementer interrupt      */
383#define PPC_IRQ_RESERVED_A       9 /* 0x00a00 - Implementation Reserved    */
384#define PPC_IRQ_RESERVED_B      10 /* 0x00b00 - Implementation Reserved    */
385#define PPC_IRQ_SCALL           11 /* 0x00c00 - System call                */
386#define PPC_IRQ_TRACE           12 /* 0x00d00 - Trace Exception            */
387#define PPC_IRQ_FP_ASST         13 /* ox00e00 - Floating point assist      */
388#define PPC_STD_IRQ_LAST        PPC_IRQ_FP_ASST
389
390#define PPC_IRQ_FIRST           PPC_IRQ_SYSTEM_RESET
391
392#if defined(ppc403) || defined(ppc405) || defined(ppc440)
393
394#define PPC_IRQ_CRIT     PPC_IRQ_SYSTEM_RESET /*0x00100- Critical int. pin */
395#define PPC_IRQ_PIT      (PPC_STD_IRQ_LAST+1) /*0x01000- Pgm interval timer*/
396#define PPC_IRQ_FIT      (PPC_STD_IRQ_LAST+2) /*0x01010- Fixed int. timer  */
397#define PPC_IRQ_WATCHDOG (PPC_STD_IRQ_LAST+3) /*0x01020- Watchdog timer    */
398#define PPC_IRQ_DEBUG    (PPC_STD_IRQ_LAST+4) /*0x02000- Debug exceptions  */
399#define PPC_IRQ_LAST     PPC_IRQ_DEBUG
400
401#elif defined(mpc505) || defined(mpc509)
402#define PPC_IRQ_SOFTEMU   (PPC_STD_IRQ_LAST+1)    /* Software emulation. */
403#define PPC_IRQ_DATA_BP   (PPC_STD_IRQ_LAST+ 2)
404#define PPC_IRQ_INST_BP   (PPC_STD_IRQ_LAST+ 3)
405#define PPC_IRQ_MEXT_BP   (PPC_STD_IRQ_LAST+ 4)
406#define PPC_IRQ_NMEXT_BP  (PPC_STD_IRQ_LAST+ 5)
407
408#elif defined(mpc555)
409#define PPC_IRQ_SOFTEMU   (PPC_STD_IRQ_LAST+1)  /* Software emulation. */
410#define PPC_IRQ_INST_PE   (PPC_STD_IRQ_LAST+2)  /* Insn protection error */
411#define PPC_IRQ_DATA_PE   (PPC_STD_IRQ_LAST+3)  /* Data protection error */
412#define PPC_IRQ_DATA_BP   (PPC_STD_IRQ_LAST+4)  /* Data breakpoint */
413#define PPC_IRQ_INST_BP   (PPC_STD_IRQ_LAST+5)  /* Insn breakpoint */
414#define PPC_IRQ_MEXT_BP   (PPC_STD_IRQ_LAST+6)  /* Maskable ext bkpt */
415#define PPC_IRQ_NMEXT_BP  (PPC_STD_IRQ_LAST+7)  /* Non-maskable ext bkpt */
416#define PPC_IRQ_LAST      PPC_IRQ_NMEXT_BP
417
418#elif defined(ppc601)
419#undef PPC_IRQ_TRACE
420#define PPC_IRQ_TRACE    (PPC_STD_IRQ_LAST+1) /*0x02000-Run/Trace Exception*/
421#define PPC_IRQ_LAST     PPC_IRQ_TRACE
422
423#elif defined(ppc602)
424#define PPC_IRQ_LAST     (PPC_STD_IRQ_LAST)
425
426#elif defined(ppc603) || defined(ppc603e)
427#define PPC_IRQ_TRANS_MISS (PPC_STD_IRQ_LAST+1) /*0x1000-Ins Translation Miss*/
428#define PPC_IRQ_DATA_LOAD  (PPC_STD_IRQ_LAST+2) /*0x1100-Data Load Trans Miss*/
429#define PPC_IRQ_DATA_STORE (PPC_STD_IRQ_LAST+3) /*0x1200-Data Store Miss     */
430#define PPC_IRQ_ADDR_BRK   (PPC_STD_IRQ_LAST+4) /*0x1300-Instruction Bkpoint */
431#define PPC_IRQ_SYS_MGT    (PPC_STD_IRQ_LAST+5) /*0x1400-System Management   */
432#define PPC_IRQ_LAST       PPC_IRQ_SYS_MGT
433
434#elif defined(mpc604)
435#define PPC_IRQ_ADDR_BRK (PPC_STD_IRQ_LAST+1) /*0x1300- Inst. addr break  */
436#define PPC_IRQ_SYS_MGT  (PPC_STD_IRQ_LAST+2) /*0x1400- System Management */
437#define PPC_IRQ_LAST     PPC_IRQ_SYS_MGT
438
439#elif defined(mpc860) || defined(mpc821)
440#define PPC_IRQ_EMULATE         (PPC_STD_IRQ_LAST+1) /*0x1000-Software emulation  */
441#define PPC_IRQ_INST_MISS       (PPC_STD_IRQ_LAST+2) /*0x1100-Instruction TLB miss*/
442#define PPC_IRQ_DATA_MISS       (PPC_STD_IRQ_LAST+3) /*0x1200-Data TLB miss */
443#define PPC_IRQ_INST_ERR        (PPC_STD_IRQ_LAST+4) /*0x1300-Instruction TLB err */
444#define PPC_IRQ_DATA_ERR        (PPC_STD_IRQ_LAST+5) /*0x1400-Data TLB error */
445#define PPC_IRQ_DATA_BPNT       (PPC_STD_IRQ_LAST+6) /*0x1C00-Data breakpoint */
446#define PPC_IRQ_INST_BPNT       (PPC_STD_IRQ_LAST+7) /*0x1D00-Inst breakpoint */
447#define PPC_IRQ_IO_BPNT         (PPC_STD_IRQ_LAST+8) /*0x1E00-Peripheral breakpnt */
448#define PPC_IRQ_DEV_PORT        (PPC_STD_IRQ_LAST+9) /*0x1F00-Development port */
449#define PPC_IRQ_IRQ0            (PPC_STD_IRQ_LAST + 10)
450#define PPC_IRQ_LVL0            (PPC_STD_IRQ_LAST + 11)
451#define PPC_IRQ_IRQ1            (PPC_STD_IRQ_LAST + 12)
452#define PPC_IRQ_LVL1            (PPC_STD_IRQ_LAST + 13)
453#define PPC_IRQ_IRQ2            (PPC_STD_IRQ_LAST + 14)
454#define PPC_IRQ_LVL2            (PPC_STD_IRQ_LAST + 15)
455#define PPC_IRQ_IRQ3            (PPC_STD_IRQ_LAST + 16)
456#define PPC_IRQ_LVL3            (PPC_STD_IRQ_LAST + 17)
457#define PPC_IRQ_IRQ4            (PPC_STD_IRQ_LAST + 18)
458#define PPC_IRQ_LVL4            (PPC_STD_IRQ_LAST + 19)
459#define PPC_IRQ_IRQ5            (PPC_STD_IRQ_LAST + 20)
460#define PPC_IRQ_LVL5            (PPC_STD_IRQ_LAST + 21)
461#define PPC_IRQ_IRQ6            (PPC_STD_IRQ_LAST + 22)
462#define PPC_IRQ_LVL6            (PPC_STD_IRQ_LAST + 23)
463#define PPC_IRQ_IRQ7            (PPC_STD_IRQ_LAST + 24)
464#define PPC_IRQ_LVL7            (PPC_STD_IRQ_LAST + 25)
465#define PPC_IRQ_CPM_ERROR       (PPC_STD_IRQ_LAST + 26)
466#define PPC_IRQ_CPM_PC4         (PPC_STD_IRQ_LAST + 27)
467#define PPC_IRQ_CPM_PC5         (PPC_STD_IRQ_LAST + 28)
468#define PPC_IRQ_CPM_SMC2        (PPC_STD_IRQ_LAST + 29)
469#define PPC_IRQ_CPM_SMC1        (PPC_STD_IRQ_LAST + 30)
470#define PPC_IRQ_CPM_SPI         (PPC_STD_IRQ_LAST + 31)
471#define PPC_IRQ_CPM_PC6         (PPC_STD_IRQ_LAST + 32)
472#define PPC_IRQ_CPM_TIMER4      (PPC_STD_IRQ_LAST + 33)
473#define PPC_IRQ_CPM_RESERVED_8  (PPC_STD_IRQ_LAST + 34)
474#define PPC_IRQ_CPM_PC7         (PPC_STD_IRQ_LAST + 35)
475#define PPC_IRQ_CPM_PC8         (PPC_STD_IRQ_LAST + 36)
476#define PPC_IRQ_CPM_PC9         (PPC_STD_IRQ_LAST + 37)
477#define PPC_IRQ_CPM_TIMER3      (PPC_STD_IRQ_LAST + 38)
478#define PPC_IRQ_CPM_RESERVED_D  (PPC_STD_IRQ_LAST + 39)
479#define PPC_IRQ_CPM_PC10        (PPC_STD_IRQ_LAST + 40)
480#define PPC_IRQ_CPM_PC11        (PPC_STD_IRQ_LAST + 41)
481#define PPC_IRQ_CPM_I2C         (PPC_STD_IRQ_LAST + 42)
482#define PPC_IRQ_CPM_RISC_TIMER  (PPC_STD_IRQ_LAST + 43)
483#define PPC_IRQ_CPM_TIMER2      (PPC_STD_IRQ_LAST + 44)
484#define PPC_IRQ_CPM_RESERVED_13 (PPC_STD_IRQ_LAST + 45)
485#define PPC_IRQ_CPM_IDMA2       (PPC_STD_IRQ_LAST + 46)
486#define PPC_IRQ_CPM_IDMA1       (PPC_STD_IRQ_LAST + 47)
487#define PPC_IRQ_CPM_SDMA_ERROR  (PPC_STD_IRQ_LAST + 48)
488#define PPC_IRQ_CPM_PC12        (PPC_STD_IRQ_LAST + 49)
489#define PPC_IRQ_CPM_PC13        (PPC_STD_IRQ_LAST + 50)
490#define PPC_IRQ_CPM_TIMER1      (PPC_STD_IRQ_LAST + 51)
491#define PPC_IRQ_CPM_PC14        (PPC_STD_IRQ_LAST + 52)
492#define PPC_IRQ_CPM_SCC4        (PPC_STD_IRQ_LAST + 53)
493#define PPC_IRQ_CPM_SCC3        (PPC_STD_IRQ_LAST + 54)
494#define PPC_IRQ_CPM_SCC2        (PPC_STD_IRQ_LAST + 55)
495#define PPC_IRQ_CPM_SCC1        (PPC_STD_IRQ_LAST + 56)
496#define PPC_IRQ_CPM_PC15        (PPC_STD_IRQ_LAST + 57)
497
498#define PPC_IRQ_LAST             PPC_IRQ_CPM_PC15
499
500#elif defined(mpc8260)
501
502#define PPC_IRQ_INST_MISS       (PPC_STD_IRQ_LAST+1) /*0x1000-Instruction TLB miss*/
503#define PPC_IRQ_DATA_MISS       (PPC_STD_IRQ_LAST+2) /*0x1100-Data TLB miss */
504#define PPC_IRQ_DATA_L_MISS     (PPC_STD_IRQ_LAST+3) /*0x1200-Data TLB load miss */
505#define PPC_IRQ_DATA_S_MISS     (PPC_STD_IRQ_LAST+4) /*0x1300-Data TLB store miss */
506#define PPC_IRQ_INST_BPNT       (PPC_STD_IRQ_LAST+5) /*0x1400-Inst address breakpoint */
507#define PPC_IRQ_SYS_MGT         (PPC_STD_IRQ_LAST+6) /*0x1500-System Management */
508/* 0x1600 - 0x2F00 reserved */
509#define PPC_IRQ_CPM_NONE        (PPC_STD_IRQ_LAST + 50)
510#define PPC_IRQ_CPM_I2C         (PPC_STD_IRQ_LAST + 51)
511#define PPC_IRQ_CPM_SPI         (PPC_STD_IRQ_LAST + 52)
512#define PPC_IRQ_CPM_RISC_TIMER  (PPC_STD_IRQ_LAST + 53)
513#define PPC_IRQ_CPM_SMC1        (PPC_STD_IRQ_LAST + 54)
514#define PPC_IRQ_CPM_SMC2        (PPC_STD_IRQ_LAST + 55)
515#define PPC_IRQ_CPM_IDMA1       (PPC_STD_IRQ_LAST + 56)
516#define PPC_IRQ_CPM_IDMA2       (PPC_STD_IRQ_LAST + 57)
517#define PPC_IRQ_CPM_IDMA3       (PPC_STD_IRQ_LAST + 58)
518#define PPC_IRQ_CPM_IDMA4       (PPC_STD_IRQ_LAST + 59)
519#define PPC_IRQ_CPM_SDMA        (PPC_STD_IRQ_LAST + 60)
520#define PPC_IRQ_CPM_RES_A       (PPC_STD_IRQ_LAST + 61)
521#define PPC_IRQ_CPM_TIMER1      (PPC_STD_IRQ_LAST + 62)
522#define PPC_IRQ_CPM_TIMER2      (PPC_STD_IRQ_LAST + 63)
523#define PPC_IRQ_CPM_TIMER3      (PPC_STD_IRQ_LAST + 64)
524#define PPC_IRQ_CPM_TIMER4      (PPC_STD_IRQ_LAST + 65)
525#define PPC_IRQ_CPM_TMCNT       (PPC_STD_IRQ_LAST + 66)
526#define PPC_IRQ_CPM_PIT         (PPC_STD_IRQ_LAST + 67)
527#define PPC_IRQ_CPM_RES_B       (PPC_STD_IRQ_LAST + 68)
528#define PPC_IRQ_CPM_IRQ1        (PPC_STD_IRQ_LAST + 69)
529#define PPC_IRQ_CPM_IRQ2        (PPC_STD_IRQ_LAST + 70)
530#define PPC_IRQ_CPM_IRQ3        (PPC_STD_IRQ_LAST + 71)
531#define PPC_IRQ_CPM_IRQ4        (PPC_STD_IRQ_LAST + 72)
532#define PPC_IRQ_CPM_IRQ5        (PPC_STD_IRQ_LAST + 73)
533#define PPC_IRQ_CPM_IRQ6        (PPC_STD_IRQ_LAST + 74)
534#define PPC_IRQ_CPM_IRQ7        (PPC_STD_IRQ_LAST + 75)
535#define PPC_IRQ_CPM_RES_C       (PPC_STD_IRQ_LAST + 76)
536#define PPC_IRQ_CPM_RES_D       (PPC_STD_IRQ_LAST + 77)
537#define PPC_IRQ_CPM_RES_E       (PPC_STD_IRQ_LAST + 78)
538#define PPC_IRQ_CPM_RES_F       (PPC_STD_IRQ_LAST + 79)
539#define PPC_IRQ_CPM_RES_G       (PPC_STD_IRQ_LAST + 80)
540#define PPC_IRQ_CPM_RES_H       (PPC_STD_IRQ_LAST + 81)
541#define PPC_IRQ_CPM_FCC1        (PPC_STD_IRQ_LAST + 82)
542#define PPC_IRQ_CPM_FCC2        (PPC_STD_IRQ_LAST + 83)
543#define PPC_IRQ_CPM_FCC3        (PPC_STD_IRQ_LAST + 84)
544#define PPC_IRQ_CPM_RES_I       (PPC_STD_IRQ_LAST + 85)
545#define PPC_IRQ_CPM_MCC1        (PPC_STD_IRQ_LAST + 86)
546#define PPC_IRQ_CPM_MCC2        (PPC_STD_IRQ_LAST + 87)
547#define PPC_IRQ_CPM_RES_J       (PPC_STD_IRQ_LAST + 88)
548#define PPC_IRQ_CPM_RES_K       (PPC_STD_IRQ_LAST + 89)
549#define PPC_IRQ_CPM_SCC1        (PPC_STD_IRQ_LAST + 90)
550#define PPC_IRQ_CPM_SCC2        (PPC_STD_IRQ_LAST + 91)
551#define PPC_IRQ_CPM_SCC3        (PPC_STD_IRQ_LAST + 92)
552#define PPC_IRQ_CPM_SCC4        (PPC_STD_IRQ_LAST + 93)
553#define PPC_IRQ_CPM_RES_L       (PPC_STD_IRQ_LAST + 94)
554#define PPC_IRQ_CPM_RES_M       (PPC_STD_IRQ_LAST + 95)
555#define PPC_IRQ_CPM_RES_N       (PPC_STD_IRQ_LAST + 96)
556#define PPC_IRQ_CPM_RES_O       (PPC_STD_IRQ_LAST + 97)
557#define PPC_IRQ_CPM_PC15        (PPC_STD_IRQ_LAST + 98)
558#define PPC_IRQ_CPM_PC14        (PPC_STD_IRQ_LAST + 99)
559#define PPC_IRQ_CPM_PC13        (PPC_STD_IRQ_LAST + 100)
560#define PPC_IRQ_CPM_PC12        (PPC_STD_IRQ_LAST + 101)
561#define PPC_IRQ_CPM_PC11        (PPC_STD_IRQ_LAST + 102)
562#define PPC_IRQ_CPM_PC10        (PPC_STD_IRQ_LAST + 103)
563#define PPC_IRQ_CPM_PC9         (PPC_STD_IRQ_LAST + 104)
564#define PPC_IRQ_CPM_PC8         (PPC_STD_IRQ_LAST + 105)
565#define PPC_IRQ_CPM_PC7         (PPC_STD_IRQ_LAST + 106)
566#define PPC_IRQ_CPM_PC6         (PPC_STD_IRQ_LAST + 107)
567#define PPC_IRQ_CPM_PC5         (PPC_STD_IRQ_LAST + 108)
568#define PPC_IRQ_CPM_PC4         (PPC_STD_IRQ_LAST + 109)
569#define PPC_IRQ_CPM_PC3         (PPC_STD_IRQ_LAST + 110)
570#define PPC_IRQ_CPM_PC2         (PPC_STD_IRQ_LAST + 111)
571#define PPC_IRQ_CPM_PC1         (PPC_STD_IRQ_LAST + 112)
572#define PPC_IRQ_CPM_PC0         (PPC_STD_IRQ_LAST + 113)
573
574#define PPC_IRQ_LAST             PPC_IRQ_CPM_PC0
575
576#endif
577
578
579/*
580 *  If the maximum number of exception sources is too low,
581 *  then fix it
582 */
583
584#if PPC_INTERRUPT_MAX <= PPC_IRQ_LAST
585#undef PPC_INTERRUPT_MAX
586#define PPC_INTERRUPT_MAX ((PPC_IRQ_LAST) + 1)
587#endif
588
589/*
590 *  Machine Status Register (MSR) Constants Used by RTEMS
591 */
592
593#if PPC_HAS_RI
594#define PPC_MSR_RI       0x000000002 /* bit 30 - recoverable exception */
595#endif
596
597#define PPC_MSR_DR       0x000000010 /* bit 27 - data address translation */
598#define PPC_MSR_IR       0x000000020 /* bit 26 - instruction addr translation*/
599
600/*
601 *  Some PPC model manuals refer to the Exception Prefix (EP) bit as
602 *  IP for no apparent reason.
603 */
604#if (PPC_HAS_EXCEPTION_PREFIX)
605#define PPC_MSR_EP       0x000000040 /* bit 25 - exception prefix */
606#else
607#define PPC_MSR_EP       0x000000000 /* bit 25 - exception prefix */
608#endif
609
610#if (PPC_HAS_FPU)
611#define PPC_MSR_FP       0x000002000 /* bit 18 - floating point enable */
612#else
613#define PPC_MSR_FP       0x000000000 /* bit 18 - floating point enable */
614#endif
615
616#if (PPC_LOW_POWER_MODE == PPC_LOW_POWER_MODE_NONE)
617#define PPC_MSR_POW      0x000000000 /* bit 13 - power management enable */
618#else
619#define PPC_MSR_POW      0x000040000 /* bit 13 - power management enable */
620#endif
621
622#define PPC_MSR_ME       0x000001000 /* bit 19 - machine check enable */
623#define PPC_MSR_EE       0x000008000 /* bit 16 - external interrupt enable */
624
625#if (PPC_HAS_RFCI)
626#define PPC_MSR_CE       0x000020000 /* bit 14 - critical interrupt enable */
627#else
628#define PPC_MSR_CE       0x000000000 /* bit 14 - critical interrupt enable */
629#endif
630
631#define PPC_MSR_DISABLE_MASK (PPC_MSR_ME|PPC_MSR_EE|PPC_MSR_CE)
632
633#define PPC_MINIMUM_STACK_FRAME_SIZE PPC_STACK_ALIGNMENT
634
635#ifdef __cplusplus
636}
637#endif
638
639#endif /* _RTEMS_POWERPC_POWERPC_H */
Note: See TracBrowser for help on using the repository browser.