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