Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | /* * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ /* * This module only exists because I don't know how to get the silly C compiler * and/or linker to generate data areas that are aligned on a particular boundary. * And, this stuff is in the V=R mapped area. * * Do the following for each: * * .size name,size-in-bytes * .type area-name,@object * .globl area-name * .align power-of-two * area-name: * .set .,.+size-in-bytes * * So long as I'm being pedantic, always make sure that the most aligned, * i.e., the largest power-of-twos, are first and then descend to the smallest. * If you don't, and you are not careful and hand calculate, you'll end up * with holes and waste storage. I hate C. * * Define the sizes in genassym.c */ #include <debug.h> #include <cpus.h> #include <ppc/asm.h> #include <ppc/proc_reg.h> #include <ppc/spec_reg.h> #include <mach/ppc/vm_param.h> #include <assym.s> ; ; NOTE: We need this only if PREEMPTSTACK is set to non-zero in hw_lock. ; Make sure they are set to the same thing ; #define PREEMPTSTACK 0 .data /* 4096-byte aligned areas */ .globl EXT(per_proc_info) .align 12 EXT(per_proc_info): ; Per processor data area .space (ppSize*NCPUS),0 ; (filled with 0s) /* 512-byte aligned areas */ .globl EXT(kernel_pmap_store) ; This is the kernel_pmap .align 8 EXT(kernel_pmap_store): .set .,.+pmapSize /* 256-byte aligned areas */ .globl EXT(GratefulDebWork) .align 8 EXT(GratefulDebWork): ; Enough for 2 rows of 8 chars of 16-pixel wide 32-bit pixels and a 256 byte work area .set .,.+2560 .globl debstash .align 8 debstash: .set .,.+256 #if PREEMPTSTACK ; ; NOTE: We need this only if PREEMPTSTACK is set to non-zero in hw_lock. ; .globl EXT(DBGpreempt) ; preemption debug stack .align 8 EXT(DBGpreempt): .set .,.+(NCPUS*PREEMPTSTACK*16) #endif /* 128-byte aligned areas */ .globl EXT(mapCtl) .align 7 EXT(mapCtl): .set .,.+mapcsize .globl fwdisplock .align 7 fwdisplock: .set .,.+128 .globl EXT(free_mappings) .align 7 EXT(free_mappings): .long 0 .globl EXT(syncClkSpot) .align 7 EXT(syncClkSpot): .long 0 .long 0 .long 0 .long 0 .long 0 .long 0 .long 0 .long 0 .globl EXT(NMIss) .align 7 EXT(NMIss): .long 0 .long 0 .long 0 .long 0 .long 0 .long 0 .long 0 .long 0 /* 32-byte aligned areas */ .globl EXT(dbvecs) .align 5 EXT(dbvecs): .set .,.+(33*16) .globl hexfont .align 5 #include <ppc/hexfont.h> .globl EXT(QNaNbarbarian) .align 5 EXT(QNaNbarbarian): .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */ .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */ .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */ .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */ .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */ .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */ .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */ .long 0x7FFFDEAD /* This is a quiet not-a-number which is a "known" debug value */ /* 8-byte aligned areas */ .globl EXT(FloatInit) .align 3 EXT(FloatInit): .long 0xC24BC195 /* Initial value */ .long 0x87859393 /* of floating point registers */ .long 0xE681A2C8 /* and others */ .long 0x8599855A .globl EXT(DebugWork) .align 3 EXT(DebugWork): .long 0 .long 0 .long 0 .long 0 .globl EXT(dbfloats) .align 3 EXT(dbfloats): .set .,.+(33*8) .globl EXT(dbspecrs) .align 3 EXT(dbspecrs): .set .,.+(80*4) /* * Interrupt and debug stacks go here */ .align PPC_PGSHIFT .globl EXT(FixedStackStart) EXT(FixedStackStart): .globl EXT(intstack) EXT(intstack): .set .,.+INTSTACK_SIZE*NCPUS /* Debugger stack - used by the debugger if present */ /* NOTE!!! Keep the debugger stack right after the interrupt stack */ .globl EXT(debstack) EXT(debstack): .set ., .+KERNEL_STACK_SIZE*NCPUS .globl EXT(FixedStackEnd) EXT(FixedStackEnd): .align ALIGN .globl EXT(intstack_top_ss) EXT(intstack_top_ss): .long EXT(intstack)+INTSTACK_SIZE-FM_SIZE /* intstack_top_ss points to the top of interrupt stack */ .align ALIGN .globl EXT(debstack_top_ss) EXT(debstack_top_ss): .long EXT(debstack)+KERNEL_STACK_SIZE-FM_SIZE /* debstack_top_ss points to the top of debug stack */ .globl EXT(debstackptr) EXT(debstackptr): .long EXT(debstack)+KERNEL_STACK_SIZE-FM_SIZE |