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