]> git.saurik.com Git - apple/xnu.git/blame - osfmk/ppc/aligned_data.s
xnu-792.6.61.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 *
37839358
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 *
37839358
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,
37839358
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>
1c79356b
A
46#include <ppc/asm.h>
47#include <ppc/proc_reg.h>
55e303ae
A
48#include <ppc/spec_reg.h>
49#include <mach/ppc/vm_param.h>
1c79356b
A
50#include <assym.s>
51
1c79356b
A
52 .data
53
55e303ae 54/* 4096-byte aligned areas */
1c79356b 55
91447636
A
56 .globl EXT(PerProcTable)
57 .align 12
58EXT(PerProcTable): ; Per processor table
59 .space (ppeSize*MAX_CPUS),0 ; (filled with 0s)
60
61 .globl EXT(BootProcInfo)
55e303ae 62 .align 12
91447636
A
63EXT(BootProcInfo): ; Per processor data area
64 .space ppSize,0 ; (filled with 0s)
1c79356b
A
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):
55e303ae 71 .set .,.+pmapSize
1c79356b
A
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
9bccf70c 86/* 128-byte aligned areas */
1c79356b 87
1c79356b 88 .globl EXT(mapCtl)
9bccf70c 89 .align 7
1c79356b
A
90EXT(mapCtl):
91 .set .,.+mapcsize
92
1c79356b 93 .globl fwdisplock
9bccf70c 94 .align 7
1c79356b 95fwdisplock:
9bccf70c
A
96 .set .,.+128
97
98 .globl EXT(free_mappings)
99 .align 7
100
101EXT(free_mappings):
102 .long 0
103
9bccf70c
A
104 .globl EXT(NMIss)
105 .align 7
106EXT(NMIss):
107 .long 0
108 .long 0
109 .long 0
110 .long 0
111 .long 0
112 .long 0
113 .long 0
114 .long 0
115
116/* 32-byte aligned areas */
117
118 .globl EXT(dbvecs)
119 .align 5
120EXT(dbvecs):
121 .set .,.+(33*16)
1c79356b
A
122
123 .globl hexfont
124 .align 5
125#include <ppc/hexfont.h>
126
9bccf70c
A
127 .globl EXT(QNaNbarbarian)
128 .align 5
1c79356b
A
129
130EXT(QNaNbarbarian):
9bccf70c
A
131 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
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 */
1c79356b 135
9bccf70c
A
136 .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */
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 */
1c79356b 140
1c79356b
A
141/* 8-byte aligned areas */
142
9bccf70c
A
143 .globl EXT(FloatInit)
144 .align 3
1c79356b
A
145
146EXT(FloatInit):
9bccf70c
A
147 .long 0xC24BC195 /* Initial value */
148 .long 0x87859393 /* of floating point registers */
149 .long 0xE681A2C8 /* and others */
150 .long 0x8599855A
1c79356b 151
9bccf70c
A
152 .globl EXT(DebugWork)
153 .align 3
1c79356b
A
154
155EXT(DebugWork):
9bccf70c
A
156 .long 0
157 .long 0
158 .long 0
159 .long 0
1c79356b 160
9bccf70c
A
161 .globl EXT(dbfloats)
162 .align 3
1c79356b
A
163EXT(dbfloats):
164 .set .,.+(33*8)
165
9bccf70c
A
166 .globl EXT(dbspecrs)
167 .align 3
1c79356b 168EXT(dbspecrs):
a3d08fcd 169 .set .,.+(336*4)
55e303ae
A
170
171/*
91447636 172 * Boot processor Interrupt and debug stacks go here.
55e303ae 173 */
91447636 174
3a60a9f5 175 /* in the __HIB section since the hibernate restore code uses this stack. */
91447636
A
176 .section __HIB, __data
177
55e303ae 178 .align PPC_PGSHIFT
55e303ae
A
179
180 .globl EXT(intstack)
181EXT(intstack):
3a60a9f5
A
182 .globl EXT(gIOHibernateRestoreStack)
183EXT(gIOHibernateRestoreStack):
91447636
A
184
185 .set .,.+INTSTACK_SIZE
186
3a60a9f5
A
187 .globl EXT(gIOHibernateRestoreStackEnd)
188EXT(gIOHibernateRestoreStackEnd):
91447636
A
189
190 /* back to the regular __DATA section. */
191
192 .section __DATA, __data
193 .align PPC_PGSHIFT
194
55e303ae 195/* Debugger stack - used by the debugger if present */
55e303ae
A
196
197 .globl EXT(debstack)
198EXT(debstack):
91447636 199 .set ., .+KERNEL_STACK_SIZE
55e303ae 200
91447636 201 .section __DATA, __data
55e303ae 202
55e303ae 203