annotate packages/hal/powerpc/arch/current/include/ppc_stub.h @ 3403:8c8767bb9a62 default tip

devs/nand/micron_mt29: Remove defunct references (in comments) to mt29f2g08_oob_ecc.
author Ross Younger <wry@ecoscentric.com>
date Sun, 18 Jan 2015 17:59:01 +1300
parents 842a82a508f3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
1 #ifndef CYGONCE_HAL_PPC_STUB_H
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
2 #define CYGONCE_HAL_PPC_STUB_H
64
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
3 //========================================================================
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
4 //
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
5 // ppc_stub.h
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
6 //
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
7 // PowerPC-specific definitions for generic stub
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
8 //
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
9 //========================================================================
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
10 // ####ECOSGPLCOPYRIGHTBEGIN####
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
11 // -------------------------------------------
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
12 // This file is part of eCos, the Embedded Configurable Operating System.
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
13 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 76
diff changeset
14 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
15 // eCos is free software; you can redistribute it and/or modify it under
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
16 // the terms of the GNU General Public License as published by the Free
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
17 // Software Foundation; either version 2 or (at your option) any later
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
18 // version.
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 76
diff changeset
19 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
20 // eCos is distributed in the hope that it will be useful, but WITHOUT
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
21 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
22 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
23 // for more details.
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 76
diff changeset
24 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
25 // You should have received a copy of the GNU General Public License
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
26 // along with eCos; if not, write to the Free Software Foundation, Inc.,
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
27 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 76
diff changeset
28 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
29 // As a special exception, if other files instantiate templates or use
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
30 // macros or inline functions from this file, or you compile this file
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
31 // and link it with other works to produce a work based on this file,
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
32 // this file does not by itself cause the resulting work to be covered by
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
33 // the GNU General Public License. However the source code for this file
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
34 // must still be made available in accordance with section (3) of the GNU
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
35 // General Public License v2.
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 76
diff changeset
36 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
37 // This exception does not invalidate any other reasons why a work based
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
38 // on this file might be covered by the GNU General Public License.
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
39 // -------------------------------------------
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1397
diff changeset
40 // ####ECOSGPLCOPYRIGHTEND####
64
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
41 //========================================================================
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
42 //#####DESCRIPTIONBEGIN####
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
43 //
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
44 // Author(s): Red Hat, jskov
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
45 // Contributors: Red Hat, jskov
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
46 // Date: 1998-08-20
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
47 // Purpose:
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
48 // Description: PowerPC-specific definitions for generic stub
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
49 // Usage:
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
50 //
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
51 //####DESCRIPTIONEND####
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
52 //
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 2
diff changeset
53 //========================================================================
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
54
76
435cced73e2f eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
jlarmour
parents: 66
diff changeset
55 #ifdef __cplusplus
435cced73e2f eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
jlarmour
parents: 66
diff changeset
56 extern "C" {
435cced73e2f eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
jlarmour
parents: 66
diff changeset
57 #endif
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
58
1397
9c818dd5d9fa Updates for EC555 targets - from Bob Koninckx
gthomas
parents: 210
diff changeset
59 typedef unsigned long target_register_t;
9c818dd5d9fa Updates for EC555 targets - from Bob Koninckx
gthomas
parents: 210
diff changeset
60
2883
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
61
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
62 #ifndef CYGHWR_HAL_POWERPC_BOOK_E
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
63
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
64 // Most PowerPCs use a standard register layout.
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
65
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
66 #define NUMREGS 71
2883
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
67
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
68 #define REGSIZE( _x_ ) (((_x_) >= F0 && (_x_) <= F31) ? 8 : 4)
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
69
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
70 #else
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
71
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
72 // BookE processors only have 70 registers, MQ is not supported. All
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
73 // registers are 32 bit and instead of FP registers there are the top
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
74 // 32 bits of the GPRs. The 64-bit registers are only used by SPE
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
75 // instructions, which we don't currently support.
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
76
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
77 #define NUMREGS 70
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
78
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
79 #define REGSIZE( _x_ ) (4)
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
80
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
81 #endif
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
82
842a82a508f3 Add Book E architecture support. See the ChangeLog for full details.
nickg
parents: 2729
diff changeset
83
1397
9c818dd5d9fa Updates for EC555 targets - from Bob Koninckx
gthomas
parents: 210
diff changeset
84 #ifdef CYGHWR_HAL_POWERPC_FPU
9c818dd5d9fa Updates for EC555 targets - from Bob Koninckx
gthomas
parents: 210
diff changeset
85 // The PowerPC has floating point registers that are larger than what it
9c818dd5d9fa Updates for EC555 targets - from Bob Koninckx
gthomas
parents: 210
diff changeset
86 // can hold in a target_register_t
9c818dd5d9fa Updates for EC555 targets - from Bob Koninckx
gthomas
parents: 210
diff changeset
87 #define TARGET_HAS_LARGE_REGISTERS
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
88
1397
9c818dd5d9fa Updates for EC555 targets - from Bob Koninckx
gthomas
parents: 210
diff changeset
89 // PowerPC stub has special needs for register handling because flating point
9c818dd5d9fa Updates for EC555 targets - from Bob Koninckx
gthomas
parents: 210
diff changeset
90 // registers are bigger than the rest. Special put_register and get_register
9c818dd5d9fa Updates for EC555 targets - from Bob Koninckx
gthomas
parents: 210
diff changeset
91 // are provided
9c818dd5d9fa Updates for EC555 targets - from Bob Koninckx
gthomas
parents: 210
diff changeset
92 #define CYGARC_STUB_REGISTER_ACCESS_DEFINED 1
9c818dd5d9fa Updates for EC555 targets - from Bob Koninckx
gthomas
parents: 210
diff changeset
93
9c818dd5d9fa Updates for EC555 targets - from Bob Koninckx
gthomas
parents: 210
diff changeset
94 // extra space needed for floating point registers
9c818dd5d9fa Updates for EC555 targets - from Bob Koninckx
gthomas
parents: 210
diff changeset
95 #define HAL_STUB_REGISTERS_SIZE ((sizeof(GDB_Registers) + sizeof(target_register_t) - 1)/sizeof(target_register_t))
9c818dd5d9fa Updates for EC555 targets - from Bob Koninckx
gthomas
parents: 210
diff changeset
96 #endif
9c818dd5d9fa Updates for EC555 targets - from Bob Koninckx
gthomas
parents: 210
diff changeset
97
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
98
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
99 enum regnames {
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
100 R0, R1, R2, R3, R4, R5, R6, R7,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
101 R8, R9, R10, R11, R12, R13, R14, R15,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
102 R16, R17, R18, R19, R20, R21, R22, R23,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
103 R24, R25, R26, R27, R28, R29, R30, R31,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
104 F0, F1, F2, F3, F4, F5, F6, F7,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
105 F8, F9, F10, F11, F12, F13, F14, F15,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
106 F16, F17, F18, F19, F20, F21, F22, F23,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
107 F24, F25, F26, F27, F28, F29, F30, F31,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
108 PC, PS, CND, LR, CNT, XER, MQ
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
109 };
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
110
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
111 // For convenience
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
112 #define SP R1
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
113
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
114 typedef enum regnames regnames_t;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
115
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
116 /* Given a trap value TRAP, return the corresponding signal. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
117 extern int __computeSignal (unsigned int trap_number);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
118
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
119 /* Return the SPARC trap number corresponding to the last-taken trap. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
120 extern int __get_trap_number (void);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
121
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
122 /* Return the currently-saved value corresponding to register REG. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
123 extern target_register_t get_register (regnames_t reg);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
124
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
125 /* Store VALUE in the register corresponding to WHICH. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
126 extern void put_register (regnames_t which, target_register_t value);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
127
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
128 /* Set the currently-saved pc register value to PC. This also updates NPC
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
129 as needed. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
130 extern void set_pc (target_register_t pc);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
131
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
132 /* Set things up so that the next user resume will execute one instruction.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
133 This may be done by setting breakpoints or setting a single step flag
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
134 in the saved user registers, for example. */
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
135 void __single_step (void);
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
136
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
137 /* Clear the single-step state. */
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
138 void __clear_single_step (void);
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
139
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
140 /* If the breakpoint we hit is in the breakpoint() instruction, return a
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
141 non-zero value. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
142 extern int __is_breakpoint_function (void);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
143
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
144 /* Skip the current instruction. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
145 extern void __skipinst (void);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
146
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
147 extern void __install_breakpoints (void);
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
148
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
149 extern void __clear_breakpoints (void);
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
150
76
435cced73e2f eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
jlarmour
parents: 66
diff changeset
151 #ifdef __cplusplus
435cced73e2f eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
jlarmour
parents: 66
diff changeset
152 } /* extern "C" */
435cced73e2f eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
jlarmour
parents: 66
diff changeset
153 #endif
435cced73e2f eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
jlarmour
parents: 66
diff changeset
154
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
155 #endif // ifndef CYGONCE_HAL_PPC_STUB_H