]> git.saurik.com Git - apple/xnu.git/blame - osfmk/ppc/aligned_data.s
xnu-517.12.7.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 *
e5568f75
A
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.
1c79356b 11 *
e5568f75
A
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
1c79356b
A
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
e5568f75
A
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.
1c79356b
A
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>
55e303ae
A
49#include <ppc/spec_reg.h>
50#include <mach/ppc/vm_param.h>
1c79356b
A
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
55e303ae 61/* 4096-byte aligned areas */
1c79356b
A
62
63 .globl EXT(per_proc_info)
55e303ae 64 .align 12
1c79356b 65EXT(per_proc_info): ; Per processor data area
55e303ae 66 .space (ppSize*NCPUS),0 ; (filled with 0s)
1c79356b
A
67
68/* 512-byte aligned areas */
69
70 .globl EXT(kernel_pmap_store) ; This is the kernel_pmap
71 .align 8
72EXT(kernel_pmap_store):
55e303ae 73 .set .,.+pmapSize
1c79356b
A
74
75
76/* 256-byte aligned areas */
77
78 .globl EXT(GratefulDebWork)
79 .align 8
80EXT(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
85debstash:
86 .set .,.+256
87
1c79356b
A
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
96EXT(DBGpreempt):
97 .set .,.+(NCPUS*PREEMPTSTACK*16)
98#endif
99
100
9bccf70c 101/* 128-byte aligned areas */
1c79356b 102
1c79356b 103 .globl EXT(mapCtl)
9bccf70c 104 .align 7
1c79356b
A
105EXT(mapCtl):
106 .set .,.+mapcsize
107
1c79356b 108 .globl fwdisplock
9bccf70c 109 .align 7
1c79356b 110fwdisplock:
9bccf70c
A
111 .set .,.+128
112
113 .globl EXT(free_mappings)
114 .align 7
115
116EXT(free_mappings):
117 .long 0
118
119 .globl EXT(syncClkSpot)
120 .align 7
121EXT(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
133EXT(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
147EXT(dbvecs):
148 .set .,.+(33*16)
1c79356b
A
149
150 .globl hexfont
151 .align 5
152#include <ppc/hexfont.h>
153
9bccf70c
A
154 .globl EXT(QNaNbarbarian)
155 .align 5
1c79356b
A
156
157EXT(QNaNbarbarian):
9bccf70c
A
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 */
1c79356b 162
9bccf70c
A
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 */
1c79356b 167
1c79356b
A
168/* 8-byte aligned areas */
169
9bccf70c
A
170 .globl EXT(FloatInit)
171 .align 3
1c79356b
A
172
173EXT(FloatInit):
9bccf70c
A
174 .long 0xC24BC195 /* Initial value */
175 .long 0x87859393 /* of floating point registers */
176 .long 0xE681A2C8 /* and others */
177 .long 0x8599855A
1c79356b 178
9bccf70c
A
179 .globl EXT(DebugWork)
180 .align 3
1c79356b
A
181
182EXT(DebugWork):
9bccf70c
A
183 .long 0
184 .long 0
185 .long 0
186 .long 0
1c79356b 187
9bccf70c
A
188 .globl EXT(dbfloats)
189 .align 3
1c79356b
A
190EXT(dbfloats):
191 .set .,.+(33*8)
192
9bccf70c
A
193 .globl EXT(dbspecrs)
194 .align 3
1c79356b 195EXT(dbspecrs):
a3d08fcd 196 .set .,.+(336*4)
55e303ae
A
197
198/*
199 * Interrupt and debug stacks go here
200 */
201
202 .align PPC_PGSHIFT
203 .globl EXT(FixedStackStart)
204EXT(FixedStackStart):
205
206 .globl EXT(intstack)
207EXT(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)
214EXT(debstack):
215 .set ., .+KERNEL_STACK_SIZE*NCPUS
216
217 .globl EXT(FixedStackEnd)
218EXT(FixedStackEnd):
219
220 .align ALIGN
221 .globl EXT(intstack_top_ss)
222EXT(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)
227EXT(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)
232EXT(debstackptr):
233 .long EXT(debstack)+KERNEL_STACK_SIZE-FM_SIZE
234