3 * Interfaces for manipulating Image4 firmware images.
8 #ifndef __IMG4_INDIRECT
9 #error "Please #include <img4/firmware.h> instead of this file directly"
10 #endif // __IMG4_INDIRECT
16 OS_ASSUME_NONNULL_BEGIN
19 * @function img4_image_get_bytes
20 * Returns the authenticated payload from an Image4 image.
26 * A buffer which describes the authenticated payload.
28 #if !XNU_KERNEL_PRIVATE
29 IMG4_API_AVAILABLE_20200508
30 OS_EXPORT OS_WARN_RESULT OS_NONNULL1
32 img4_image_get_bytes(img4_image_t image
);
34 #define img4_image_get_bytes(...) (img4if->i4if_v7.image_get_bytes(__VA_ARGS__))
38 * @function img4_image_get_property_bool
39 * Retrieves the Boolean value for the requested image property.
45 * The 4cc of the desired image property.
48 * A pointer to storage for a Boolean value.
51 * If the property is present for the image, a pointer to the storage provided
52 * in {@link storage}. If the property is not present in the image or its value
53 * is not a Boolean, NULL is returned.
56 * If the property is present for the image, a pointer to the storage provided
57 * in {@link storage}. If the property is not present in the image or its value
58 * is not a Boolean, NULL is returned.
60 #if !XNU_KERNEL_PRIVATE
61 IMG4_API_AVAILABLE_20200508
62 OS_EXPORT OS_WARN_RESULT OS_NONNULL1 OS_NONNULL3
64 img4_image_get_property_bool(img4_image_t image
,
68 #define img4_image_get_property_bool(...) \
69 (img4if->i4if_v7.image_get_property_bool(__VA_ARGS__))
73 * @function img4_image_get_property_uint32
74 * Retrieves the unsigned 32-bit integer value for the requested image property.
80 * The 4cc of the desired image property.
83 * A pointer to storage for a 32-bit unsigned integer value.
86 * If the property is present for the image, a pointer to the storage provided
87 * in {@link storage}. If the property is not present in the image or its value
88 * is not an unsigned 32-bit integer, NULL is returned.
90 #if !XNU_KERNEL_PRIVATE
91 IMG4_API_AVAILABLE_20200508
92 OS_EXPORT OS_WARN_RESULT OS_NONNULL1 OS_NONNULL3
94 img4_image_get_property_uint32(img4_image_t image
,
98 #define img4_image_get_property_uint32(...) \
99 (img4if->i4if_v7.image_get_property_uint32(__VA_ARGS__))
103 * @function img4_image_get_property_uint64
104 * Retrieves the unsigned 64-bit integer value for the requested image property.
107 * The image to query.
110 * The 4cc of the desired image property.
113 * A pointer to storage for a 64-bit unsigned integer value.
116 * If the property is present for the image, a pointer to the storage provided
117 * in {@link storage}. If the property is not present in the image or its value
118 * is not an unsigned 64-bit integer, NULL is returned.
120 #if !XNU_KERNEL_PRIVATE
121 IMG4_API_AVAILABLE_20200508
122 OS_EXPORT OS_WARN_RESULT OS_NONNULL1 OS_NONNULL3
124 img4_image_get_property_uint64(img4_image_t image
,
128 #define img4_image_get_property_uint64(...) \
129 (img4if->i4if_v7.image_get_property_uint64(__VA_ARGS__))
133 * @function img4_image_get_property_data
134 * Retrieves the buffer value for the requested image property.
137 * The image to query.
140 * The 4cc of the desired image property.
143 * A pointer to storage for a buffer value.
146 * If the property is present for the image, a pointer to the storage provided
147 * in {@link storage}. If the property is not present in the image or its value
148 * is not a data, NULL is returned.
150 #if !XNU_KERNEL_PRIVATE
151 IMG4_API_AVAILABLE_20200508
152 OS_EXPORT OS_WARN_RESULT OS_NONNULL1 OS_NONNULL3
154 img4_image_get_property_data(img4_image_t image
,
156 img4_buff_t
*storage
);
158 #define img4_image_get_property_data(...) \
159 (img4if->i4if_v7.image_get_property_data(__VA_ARGS__))
162 OS_ASSUME_NONNULL_END
164 #endif // __IMG4_IMAGE_H