]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
6 | * The contents of this file constitute Original Code as defined in and | |
7 | * are subject to the Apple Public Source License Version 1.1 (the | |
8 | * "License"). You may not use this file except in compliance with the | |
9 | * License. Please obtain a copy of the License at | |
10 | * http://www.apple.com/publicsource and read it before using this file. | |
11 | * | |
12 | * This Original Code and all software distributed under the License are | |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the | |
17 | * License for the specific language governing rights and limitations | |
18 | * under the License. | |
19 | * | |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | /* | |
23 | * This module only exists because I don't know how to get the silly C compiler | |
24 | * and/or linker to generate data areas that are aligned on a particular boundary. | |
25 | * And, this stuff is in the V=R mapped area. | |
26 | * | |
27 | * Do the following for each: | |
28 | * | |
29 | * .size name,size-in-bytes | |
30 | * .type area-name,@object | |
31 | * .globl area-name | |
32 | * .align power-of-two | |
33 | * area-name: | |
34 | * .set .,.+size-in-bytes | |
35 | * | |
36 | * So long as I'm being pedantic, always make sure that the most aligned, | |
37 | * i.e., the largest power-of-twos, are first and then descend to the smallest. | |
38 | * If you don't, and you are not careful and hand calculate, you'll end up | |
39 | * with holes and waste storage. I hate C. | |
40 | * | |
41 | * Define the sizes in genassym.c | |
42 | */ | |
43 | ||
44 | ||
45 | #include <debug.h> | |
46 | #include <cpus.h> | |
47 | #include <ppc/asm.h> | |
48 | #include <ppc/proc_reg.h> | |
49 | #include <assym.s> | |
50 | ||
51 | ; | |
52 | ; NOTE: We need this only if PREEMPTSTACK is set to non-zero in hw_lock. | |
53 | ; Make sure they are set to the same thing | |
54 | ; | |
55 | #define PREEMPTSTACK 0 | |
56 | ||
57 | .data | |
58 | ||
59 | /* 1024-byte aligned areas */ | |
60 | ||
61 | .globl EXT(per_proc_info) | |
62 | .align 10 | |
63 | EXT(per_proc_info): ; Per processor data area | |
64 | .fill (ppSize*NCPUS)/4,4,0 ; (filled with 0s) | |
65 | ||
66 | /* 512-byte aligned areas */ | |
67 | ||
68 | .globl EXT(kernel_pmap_store) ; This is the kernel_pmap | |
69 | .align 8 | |
70 | EXT(kernel_pmap_store): | |
71 | .set .,.+PMAP_SIZE | |
72 | ||
73 | ||
74 | /* 256-byte aligned areas */ | |
75 | ||
76 | .globl EXT(GratefulDebWork) | |
77 | .align 8 | |
78 | EXT(GratefulDebWork): ; Enough for 2 rows of 8 chars of 16-pixel wide 32-bit pixels and a 256 byte work area | |
79 | .set .,.+2560 | |
80 | ||
81 | .globl debstash | |
82 | .align 8 | |
83 | debstash: | |
84 | .set .,.+256 | |
85 | ||
86 | .globl EXT(hw_counts) ; Counter banks per processor | |
87 | .align 8 | |
88 | EXT(hw_counts): | |
89 | .set .,.+(NCPUS*256) | |
90 | ||
91 | #if PREEMPTSTACK | |
92 | ||
93 | ; | |
94 | ; NOTE: We need this only if PREEMPTSTACK is set to non-zero in hw_lock. | |
95 | ; | |
96 | ||
97 | .globl EXT(DBGpreempt) ; preemption debug stack | |
98 | .align 8 | |
99 | EXT(DBGpreempt): | |
100 | .set .,.+(NCPUS*PREEMPTSTACK*16) | |
101 | #endif | |
102 | ||
103 | ||
104 | /* 128-byte aligned areas */ | |
105 | ||
106 | .globl EXT(saveanchor) | |
107 | .align 7 | |
108 | EXT(saveanchor): | |
109 | .set .,.+SVsize | |
110 | ||
111 | .globl EXT(mapCtl) | |
112 | .align 7 | |
113 | EXT(mapCtl): | |
114 | .set .,.+mapcsize | |
115 | ||
116 | .globl EXT(trcWork) | |
117 | .align 7 | |
118 | EXT(trcWork): | |
119 | .long EXT(traceTableBeg) ; The next trace entry to use | |
120 | #if DEBUG | |
121 | /* .long 0x02000000 */ /* Only alignment exceptions enabled */ | |
122 | .long 0xFFFFFFFF /* All enabled */ | |
123 | /* .long 0xFBBFFFFF */ /* EXT and DEC disabled */ | |
124 | /* .long 0xFFBFFFFF */ /* DEC disabled */ | |
125 | #else | |
126 | .long 0x00000000 ; All disabled on non-debug systems | |
127 | #endif | |
128 | .long EXT(traceTableBeg) ; Start of the trace table | |
129 | .long EXT(traceTableEnd) ; End (wrap point) of the trace | |
130 | .long 0 ; Saved mask while in debugger | |
131 | ||
132 | .long 0 | |
133 | .long 0 | |
134 | .long 0 | |
135 | ||
136 | ||
137 | .globl fwdisplock | |
138 | .align 7 | |
139 | fwdisplock: | |
140 | .set .,.+128 | |
141 | ||
142 | .globl EXT(free_mappings) | |
143 | .align 7 | |
144 | ||
145 | EXT(free_mappings): | |
146 | .long 0 | |
147 | ||
148 | .globl EXT(syncClkSpot) | |
149 | .align 7 | |
150 | EXT(syncClkSpot): | |
151 | .long 0 | |
152 | .long 0 | |
153 | .long 0 | |
154 | .long 0 | |
155 | .long 0 | |
156 | .long 0 | |
157 | .long 0 | |
158 | .long 0 | |
159 | ||
160 | .globl EXT(NMIss) | |
161 | .align 7 | |
162 | EXT(NMIss): | |
163 | .long 0 | |
164 | .long 0 | |
165 | .long 0 | |
166 | .long 0 | |
167 | .long 0 | |
168 | .long 0 | |
169 | .long 0 | |
170 | .long 0 | |
171 | ||
172 | /* 32-byte aligned areas */ | |
173 | ||
174 | .globl EXT(dbvecs) | |
175 | .align 5 | |
176 | EXT(dbvecs): | |
177 | .set .,.+(33*16) | |
178 | ||
179 | .globl hexfont | |
180 | .align 5 | |
181 | #include <ppc/hexfont.h> | |
182 | ||
183 | .globl EXT(QNaNbarbarian) | |
184 | .align 5 | |
185 | ||
186 | EXT(QNaNbarbarian): | |
187 | .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */ | |
188 | .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */ | |
189 | .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */ | |
190 | .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */ | |
191 | ||
192 | .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */ | |
193 | .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */ | |
194 | .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */ | |
195 | .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */ | |
196 | ||
197 | .globl EXT(dgWork) | |
198 | .align 5 | |
199 | EXT(dgWork): | |
200 | .long 0 | |
201 | .long 0 | |
202 | .long 0 | |
203 | .long 0 | |
204 | .long 0 | |
205 | .long 0 | |
206 | .long 0 | |
207 | .long 0 | |
208 | ||
209 | ||
210 | /* 8-byte aligned areas */ | |
211 | ||
212 | .globl EXT(FloatInit) | |
213 | .align 3 | |
214 | ||
215 | EXT(FloatInit): | |
216 | .long 0xC24BC195 /* Initial value */ | |
217 | .long 0x87859393 /* of floating point registers */ | |
218 | .long 0xE681A2C8 /* and others */ | |
219 | .long 0x8599855A | |
220 | ||
221 | .globl EXT(DebugWork) | |
222 | .align 3 | |
223 | ||
224 | EXT(DebugWork): | |
225 | .long 0 | |
226 | .long 0 | |
227 | .long 0 | |
228 | .long 0 | |
229 | ||
230 | .globl EXT(dbfloats) | |
231 | .align 3 | |
232 | EXT(dbfloats): | |
233 | .set .,.+(33*8) | |
234 | ||
235 | .globl EXT(dbspecrs) | |
236 | .align 3 | |
237 | EXT(dbspecrs): | |
238 | .set .,.+(80*4) |