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