| 1 | /*! |
| 2 | * @header |
| 3 | * Cryptex1 chip environments. |
| 4 | */ |
| 5 | #ifndef __IMG4_CHIP_SEP_H |
| 6 | #define __IMG4_CHIP_SEP_H |
| 7 | |
| 8 | #ifndef __IMG4_INDIRECT |
| 9 | #error "Please #include <img4/firmware.h> instead of this file directly" |
| 10 | #endif // __IMG4_INDIRECT |
| 11 | |
| 12 | __BEGIN_DECLS |
| 13 | OS_ASSUME_NONNULL_BEGIN |
| 14 | OS_ASSUME_PTR_ABI_SINGLE_BEGIN |
| 15 | |
| 16 | /*! |
| 17 | * @const IMG4_CHIP_SEP_SHA1 |
| 18 | * The Secure Enclave Processor on an Apple ARM SoC with an embedded sha1 |
| 19 | * certifcate chain. |
| 20 | * |
| 21 | * This chip environment represents one unique instance of such a chip. |
| 22 | */ |
| 23 | #if !XNU_KERNEL_PRIVATE |
| 24 | IMG4_API_AVAILABLE_20211119 |
| 25 | OS_EXPORT |
| 26 | const img4_chip_t _img4_chip_sep_sha1; |
| 27 | #define IMG4_CHIP_SEP_SHA1 (&_img4_chip_sep_sha1) |
| 28 | #else |
| 29 | #define IMG4_CHIP_SEP_SHA1 (img4if->i4if_v16.chip_sep_sha1) |
| 30 | #endif |
| 31 | |
| 32 | /*! |
| 33 | * @const IMG4_CHIP_SEP_SHA2_384 |
| 34 | * The Secure Enclave Processor on an Apple ARM SoC with an embedded sha2-384 |
| 35 | * certifcate chain. |
| 36 | * |
| 37 | * This chip environment represents one unique instance of such a chip. |
| 38 | */ |
| 39 | #if !XNU_KERNEL_PRIVATE |
| 40 | IMG4_API_AVAILABLE_20211119 |
| 41 | OS_EXPORT |
| 42 | const img4_chip_t _img4_chip_sep_sha2_384; |
| 43 | #define IMG4_CHIP_SEP_SHA2_384 (&_img4_chip_sep_sha2_384) |
| 44 | #else |
| 45 | #define IMG4_CHIP_SEP_SHA2_384 (img4if->i4if_v16.chip_sep_sha2_384) |
| 46 | #endif |
| 47 | |
| 48 | OS_ASSUME_PTR_ABI_SINGLE_END |
| 49 | OS_ASSUME_NONNULL_END |
| 50 | __END_DECLS |
| 51 | |
| 52 | #endif // __IMG4_CHIP_SEP_H |
| 53 | |