RTEMS  5.1
debugmod.h
1 /* debugmod.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.rtems.org/license/LICENSE.
33  *
34  *
35  * Note:
36  * This file is included by both C and assembler code ( -DASM )
37  */
38 
39 /*
40  * FIXME: This file is not used anywhere inside of RTEMS source-tree.
41  * Notify OAR if you actually use it, otherwise it might be removed in
42  * future versions of RTEMS
43  */
44 
45 #ifndef _RTEMS_POWERPC_DEBUGMOD_H
46 #define _RTEMS_POWERPC_DEBUGMOD_H
47 
48 #warning "please read the FIXME inside of this file"
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
54 /*
55  * This file contains the information required to build
56  * RTEMS for a particular member of the PowerPC family. It does
57  * this by setting variables to indicate which implementation
58  * dependent features are present in a particular member
59  * of the family.
60  *
61  * The following architectural feature definitions are defaulted
62  * unless specifically set by the model definition:
63  *
64  * + PPC_DEBUG_MODEL - PPC_DEBUG_MODEL_STANDARD
65  */
66 
67 /*
68  * Define the debugging assistance models found in the PPC family.
69  *
70  * Standard: single step and branch trace
71  * Single Step Only: single step only
72  * IBM 4xx: debug exception
73  */
74 
75 #define PPC_DEBUG_MODEL_STANDARD 1
76 #define PPC_DEBUG_MODEL_SINGLE_STEP_ONLY 2
77 #define PPC_DEBUG_MODEL_IBM4xx 3
78 
79 #elif defined(ppc403) || defined(ppc405) || defined(ppc440)
80 
81 #define PPC_DEBUG_MODEL PPC_DEBUG_MODEL_IBM4xx
82 
83 #elif defined(ppc601)
84 
85 #define PPC_DEBUG_MODEL PPC_DEBUG_MODEL_SINGLE_STEP_ONLY
86 
87 #endif
88 
89 /*
90  * Use the default debug scheme defined in the architectural specification
91  * if another model has not been specified.
92  */
93 
94 #ifndef PPC_DEBUG_MODEL
95 #define PPC_DEBUG_MODEL PPC_DEBUG_MODEL_STANDARD
96 #endif
97 
98 /*
99  * Interrupt/exception MSR bits set as defined on p. 2-20 in "The Programming
100  * Environments" and the manuals for various PPC models.
101  */
102 
103 #if (PPC_DEBUG_MODEL == PPC_DEBUG_MODEL_STANDARD)
104 #define PPC_MSR_DE 0x000000000 /* bit 22 - debug exception enable */
105 #define PPC_MSR_BE 0x000000200 /* bit 22 - branch trace enable */
106 #define PPC_MSR_SE 0x000000400 /* bit 21 - single step trace enable */
107 #elif (PPC_DEBUG_MODEL == PPC_DEBUG_MODEL_SINGLE_STEP_ONLY)
108 #define PPC_MSR_DE 0x000000000 /* bit 22 - debug exception enable */
109 #define PPC_MSR_BE 0x000000200 /* bit 22 - branch trace enable */
110 #define PPC_MSR_SE 0x000000000 /* bit 21 - single step trace enable */
111 #elif (PPC_DEBUG_MODEL == PPC_DEBUG_MODEL_IBM4xx)
112 #define PPC_MSR_DE 0x000000200 /* bit 22 - debug exception enable */
113 #define PPC_MSR_BE 0x000000000 /* bit 22 - branch trace enable */
114 #define PPC_MSR_SE 0x000000000 /* bit 21 - single step trace enable */
115 #else
116 #error "MSR constants -- unknown PPC_DEBUG_MODEL!!"
117 #endif
118 
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 #endif /* _RTEMS_POWERPC_DEBUGMOD_H */
124 /* end of include file */