]> git.saurik.com Git - apple/xnu.git/blame - osfmk/ppc/aligned_data.s
xnu-792.13.8.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 *
8ad349bb 4 * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
1c79356b 5 *
8ad349bb
A
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@
1c79356b
A
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>
1c79356b
A
54#include <ppc/asm.h>
55#include <ppc/proc_reg.h>
55e303ae
A
56#include <ppc/spec_reg.h>
57#include <mach/ppc/vm_param.h>
1c79356b
A
58#include <assym.s>
59
1c79356b
A
60 .data
61
55e303ae 62/* 4096-byte aligned areas */
1c79356b 63
91447636
A
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)
55e303ae 70 .align 12
91447636
A
71EXT(BootProcInfo): ; Per processor data area
72 .space ppSize,0 ; (filled with 0s)
1c79356b
A
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):
55e303ae 79 .set .,.+pmapSize
1c79356b
A
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
9bccf70c 94/* 128-byte aligned areas */
1c79356b 95
1c79356b 96 .globl EXT(mapCtl)
9bccf70c 97 .align 7
1c79356b
A
98EXT(mapCtl):
99 .set .,.+mapcsize
100
1c79356b 101 .globl fwdisplock
9bccf70c 102 .align 7
1c79356b 103fwdisplock:
9bccf70c
A
104 .set .,.+128
105
106 .globl EXT(free_mappings)
107 .align 7
108
109EXT(free_mappings):
110 .long 0
111
9bccf70c
A
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)
1c79356b
A
130
131 .globl hexfont
132 .align 5
133#include <ppc/hexfont.h>
134
9bccf70c
A
135 .globl EXT(QNaNbarbarian)
136 .align 5
1c79356b
A
137
138EXT(QNaNbarbarian):
9bccf70c
A
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 */
1c79356b 143
9bccf70c
A
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 */
1c79356b 148
1c79356b
A
149/* 8-byte aligned areas */
150
9bccf70c
A
151 .globl EXT(FloatInit)
152 .align 3
1c79356b
A
153
154EXT(FloatInit):
9bccf70c
A
155 .long 0xC24BC195 /* Initial value */
156 .long 0x87859393 /* of floating point registers */
157 .long 0xE681A2C8 /* and others */
158 .long 0x8599855A
1c79356b 159
9bccf70c
A
160 .globl EXT(DebugWork)
161 .align 3
1c79356b
A
162
163EXT(DebugWork):
9bccf70c
A
164 .long 0
165 .long 0
166 .long 0
167 .long 0
1c79356b 168
9bccf70c
A
169 .globl EXT(dbfloats)
170 .align 3
1c79356b
A
171EXT(dbfloats):
172 .set .,.+(33*8)
173
9bccf70c
A
174 .globl EXT(dbspecrs)
175 .align 3
1c79356b 176EXT(dbspecrs):
a3d08fcd 177 .set .,.+(336*4)
55e303ae
A
178
179/*
91447636 180 * Boot processor Interrupt and debug stacks go here.
55e303ae 181 */
91447636 182
3a60a9f5 183 /* in the __HIB section since the hibernate restore code uses this stack. */
91447636
A
184 .section __HIB, __data
185
55e303ae 186 .align PPC_PGSHIFT
55e303ae
A
187
188 .globl EXT(intstack)
189EXT(intstack):
3a60a9f5
A
190 .globl EXT(gIOHibernateRestoreStack)
191EXT(gIOHibernateRestoreStack):
91447636
A
192
193 .set .,.+INTSTACK_SIZE
194
3a60a9f5
A
195 .globl EXT(gIOHibernateRestoreStackEnd)
196EXT(gIOHibernateRestoreStackEnd):
91447636
A
197
198 /* back to the regular __DATA section. */
199
200 .section __DATA, __data
201 .align PPC_PGSHIFT
202
55e303ae 203/* Debugger stack - used by the debugger if present */
55e303ae
A
204
205 .globl EXT(debstack)
206EXT(debstack):
91447636 207 .set ., .+KERNEL_STACK_SIZE
55e303ae 208
91447636 209 .section __DATA, __data
55e303ae 210
55e303ae 211