]>
git.saurik.com Git - apple/xnu.git/blob - pexpert/pexpert/arm64/apple_arm64_common.h
34005a9ed8399c006da0e08752f89e1cbaebc44d
2 * Copyright (c) 2019 Apple Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
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.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
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.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
29 #ifndef _PEXPERT_ARM64_APPLE_ARM64_COMMON_H
30 #define _PEXPERT_ARM64_APPLE_ARM64_COMMON_H
32 #define __ARM_ARCH__ 8
33 #define __ARM_VMSA__ 8
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
42 #ifndef ARM_LARGE_MEMORY
43 #define __ARM64_PMAP_SUBPAGE_L1__ 1
46 #define APPLE_ARM64_ARCH_FAMILY 1
47 #define ARM_ARCH_TIMER
48 #define ARM_BOARD_WFE_TIMEOUT_NS 1000
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
59 #include <pexpert/arm64/apple_arm64_regs.h>
60 #include <pexpert/arm64/AIC.h>
63 #include <pexpert/arm/S3cUART.h>
65 #if !defined(APPLETYPHOON) && !defined(APPLETWISTER)
66 #include <pexpert/arm/dockchannel.h>
68 // AOP_CLOCK frequency * 30 ms
69 #define DOCKCHANNEL_DRAIN_PERIOD (192000000 * 0.03)
72 #endif /* ASSEMBLER */
75 * See arm64/proc_reg.h for how these values are constructed from the MIDR.
76 * The chip-revision property from EDT also uses these constants.
78 #define CPU_VERSION_A0 0x00
79 #define CPU_VERSION_A1 0x01
80 #define CPU_VERSION_B0 0x10
81 #define CPU_VERSION_B1 0x11
82 #define CPU_VERSION_C0 0x20
83 #define CPU_VERSION_UNKNOWN 0xff
85 #endif /* !_PEXPERT_ARM64_APPLE_ARM64_COMMON_H */