]> git.saurik.com Git - apple/xnu.git/blob - osfmk/ppc/aligned_data.s
5f616a42fb44bb059f8af3f288a590f132c34218
[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 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23 /*
24 * This module only exists because I don't know how to get the silly C compiler
25 * and/or linker to generate data areas that are aligned on a particular boundary.
26 * And, this stuff is in the V=R mapped area.
27 *
28 * Do the following for each:
29 *
30 * .size name,size-in-bytes
31 * .type area-name,@object
32 * .globl area-name
33 * .align power-of-two
34 * area-name:
35 * .set .,.+size-in-bytes
36 *
37 * So long as I'm being pedantic, always make sure that the most aligned,
38 * i.e., the largest power-of-twos, are first and then descend to the smallest.
39 * If you don't, and you are not careful and hand calculate, you'll end up
40 * with holes and waste storage. I hate C.
41 *
42 * Define the sizes in genassym.c
43 */
44
45
46 #include <debug.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 .data
54
55 /* 4096-byte aligned areas */
56
57 .globl EXT(PerProcTable)
58 .align 12
59 EXT(PerProcTable): ; Per processor table
60 .space (ppeSize*MAX_CPUS),0 ; (filled with 0s)
61
62 .globl EXT(BootProcInfo)
63 .align 12
64 EXT(BootProcInfo): ; Per processor data area
65 .space ppSize,0 ; (filled with 0s)
66
67 /* 512-byte aligned areas */
68
69 .globl EXT(kernel_pmap_store) ; This is the kernel_pmap
70 .align 8
71 EXT(kernel_pmap_store):
72 .set .,.+pmapSize
73
74
75 /* 256-byte aligned areas */
76
77 .globl EXT(GratefulDebWork)
78 .align 8
79 EXT(GratefulDebWork): ; Enough for 2 rows of 8 chars of 16-pixel wide 32-bit pixels and a 256 byte work area
80 .set .,.+2560
81
82 .globl debstash
83 .align 8
84 debstash:
85 .set .,.+256
86
87 /* 128-byte aligned areas */
88
89 .globl EXT(mapCtl)
90 .align 7
91 EXT(mapCtl):
92 .set .,.+mapcsize
93
94 .globl fwdisplock
95 .align 7
96 fwdisplock:
97 .set .,.+128
98
99 .globl EXT(free_mappings)
100 .align 7
101
102 EXT(free_mappings):
103 .long 0
104
105 .globl EXT(NMIss)
106 .align 7
107 EXT(NMIss):
108 .long 0
109 .long 0
110 .long 0
111 .long 0
112 .long 0
113 .long 0
114 .long 0
115 .long 0
116
117 /* 32-byte aligned areas */
118
119 .globl EXT(dbvecs)
120 .align 5
121 EXT(dbvecs):
122 .set .,.+(33*16)
123
124 .globl hexfont
125 .align 5
126 #include <ppc/hexfont.h>
127
128 .globl EXT(QNaNbarbarian)
129 .align 5
130
131 EXT(QNaNbarbarian):
132 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
133 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
134 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
135 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
136
137 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
138 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
139 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
140 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
141
142 /* 8-byte aligned areas */
143
144 .globl EXT(FloatInit)
145 .align 3
146
147 EXT(FloatInit):
148 .long 0xC24BC195 /* Initial value */
149 .long 0x87859393 /* of floating point registers */
150 .long 0xE681A2C8 /* and others */
151 .long 0x8599855A
152
153 .globl EXT(DebugWork)
154 .align 3
155
156 EXT(DebugWork):
157 .long 0
158 .long 0
159 .long 0
160 .long 0
161
162 .globl EXT(dbfloats)
163 .align 3
164 EXT(dbfloats):
165 .set .,.+(33*8)
166
167 .globl EXT(dbspecrs)
168 .align 3
169 EXT(dbspecrs):
170 .set .,.+(336*4)
171
172 /*
173 * Boot processor Interrupt and debug stacks go here.
174 */
175
176 /* in the __HIB section since the hibernate restore code uses this stack. */
177 .section __HIB, __data
178
179 .align PPC_PGSHIFT
180
181 .globl EXT(intstack)
182 EXT(intstack):
183 .globl EXT(gIOHibernateRestoreStack)
184 EXT(gIOHibernateRestoreStack):
185
186 .set .,.+INTSTACK_SIZE
187
188 .globl EXT(gIOHibernateRestoreStackEnd)
189 EXT(gIOHibernateRestoreStackEnd):
190
191 /* back to the regular __DATA section. */
192
193 .section __DATA, __data
194 .align PPC_PGSHIFT
195
196 /* Debugger stack - used by the debugger if present */
197
198 .globl EXT(debstack)
199 EXT(debstack):
200 .set ., .+KERNEL_STACK_SIZE
201
202 .section __DATA, __data
203
204