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