]> git.saurik.com Git - apple/xnu.git/blob - osfmk/ppc/aligned_data.s
xnu-517.3.15.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 * 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 <ppc/spec_reg.h>
53 #include <mach/ppc/vm_param.h>
54 #include <assym.s>
55
56 ;
57 ; NOTE: We need this only if PREEMPTSTACK is set to non-zero in hw_lock.
58 ; Make sure they are set to the same thing
59 ;
60 #define PREEMPTSTACK 0
61
62 .data
63
64 /* 4096-byte aligned areas */
65
66 .globl EXT(per_proc_info)
67 .align 12
68 EXT(per_proc_info): ; Per processor data area
69 .space (ppSize*NCPUS),0 ; (filled with 0s)
70
71 /* 512-byte aligned areas */
72
73 .globl EXT(kernel_pmap_store) ; This is the kernel_pmap
74 .align 8
75 EXT(kernel_pmap_store):
76 .set .,.+pmapSize
77
78
79 /* 256-byte aligned areas */
80
81 .globl EXT(GratefulDebWork)
82 .align 8
83 EXT(GratefulDebWork): ; Enough for 2 rows of 8 chars of 16-pixel wide 32-bit pixels and a 256 byte work area
84 .set .,.+2560
85
86 .globl debstash
87 .align 8
88 debstash:
89 .set .,.+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(mapCtl)
107 .align 7
108 EXT(mapCtl):
109 .set .,.+mapcsize
110
111 .globl fwdisplock
112 .align 7
113 fwdisplock:
114 .set .,.+128
115
116 .globl EXT(free_mappings)
117 .align 7
118
119 EXT(free_mappings):
120 .long 0
121
122 .globl EXT(syncClkSpot)
123 .align 7
124 EXT(syncClkSpot):
125 .long 0
126 .long 0
127 .long 0
128 .long 0
129 .long 0
130 .long 0
131 .long 0
132 .long 0
133
134 .globl EXT(NMIss)
135 .align 7
136 EXT(NMIss):
137 .long 0
138 .long 0
139 .long 0
140 .long 0
141 .long 0
142 .long 0
143 .long 0
144 .long 0
145
146 /* 32-byte aligned areas */
147
148 .globl EXT(dbvecs)
149 .align 5
150 EXT(dbvecs):
151 .set .,.+(33*16)
152
153 .globl hexfont
154 .align 5
155 #include <ppc/hexfont.h>
156
157 .globl EXT(QNaNbarbarian)
158 .align 5
159
160 EXT(QNaNbarbarian):
161 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
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
166 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
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
171 /* 8-byte aligned areas */
172
173 .globl EXT(FloatInit)
174 .align 3
175
176 EXT(FloatInit):
177 .long 0xC24BC195 /* Initial value */
178 .long 0x87859393 /* of floating point registers */
179 .long 0xE681A2C8 /* and others */
180 .long 0x8599855A
181
182 .globl EXT(DebugWork)
183 .align 3
184
185 EXT(DebugWork):
186 .long 0
187 .long 0
188 .long 0
189 .long 0
190
191 .globl EXT(dbfloats)
192 .align 3
193 EXT(dbfloats):
194 .set .,.+(33*8)
195
196 .globl EXT(dbspecrs)
197 .align 3
198 EXT(dbspecrs):
199 .set .,.+(80*4)
200
201 /*
202 * Interrupt and debug stacks go here
203 */
204
205 .align PPC_PGSHIFT
206 .globl EXT(FixedStackStart)
207 EXT(FixedStackStart):
208
209 .globl EXT(intstack)
210 EXT(intstack):
211 .set .,.+INTSTACK_SIZE*NCPUS
212
213 /* Debugger stack - used by the debugger if present */
214 /* NOTE!!! Keep the debugger stack right after the interrupt stack */
215
216 .globl EXT(debstack)
217 EXT(debstack):
218 .set ., .+KERNEL_STACK_SIZE*NCPUS
219
220 .globl EXT(FixedStackEnd)
221 EXT(FixedStackEnd):
222
223 .align ALIGN
224 .globl EXT(intstack_top_ss)
225 EXT(intstack_top_ss):
226 .long EXT(intstack)+INTSTACK_SIZE-FM_SIZE /* intstack_top_ss points to the top of interrupt stack */
227
228 .align ALIGN
229 .globl EXT(debstack_top_ss)
230 EXT(debstack_top_ss):
231
232 .long EXT(debstack)+KERNEL_STACK_SIZE-FM_SIZE /* debstack_top_ss points to the top of debug stack */
233
234 .globl EXT(debstackptr)
235 EXT(debstackptr):
236 .long EXT(debstack)+KERNEL_STACK_SIZE-FM_SIZE
237