]> git.saurik.com Git - apple/xnu.git/blame - osfmk/arm/data.s
xnu-7195.101.1.tar.gz
[apple/xnu.git] / osfmk / arm / data.s
CommitLineData
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)
45LEXT(intstack_low_guard)
46 .space (PAGE_MAX_SIZE_NUM)
5ba3f43e
A
47
48 /* IRQ stack */
49 .globl EXT(intstack) // Boot processor IRQ stack
50LEXT(intstack)
d9a64523 51 .space (INTSTACK_SIZE_NUM)
5ba3f43e
A
52 .globl EXT(intstack_top)
53LEXT(intstack_top)
54
d9a64523
A
55 .globl EXT(intstack_high_guard)
56LEXT(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
64LEXT(fiqstack)
d9a64523 65 .space (FIQSTACK_SIZE_NUM)
5ba3f43e
A
66 .globl EXT(fiqstack_top) // Boot processor FIQ stack top
67LEXT(fiqstack_top)
68
d9a64523
A
69 .globl EXT(fiqstack_high_guard)
70LEXT(fiqstack_high_guard)
71 .space (PAGE_MAX_SIZE_NUM)
72
73#else
74
75 .global EXT(excepstack)
76LEXT(excepstack)
77 .space (EXCEPSTACK_SIZE_NUM)
78 .globl EXT(excepstack_top)
79LEXT(excepstack_top)
80
81 .globl EXT(excepstack_high_guard)
82LEXT(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
90LEXT(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)
96LEXT(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)
102LEXT(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
112LEXT(ropagetable_begin)
f427ee49
A
113#if XNU_TARGET_OS_OSX
114 // A big auxKC might need more page tables, especially because
115 // it's not block mapped.
116 // Note that we don't distuinguish between KASAN or not: With
117 // a KASAN kernel, the effective auxKC limit is smaller.
118 .space 18*16*1024,0
119#elif KASAN
120 .space 16*16*1024,0
121#else
d9a64523 122 .space 14*16*1024,0
f427ee49 123#endif
5ba3f43e
A
124#else
125LEXT(ropagetable_begin)
c6bf4f31 126#endif /* defined(KERNEL_INTEGRITY_KTRR) || defined(KERNEL_INTEGRITY_CTRR) */
5ba3f43e
A
127
128LEXT(ropagetable_end)
129
130 .globl EXT(ropagetable_begin)
131 .globl EXT(ropagetable_end)
132#endif /* __arm64__ */
133
134/* vim: set ts=4: */