]>
Commit | Line | Data |
---|---|---|
f427ee49 A |
1 | /* |
2 | * Copyright (c) 2019 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 | ||
29 | #ifndef _PEXPERT_ARM64_APPLE_ARM64_COMMON_H | |
30 | #define _PEXPERT_ARM64_APPLE_ARM64_COMMON_H | |
31 | ||
32 | #define __ARM_ARCH__ 8 | |
33 | #define __ARM_VMSA__ 8 | |
34 | #define __ARM_VFP__ 4 | |
35 | #define __ARM_COHERENT_CACHE__ 1 | |
36 | #define __ARM_COHERENT_IO__ 1 | |
37 | #define __ARM_IC_NOALIAS_ICACHE__ 1 | |
38 | #define __ARM_DEBUG__ 7 | |
39 | #define __ARM_ENABLE_SWAP__ 1 | |
40 | #define __ARM_V8_CRYPTO_EXTENSIONS__ 1 | |
41 | ||
42 | #ifndef ARM_LARGE_MEMORY | |
43 | #define __ARM64_PMAP_SUBPAGE_L1__ 1 | |
44 | #endif | |
45 | ||
46 | #define APPLE_ARM64_ARCH_FAMILY 1 | |
47 | #define ARM_ARCH_TIMER | |
48 | #define ARM_BOARD_WFE_TIMEOUT_NS 1000 | |
49 | ||
50 | #if defined(HAS_CTRR) | |
51 | #define KERNEL_INTEGRITY_CTRR 1 | |
52 | #elif defined(HAS_KTRR) | |
53 | #define KERNEL_INTEGRITY_KTRR 1 | |
54 | #elif defined(MONITOR) | |
55 | #define KERNEL_INTEGRITY_WT 1 | |
56 | #endif | |
57 | ||
2a1bd2d3 A |
58 | #if defined(CPU_HAS_APPLE_PAC) && defined(__arm64e__) |
59 | #define HAS_APPLE_PAC 1 /* Has Apple ARMv8.3a pointer authentication */ | |
2a1bd2d3 | 60 | #endif |
f427ee49 A |
61 | |
62 | #include <pexpert/arm64/apple_arm64_regs.h> | |
63 | #include <pexpert/arm64/AIC.h> | |
64 | ||
65 | #ifndef ASSEMBLER | |
66 | #include <pexpert/arm/S3cUART.h> | |
67 | ||
68 | #if !defined(APPLETYPHOON) && !defined(APPLETWISTER) | |
69 | #include <pexpert/arm/dockchannel.h> | |
70 | ||
71 | // AOP_CLOCK frequency * 30 ms | |
72 | #define DOCKCHANNEL_DRAIN_PERIOD (192000000 * 0.03) | |
73 | #endif | |
74 | ||
75 | #endif /* ASSEMBLER */ | |
76 | ||
77 | /* | |
78 | * See arm64/proc_reg.h for how these values are constructed from the MIDR. | |
79 | * The chip-revision property from EDT also uses these constants. | |
80 | */ | |
81 | #define CPU_VERSION_A0 0x00 | |
82 | #define CPU_VERSION_A1 0x01 | |
83 | #define CPU_VERSION_B0 0x10 | |
84 | #define CPU_VERSION_B1 0x11 | |
85 | #define CPU_VERSION_C0 0x20 | |
86 | #define CPU_VERSION_UNKNOWN 0xff | |
87 | ||
88 | #endif /* !_PEXPERT_ARM64_APPLE_ARM64_COMMON_H */ |