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_VMAPPLE_H 30 #define _PEXPERT_ARM64_VMAPPLE_H 31 32 #define NO_MONITOR 1 33 #define NO_ECORE 1 34 #define HAS_PARAVIRTUALIZED_CTRR 1 35 36 #define VMAPPLE 1 37 #define APPLEVIRTUALPLATFORM 1 38 39 #define CPU_HAS_APPLE_PAC 1 40 #define HAS_PARAVIRTUALIZED_PAC 1 41 #define HAS_GIC_V3 1 42 #define HAS_ARM_FEAT_SSBS2 1 43 #define HAS_ARM_FEAT_SME 1 44 #define HAS_ARM_FEAT_SME2 1 45 #define HAS_ARM_FEAT_PAN3 1 46 47 #define __ARM_PAN_AVAILABLE__ 1 48 #define __ARM_16K_PG__ 1 49 #define __ARM_RANGE_TLBI__ 1 50 51 #define ARM_PARAMETERIZED_PMAP 1 52 #define __ARM_MIXED_PAGE_SIZE__ 1 53 54 55 #include <pexpert/arm64/apple_arm64_common.h> 56 #undef __ARM64_PMAP_SUBPAGE_L1__ 57 #undef __ARM64_PMAP_KERN_SUBPAGE_L1__ 58 59 #ifndef ASSEMBLER 60 #define PL011_UART 61 #define PLATFORM_PANIC_LOG_DISABLED 62 #endif /* ! ASSEMBLER */ 63 64 65 #define GIC_SPURIOUS_IRQ 1023 // IRQ no. for GIC spurious interrupt 66 67 #define GICR_PE_SIZE 0x20000 // Size of each redistributor region 68 69 70 /* GICv3 reigster definitions; see GICv3 spec (Arm IHI 0069G) for more about these registers */ 71 #define GICD_CTLR 0x0 72 73 #define GICD_CTLR_ENABLEGRP0 0x1 74 75 #define GICR_TYPER 0x08 76 #define GICR_WAKER 0x14 77 #define GICR_IGROUPR0 0x10080 78 #define GICR_ISENABLER0 0x10100 79 80 #define GICR_TYPER_AFFINITY_VALUE_SHIFT 32 81 #define GICR_TYPER_LAST 0x10 82 83 #define GICR_WAKER_PROCESSORSLEEP 0x2 84 #define GICR_WAKER_CHILDRENASLEEP 0x4 85 86 #define ICC_CTLR_EOIMODE 0x1 87 88 #define ICC_SRE_SRE 0x1 89 /* End of GICv3 register definitions */ 90 91 #endif /* ! _PEXPERT_ARM64_VMAPPLE_H */ 92