]> git.saurik.com Git - apple/xnu.git/blame - osfmk/ppc/aligned_data.s
xnu-344.tar.gz
[apple/xnu.git] / osfmk / ppc / aligned_data.s
CommitLineData
1c79356b
A
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
63EXT(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
70EXT(kernel_pmap_store):
71 .set .,.+PMAP_SIZE
72
73
74/* 256-byte aligned areas */
75
76 .globl EXT(GratefulDebWork)
77 .align 8
78EXT(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
83debstash:
84 .set .,.+256
85
86 .globl EXT(hw_counts) ; Counter banks per processor
87 .align 8
88EXT(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
99EXT(DBGpreempt):
100 .set .,.+(NCPUS*PREEMPTSTACK*16)
101#endif
102
103
9bccf70c 104/* 128-byte aligned areas */
1c79356b
A
105
106 .globl EXT(saveanchor)
9bccf70c 107 .align 7
1c79356b
A
108EXT(saveanchor):
109 .set .,.+SVsize
110
111 .globl EXT(mapCtl)
9bccf70c 112 .align 7
1c79356b
A
113EXT(mapCtl):
114 .set .,.+mapcsize
115
1c79356b 116 .globl EXT(trcWork)
9bccf70c 117 .align 7
1c79356b 118EXT(trcWork):
9bccf70c 119 .long EXT(traceTableBeg) ; The next trace entry to use
1c79356b 120#if DEBUG
9bccf70c
A
121/* .long 0x02000000 */ /* Only alignment exceptions enabled */
122 .long 0xFFFFFFFF /* All enabled */
123/* .long 0xFBBFFFFF */ /* EXT and DEC disabled */
124/* .long 0xFFBFFFFF */ /* DEC disabled */
1c79356b 125#else
9bccf70c 126 .long 0x00000000 ; All disabled on non-debug systems
1c79356b 127#endif
9bccf70c
A
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
1c79356b
A
131
132 .long 0
133 .long 0
134 .long 0
135
136
137 .globl fwdisplock
9bccf70c 138 .align 7
1c79356b 139fwdisplock:
9bccf70c
A
140 .set .,.+128
141
142 .globl EXT(free_mappings)
143 .align 7
144
145EXT(free_mappings):
146 .long 0
147
148 .globl EXT(syncClkSpot)
149 .align 7
150EXT(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
162EXT(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
176EXT(dbvecs):
177 .set .,.+(33*16)
1c79356b
A
178
179 .globl hexfont
180 .align 5
181#include <ppc/hexfont.h>
182
9bccf70c
A
183 .globl EXT(QNaNbarbarian)
184 .align 5
1c79356b
A
185
186EXT(QNaNbarbarian):
9bccf70c
A
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 */
1c79356b 191
9bccf70c
A
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 */
1c79356b 196
9bccf70c
A
197 .globl EXT(dgWork)
198 .align 5
199EXT(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
1c79356b
A
208
209
210/* 8-byte aligned areas */
211
9bccf70c
A
212 .globl EXT(FloatInit)
213 .align 3
1c79356b
A
214
215EXT(FloatInit):
9bccf70c
A
216 .long 0xC24BC195 /* Initial value */
217 .long 0x87859393 /* of floating point registers */
218 .long 0xE681A2C8 /* and others */
219 .long 0x8599855A
1c79356b 220
9bccf70c
A
221 .globl EXT(DebugWork)
222 .align 3
1c79356b
A
223
224EXT(DebugWork):
9bccf70c
A
225 .long 0
226 .long 0
227 .long 0
228 .long 0
1c79356b 229
9bccf70c
A
230 .globl EXT(dbfloats)
231 .align 3
1c79356b
A
232EXT(dbfloats):
233 .set .,.+(33*8)
234
9bccf70c
A
235 .globl EXT(dbspecrs)
236 .align 3
1c79356b
A
237EXT(dbspecrs):
238 .set .,.+(80*4)