1 /*! 2 * @header 3 * AP chip environments. 4 */ 5 #ifndef __IMG4_CHIP_AP_H 6 #define __IMG4_CHIP_AP_H 7 8 #ifndef __IMG4_INDIRECT 9 #error "Please #include <img4/firmware.h> instead of this file directly" 10 #endif // __IMG4_INDIRECT 11 12 OS_ASSUME_NONNULL_BEGIN 13 14 /*! 15 * @const IMG4_CHIP_AP_SHA1 16 * The Application Processor on an Apple ARM SoC with an embedded sha1 17 * certifcate chain. 18 * 19 * This chip environment represents one unique instance of such a chip. 20 */ 21 #if !XNU_KERNEL_PRIVATE 22 IMG4_API_AVAILABLE_20200508 23 OS_EXPORT 24 const img4_chip_t _img4_chip_ap_sha1; 25 #define IMG4_CHIP_AP_SHA1 (&_img4_chip_ap_sha1) 26 #else 27 #define IMG4_CHIP_AP_SHA1 (img4if->i4if_v7.chip_ap_sha1) 28 #endif 29 30 /*! 31 * @const IMG4_CHIP_AP_SHA2_384 32 * The Application Processor on an Apple ARM SoC with an embedded sha2-384 33 * certifcate chain. 34 * 35 * This chip environment represents one unique instance of such a chip. 36 */ 37 #if !XNU_KERNEL_PRIVATE 38 IMG4_API_AVAILABLE_20200508 39 OS_EXPORT 40 const img4_chip_t _img4_chip_ap_sha2_384; 41 #define IMG4_CHIP_AP_SHA2_384 (&_img4_chip_ap_sha2_384) 42 #else 43 #define IMG4_CHIP_AP_SHA2_384 (img4if->i4if_v7.chip_ap_sha2_384) 44 #endif 45 46 /*! 47 * @const IMG4_CHIP_AP_HYBRID 48 * An Intel x86 processor whose chain of trust is rooted in an instance of a 49 * {@link IMG4_CHIP_AP_SHA2_384} chip. Firmwares executed on this chip are 50 * authenticated against the characteristics of the corresponding AP chip 51 * environment and not the characteristics of the x86 processor. 52 * 53 * This chip environment represents one unique instance of such a chip pair. 54 */ 55 #if !XNU_KERNEL_PRIVATE 56 IMG4_API_AVAILABLE_20200508 57 OS_EXPORT 58 const img4_chip_t _img4_chip_ap_hybrid; 59 #define IMG4_CHIP_AP_HYBRID (&_img4_chip_ap_hybrid) 60 #else 61 #define IMG4_CHIP_AP_HYBRID (img4if->i4if_v7.chip_ap_hybrid) 62 #endif 63 64 /*! 65 * @const IMG4_CHIP_AP_REDUCED 66 * An Application Processor on an Apple ARM SoC operating in a reduced security 67 * configuration. 68 * 69 * This chip cannot be uniquely identified. 70 */ 71 #if !XNU_KERNEL_PRIVATE 72 IMG4_API_AVAILABLE_20200508 73 OS_EXPORT 74 const img4_chip_t _img4_chip_ap_reduced; 75 #define IMG4_CHIP_AP_REDUCED (&_img4_chip_ap_reduced) 76 #else 77 #define IMG4_CHIP_AP_REDUCED (img4if->i4if_v7.chip_ap_reduced) 78 #endif 79 80 /*! 81 * @const IMG4_CHIP_AP_PERMISSIVE 82 * An Application Processor on an Apple ARM SoC operating entirely within the 83 * user's authority. 84 * 85 * This chip's identity is rooted in a device-specific authority rather than one 86 * maintained by Apple. 87 */ 88 #if !XNU_KERNEL_PRIVATE 89 IMG4_API_AVAILABLE_20200508 90 OS_EXPORT 91 const img4_chip_t _img4_chip_ap_permissive; 92 #define IMG4_CHIP_AP_PERMISSIVE (&_img4_chip_ap_permissive) 93 #else 94 #define IMG4_CHIP_AP_PERMISSIVE (img4if->i4if_v8.chip_ap_permissive) 95 #endif 96 97 /*! 98 * @const IMG4_CHIP_AP_LOCAL_BLESSED 99 * An Application Processor on an Apple ARM SoC which is executing payloads from 100 * a future local policy that has not yet booted. 101 */ 102 #if !XNU_KERNEL_PRIVATE 103 IMG4_API_AVAILABLE_20220513 104 OS_EXPORT 105 const img4_chip_t _img4_chip_ap_local_blessed; 106 #define IMG4_CHIP_AP_LOCAL_BLESSED (&_img4_chip_ap_local_blessed) 107 #else 108 #define IMG4_CHIP_AP_LOCAL_BLESSED (img4if->i4if_v18.chip_ap_local_blessed) 109 #endif 110 111 /*! 112 * @const IMG4_CHIP_AP_HYBRID_MEDIUM 113 * An Intel x86 processor whose chain of trust is rooted in an instance of a 114 * {@link IMG4_CHIP_AP_SHA2_384} chip and is operating in a "medium security" 115 * mode due to a user-approved security degradation. 116 * 117 * This chip cannot be uniquely identified. 118 */ 119 #if !XNU_KERNEL_PRIVATE 120 IMG4_API_AVAILABLE_20200508 121 OS_EXPORT 122 const img4_chip_t _img4_chip_ap_hybrid_medium; 123 #define IMG4_CHIP_AP_HYBRID_MEDIUM (&_img4_chip_ap_hybrid_medium) 124 #else 125 #define IMG4_CHIP_AP_HYBRID_MEDIUM (img4if->i4if_v8.chip_ap_hybrid_medium) 126 #endif 127 128 /*! 129 * @const IMG4_CHIP_AP_HYBRID_RELAXED 130 * An Intel x86 processor whose chain of trust is rooted in an instance of a 131 * {@link IMG4_CHIP_AP_SHA2_384} chip and is operating with no secure boot 132 * due to a user-approved security degradation. 133 * 134 * This chip cannot be uniquely identified. 135 */ 136 #if !XNU_KERNEL_PRIVATE 137 IMG4_API_AVAILABLE_20200508 138 OS_EXPORT 139 const img4_chip_t _img4_chip_ap_hybrid_relaxed; 140 #define IMG4_CHIP_AP_HYBRID_RELAXED (&_img4_chip_ap_hybrid_relaxed) 141 #else 142 #define IMG4_CHIP_AP_HYBRID_RELAXED (img4if->i4if_v8.chip_ap_hybrid_relaxed) 143 #endif 144 145 /*! 146 * @const IMG4_CHIP_AP_INTRANSIGENT 147 * An Application Processor which is incapable of executing code. This chip 148 * environment's root of trust is a certificate authority which has never and 149 * will never issue any certificates. 150 */ 151 #if !XNU_KERNEL_PRIVATE 152 IMG4_API_AVAILABLE_20210113 153 OS_EXPORT 154 const img4_chip_t _img4_chip_ap_intransigent; 155 #define IMG4_CHIP_AP_INTRANSIGENT (&_img4_chip_ap_intransigent) 156 #else 157 #define IMG4_CHIP_AP_INTRANSIGENT (img4if->i4if_v11.chip_ap_intransigent) 158 #endif 159 160 /*! 161 * @const IMG4_CHIP_AP_SUPPLEMENTAL 162 * An Application Processor whose root of trust resides in the 163 * {@link IMG4_RUNTIME_OBJECT_SPEC_SUPPLEMENTAL_ROOT} object. Once the 164 * supplemental root object is executed on the host's AP, this chip environment 165 * is available to execute payloads. 166 */ 167 #if !XNU_KERNEL_PRIVATE 168 IMG4_API_AVAILABLE_20210113 169 OS_EXPORT 170 const img4_chip_t _img4_chip_ap_supplemental; 171 #define IMG4_CHIP_AP_SUPPLEMENTAL (&_img4_chip_ap_supplemental) 172 #else 173 #define IMG4_CHIP_AP_SUPPLEMENTAL (img4if->i4if_v11.chip_ap_supplemental) 174 #endif 175 176 /*! 177 * @const IMG4_CHIP_AP_VMA2 178 * The Application Processor of a virtualized Apple ARM device. 179 * 180 * This chip environment represents one unique instance of such a chip on the 181 * host device. 182 */ 183 #if !XNU_KERNEL_PRIVATE 184 IMG4_API_AVAILABLE_20210113 185 OS_EXPORT 186 const img4_chip_t _img4_chip_ap_vma2; 187 #define IMG4_CHIP_AP_VMA2 (&_img4_chip_ap_vma2) 188 #else 189 #define IMG4_CHIP_AP_VMA2 (img4if->i4if_v13.chip_ap_vma2) 190 #endif 191 192 /*! 193 * @const IMG4_CHIP_AP_VMA2_CLONE 194 * The Application Processor of a virtualized Apple ARM device which has been 195 * cloned from another on the same host. 196 * 197 * This chip environment cannot be uniquely identified. 198 */ 199 #if !XNU_KERNEL_PRIVATE 200 IMG4_API_AVAILABLE_20210113 201 OS_EXPORT 202 const img4_chip_t _img4_chip_ap_vma2_clone; 203 #define IMG4_CHIP_AP_VMA2_CLONE (&_img4_chip_ap_vma2_clone) 204 #else 205 #define IMG4_CHIP_AP_VMA2_CLONE (img4if->i4if_v13.chip_ap_vma2_clone) 206 #endif 207 208 OS_ASSUME_NONNULL_END 209 210 #endif // __IMG4_CHIP_AP_H 211