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