]> git.saurik.com Git - apple/xnu.git/blob - osfmk/ppc/aligned_data.s
xnu-124.13.tar.gz
[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 * 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 /* 32-byte aligned areas */
105
106 .globl EXT(saveanchor)
107 .align 5
108 EXT(saveanchor):
109 .set .,.+SVsize
110
111 .globl EXT(mapCtl)
112 .align 5
113 EXT(mapCtl):
114 .set .,.+mapcsize
115
116 .globl EXT(dgWork)
117 .align 5
118 EXT(dgWork):
119 .long 0
120 .long 0
121 .long 0
122 .long 0
123 .long 0
124 .long 0
125 .long 0
126 .long 0
127
128 .globl EXT(trcWork)
129 .align 5
130 EXT(trcWork):
131 #if DEBUG
132 /* .long 0x02000000 */ /* Only alignment exceptions enabled */
133 .long 0xFFFFFFFF /* All enabled */
134 /* .long 0xFBBFFFFF */ /* EXT and DEC disabled */
135 /* .long 0xFFBFFFFF */ /* DEC disabled */
136 #else
137 .long 0x00000000 ; All disabled on non-debug systems
138 #endif
139 .long EXT(traceTableBeg) ; The next trace entry to use
140 .long EXT(traceTableBeg) ; Start of the trace table
141 .long EXT(traceTableEnd) ; End (wrap point) of the trace
142 .long 0 ; Saved mask while in debugger
143
144 .long 0
145 .long 0
146 .long 0
147
148
149 .globl fwdisplock
150 .align 5
151 fwdisplock:
152 .set .,.+32
153
154 .globl hexfont
155 .align 5
156 #include <ppc/hexfont.h>
157
158 .globl EXT(QNaNbarbarian)
159 .align 5
160
161 EXT(QNaNbarbarian):
162 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
163 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
164 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
165 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
166
167 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
168 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
169 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
170 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
171
172 .globl EXT(free_mappings)
173 .align 5
174
175 EXT(free_mappings):
176 .long 0
177
178 .globl EXT(syncClkSpot)
179 .align 5
180 EXT(syncClkSpot):
181 .long 0
182 .long 0
183 .long 0
184 .long 0
185 .long 0
186 .long 0
187 .long 0
188 .long 0
189
190 .globl EXT(NMIss)
191 .align 5
192 EXT(NMIss):
193 .long 0
194 .long 0
195 .long 0
196 .long 0
197 .long 0
198 .long 0
199 .long 0
200 .long 0
201
202 .globl EXT(dbvecs)
203 .align 5
204 EXT(dbvecs):
205 .set .,.+(33*16)
206
207
208
209 /* 8-byte aligned areas */
210
211 .globl EXT(FloatInit)
212 .align 3
213
214 EXT(FloatInit):
215 .long 0xC24BC195 /* Initial value */
216 .long 0x87859393 /* of floating point registers */
217 .long 0xE681A2C8 /* and others */
218 .long 0x8599855A
219
220 .globl EXT(DebugWork)
221 .align 3
222
223 EXT(DebugWork):
224 .long 0
225 .long 0
226 .long 0
227 .long 0
228
229 .globl EXT(dbfloats)
230 .align 3
231 EXT(dbfloats):
232 .set .,.+(33*8)
233
234 .globl EXT(dbspecrs)
235 .align 3
236 EXT(dbspecrs):
237 .set .,.+(80*4)