OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
AppleSecureBoot.h
Go to the documentation of this file.
1
16#ifndef APPLE_SECURE_BOOT_H
17#define APPLE_SECURE_BOOT_H
18
19#define APPLE_SECURE_BOOT_PROTOCOL_REVISION 4U
20
21#define APPLE_SECURE_BOOT_PROTOCOL_GUID \
22 { 0x24B73556, 0x2197, 0x4702, \
23 { 0x82, 0xA8, 0x3E, 0x13, 0x37, 0xDA, 0xFB, 0xF2 } }
24
26
27#define APPLE_SB_OBJ_TYPE(A, B, C, D) \
28 (UINT32)( \
29 ((A) << 24UL) \
30 | ((B) << 16UL) \
31 | ((C) << 8UL) \
32 | ((D) << 0UL) \
33 )
34
35//
36// The keys are iterated in the order in which they are defined here in
37// AppleBds to validate any loaded image.
38//
39#define APPLE_SB_OBJ_EFIBOOT APPLE_SB_OBJ_TYPE ('e', 'f', 'i', 'b')
40#define APPLE_SB_OBJ_EFIBOOT_DEBUG APPLE_SB_OBJ_TYPE ('e', 'f', 'b', 'd')
41#define APPLE_SB_OBJ_EFIBOOT_BASE APPLE_SB_OBJ_TYPE ('e', 'f', 'b', 'b')
42
43#define APPLE_SB_OBJ_MUPD APPLE_SB_OBJ_TYPE ('m', 'u', 'p', 'd')
44#define APPLE_SB_OBJ_HPMU APPLE_SB_OBJ_TYPE ('h', 'p', 'm', 'u')
45#define APPLE_SB_OBJ_THOU APPLE_SB_OBJ_TYPE ('t', 'h', 'o', 'u')
46#define APPLE_SB_OBJ_GPUU APPLE_SB_OBJ_TYPE ('g', 'p', 'u', 'u')
47#define APPLE_SB_OBJ_ETHU APPLE_SB_OBJ_TYPE ('e', 't', 'h', 'u')
48#define APPLE_SB_OBJ_SDFU APPLE_SB_OBJ_TYPE ('s', 'd', 'f', 'u')
49#define APPLE_SB_OBJ_DTHU APPLE_SB_OBJ_TYPE ('d', 't', 'h', 'u')
50
51//
52// The keys are iterated in the order in which they are defined here in
53// boot.efi to validate the loaded kernel image.
54//
55#define APPLE_SB_OBJ_KERNEL APPLE_SB_OBJ_TYPE ('m', 'k', 'r', 'n')
56#define APPLE_SB_OBJ_KERNEL_DEBUG APPLE_SB_OBJ_TYPE ('m', 'k', 'r', 'd')
57
65typedef
66VOID
69 IN BOOLEAN Available
70 );
71
92typedef
93EFI_STATUS
96 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
97 IN UINT32 ObjType,
98 IN BOOLEAN SetFailureReason
99 );
100
121typedef
122EFI_STATUS
123(EFIAPI *APPLE_SB_VERIFY_IMG4)(
125 IN CONST VOID *ImageBuffer,
126 IN UINTN ImageSize,
127 IN CONST VOID *ManifestBuffer,
128 IN UINTN ManifestSize,
129 IN UINT32 ObjType,
130 IN BOOLEAN SetFailureReason
131 );
132
144typedef
145EFI_STATUS
146(EFIAPI *APPLE_SB_GET_POLICY)(
148 OUT UINT8 *Policy
149 );
150
161typedef
162EFI_STATUS
165 OUT UINT8 *Reason
166 );
167
178typedef
179EFI_STATUS
182 IN UINT8 Reason
183 );
184
195typedef
196EFI_STATUS
199 OUT UINT8 *Reason
200 );
201
212typedef
213EFI_STATUS
216 IN UINT8 Reason
217 );
218
238typedef
239EFI_STATUS
242 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
243 IN BOOLEAN SetFailureReason
244 );
245
263typedef
264EFI_STATUS
267 IN CONST VOID *ImageBuffer,
268 IN UINTN ImageSize,
269 IN BOOLEAN SetFailureReason
270 );
271
283typedef
284EFI_STATUS
287 OUT UINT8 *Policy
288 );
289
300typedef
301EFI_STATUS
304 OUT UINT8 *Reason
305 );
306
317typedef
318EFI_STATUS
321 IN UINT8 Reason
322 );
323
340
341extern EFI_GUID gAppleSecureBootProtocolGuid;
342
343#endif // APPLE_SECURE_BOOT_H
VOID(EFIAPI * APPLE_SB_SET_AVAILABILITY)(IN APPLE_SECURE_BOOT_PROTOCOL *This, IN BOOLEAN Available)
EFI_STATUS(EFIAPI * APPLE_SB_VERIFY_WINDOWS)(IN APPLE_SECURE_BOOT_PROTOCOL *This, IN CONST VOID *ImageBuffer, IN UINTN ImageSize, IN BOOLEAN SetFailureReason)
EFI_STATUS(EFIAPI * APPLE_SB_VERIFY_IMG4)(IN APPLE_SECURE_BOOT_PROTOCOL *This, IN CONST VOID *ImageBuffer, IN UINTN ImageSize, IN CONST VOID *ManifestBuffer, IN UINTN ManifestSize, IN UINT32 ObjType, IN BOOLEAN SetFailureReason)
EFI_STATUS(EFIAPI * APPLE_SB_VERIFY_WINDOWS_BY_PATH)(IN APPLE_SECURE_BOOT_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN BOOLEAN SetFailureReason)
EFI_STATUS(EFIAPI * APPLE_SB_SET_FAILURE_REASON)(IN APPLE_SECURE_BOOT_PROTOCOL *This, IN UINT8 Reason)
EFI_STATUS(EFIAPI * APPLE_SB_GET_WINDOWS_FAILURE_REASON)(IN APPLE_SECURE_BOOT_PROTOCOL *This, OUT UINT8 *Reason)
EFI_STATUS(EFIAPI * APPLE_SB_GET_POLICY)(IN APPLE_SECURE_BOOT_PROTOCOL *This, OUT UINT8 *Policy)
EFI_GUID gAppleSecureBootProtocolGuid
EFI_STATUS(EFIAPI * APPLE_SB_GET_KERNEL_FAILURE_REASON)(IN APPLE_SECURE_BOOT_PROTOCOL *This, OUT UINT8 *Reason)
EFI_STATUS(EFIAPI * APPLE_SB_SET_KERNEL_FAILURE_REASON)(IN APPLE_SECURE_BOOT_PROTOCOL *This, IN UINT8 Reason)
EFI_STATUS(EFIAPI * APPLE_SB_GET_FAILURE_REASON)(IN APPLE_SECURE_BOOT_PROTOCOL *This, OUT UINT8 *Reason)
EFI_STATUS(EFIAPI * APPLE_SB_SET_WINDOWS_FAILURE_REASON)(IN APPLE_SECURE_BOOT_PROTOCOL *This, IN UINT8 Reason)
EFI_STATUS(EFIAPI * APPLE_SB_GET_WINDOWS_POLICY)(IN APPLE_SECURE_BOOT_PROTOCOL *This, OUT UINT8 *Policy)
EFI_STATUS(EFIAPI * APPLE_SB_VERIFY_IMG4_BY_PATH)(IN APPLE_SECURE_BOOT_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN UINT32 ObjType, IN BOOLEAN SetFailureReason)
APPLE_SB_VERIFY_WINDOWS VerifyWindows
APPLE_SB_GET_FAILURE_REASON GetFailureReason
APPLE_SB_VERIFY_IMG4_BY_PATH VerifyImg4ByPath
APPLE_SB_GET_POLICY GetPolicy
APPLE_SB_VERIFY_WINDOWS_BY_PATH VerifyWindowsByPath
APPLE_SB_SET_KERNEL_FAILURE_REASON SetKernelFailureReason
APPLE_SB_GET_WINDOWS_FAILURE_REASON GetWindowsFailureReason
APPLE_SB_SET_WINDOWS_FAILURE_REASON SetWindowsFailureReason
APPLE_SB_GET_WINDOWS_POLICY GetWindowsPolicy
APPLE_SB_GET_KERNEL_FAILURE_REASON GetKernelFailureReason
APPLE_SB_SET_FAILURE_REASON SetFailureReason
APPLE_SB_VERIFY_IMG4 VerifyImg4
APPLE_SB_SET_AVAILABILITY SetAvailability