]>
Commit | Line | Data |
---|---|---|
5ba3f43e A |
1 | /* |
2 | * Copyright (c) 2007-2009 Apple 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 | #include <arm/asm.h> | |
29 | #include <arm/proc_reg.h> | |
30 | #include "assym.s" | |
31 | ||
32 | #if defined(__arm__) | |
33 | #include "globals_asm.h" | |
34 | #elif defined(__arm64__) | |
35 | /* We're fine, use adrp, add */ | |
36 | #else | |
37 | #error Unknown architecture. | |
38 | #endif | |
39 | ||
d9a64523 | 40 | .section __BOOTDATA, __data // Aligned data |
5ba3f43e | 41 | |
d9a64523 | 42 | .align 14 |
5ba3f43e | 43 | |
d9a64523 A |
44 | .globl EXT(intstack_low_guard) |
45 | LEXT(intstack_low_guard) | |
46 | .space (PAGE_MAX_SIZE_NUM) | |
5ba3f43e A |
47 | |
48 | /* IRQ stack */ | |
49 | .globl EXT(intstack) // Boot processor IRQ stack | |
50 | LEXT(intstack) | |
d9a64523 | 51 | .space (INTSTACK_SIZE_NUM) |
5ba3f43e A |
52 | .globl EXT(intstack_top) |
53 | LEXT(intstack_top) | |
54 | ||
d9a64523 A |
55 | .globl EXT(intstack_high_guard) |
56 | LEXT(intstack_high_guard) | |
57 | .space (PAGE_MAX_SIZE_NUM) | |
5ba3f43e | 58 | |
d9a64523 A |
59 | /* Low guard for fiq/exception stack is shared w/ interrupt stack high guard */ |
60 | ||
61 | #ifndef __arm64__ | |
5ba3f43e A |
62 | |
63 | .globl EXT(fiqstack) // Boot processor FIQ stack | |
64 | LEXT(fiqstack) | |
d9a64523 | 65 | .space (FIQSTACK_SIZE_NUM) |
5ba3f43e A |
66 | .globl EXT(fiqstack_top) // Boot processor FIQ stack top |
67 | LEXT(fiqstack_top) | |
68 | ||
d9a64523 A |
69 | .globl EXT(fiqstack_high_guard) |
70 | LEXT(fiqstack_high_guard) | |
71 | .space (PAGE_MAX_SIZE_NUM) | |
72 | ||
73 | #else | |
74 | ||
75 | .global EXT(excepstack) | |
76 | LEXT(excepstack) | |
77 | .space (EXCEPSTACK_SIZE_NUM) | |
78 | .globl EXT(excepstack_top) | |
79 | LEXT(excepstack_top) | |
80 | ||
81 | .globl EXT(excepstack_high_guard) | |
82 | LEXT(excepstack_high_guard) | |
83 | .space (PAGE_MAX_SIZE_NUM) | |
84 | ||
85 | #endif | |
86 | ||
87 | // Must align to 16K here, due to <rdar://problem/33268668> | |
88 | .global EXT(kd_early_buffer) | |
89 | .align 14 | |
90 | LEXT(kd_early_buffer) // space for kdebug's early event buffer | |
91 | .space 16*1024,0 | |
92 | ||
93 | .section __DATA, __data // Aligned data | |
5ba3f43e A |
94 | .align 3 // unsigned long long aligned Section |
95 | .globl EXT(RTClockData) | |
96 | LEXT(RTClockData) // Real Time clock area | |
97 | .space RTCLOCKDataSize_NUM,0 // (filled with 0s) | |
98 | ||
99 | #if TRASH_VFP_ON_SAVE | |
100 | .align 4 | |
101 | .globl EXT(vfptrash_data) | |
102 | LEXT(vfptrash_data) | |
103 | .fill 64, 4, 0xca55e77e | |
104 | #endif | |
105 | ||
5ba3f43e A |
106 | #if __arm64__ |
107 | .section __DATA, __const | |
108 | ||
c6bf4f31 | 109 | #if defined(KERNEL_INTEGRITY_KTRR) || defined(KERNEL_INTEGRITY_CTRR) |
5ba3f43e A |
110 | /* reserve space for read only page tables */ |
111 | .align 14 | |
112 | LEXT(ropagetable_begin) | |
d9a64523 | 113 | .space 14*16*1024,0 |
5ba3f43e A |
114 | #else |
115 | LEXT(ropagetable_begin) | |
c6bf4f31 | 116 | #endif /* defined(KERNEL_INTEGRITY_KTRR) || defined(KERNEL_INTEGRITY_CTRR) */ |
5ba3f43e A |
117 | |
118 | LEXT(ropagetable_end) | |
119 | ||
120 | .globl EXT(ropagetable_begin) | |
121 | .globl EXT(ropagetable_end) | |
122 | #endif /* __arm64__ */ | |
123 | ||
124 | /* vim: set ts=4: */ |