OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
AppleDmgBoot.h File Reference

Go to the source code of this file.

Data Structures

struct  APPLE_DMG_BOOT_PROTOCOL_
 

Macros

#define APPLE_FAILED_BOOT_POLICY_VARIABLE   L"AppleFailedBootPolicy"
 
#define APPLE_FAILED_BOOT_VOLUME_UUID_VARIABLE   L"AppleFailedBootVolumeUUID"
 
#define APPLE_RECOVERY_BOOT_NETWORK_GUID
 
#define APPLE_RECOVERY_BOOT_DISK_GUID
 
#define APPLE_DMG_BOOT_PROTOCOL_GUID
 
#define APPLE_DMG_BOOT_PROTOCOL_REVISION   0x20000
 

Typedefs

typedef struct APPLE_DMG_BOOT_PROTOCOL_ APPLE_DMG_BOOT_PROTOCOL
 
typedef VOID(EFIAPI * APPLE_DMG_BOOT_DEBUG_PRINT) (IN UINTN ErrorLevel, IN CONST CHAR8 *Format,...)
 
typedef VOID(EFIAPI * APPLE_DMG_BOOT_CALLBACK) (IN VOID *Context)
 
typedef EFI_STATUS(EFIAPI * APPLE_DMG_BOOT_VERIFIED_BOOT) (IN APPLE_DMG_BOOT_PROTOCOL *This, IN EFI_HANDLE ParentImageHandle, IN CONST CHAR16 *BaseDmgPath, IN APPLE_DMG_BOOT_CALLBACK PreStartCallback OPTIONAL, IN APPLE_DMG_BOOT_CALLBACK PostStartCallback OPTIONAL, IN VOID *CallbackContext OPTIONAL, IN APPLE_DMG_BOOT_DEBUG_PRINT DebugPrintFunction OPTIONAL)
 
typedef EFI_STATUS(EFIAPI * APPLE_DMG_BOOT_UNVERIFIED_BOOT) (IN APPLE_DMG_BOOT_PROTOCOL *This, IN EFI_HANDLE ParentImageHandle, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN APPLE_DMG_BOOT_CALLBACK PreStartCallback OPTIONAL, IN APPLE_DMG_BOOT_CALLBACK PostStartCallback OPTIONAL, IN VOID *CallbackContext OPTIONAL, IN APPLE_DMG_BOOT_DEBUG_PRINT DebugPrintFunction OPTIONAL)
 
typedef EFI_STATUS(EFIAPI * APPLE_DMG_BOOT_SET_MODE) (IN APPLE_DMG_BOOT_PROTOCOL *This, IN APPLE_DMG_BOOT_MODE Mode)
 

Enumerations

enum  APPLE_DMG_BOOT_MODE { RecoveryModeDefault , RecoveryModeDisk , RecoveryModeNetwork }
 

Variables

EFI_GUID gAppleDiskImageProtocolGuid
 
EFI_GUID gAppleRecoveryBootNetworkGuid
 
EFI_GUID gAppleRecoveryBootDiskGuid
 

Detailed Description

Apple Dmg Boot protocol.

Copyright (C) 2019, vit9696. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file AppleDmgBoot.h.

Macro Definition Documentation

◆ APPLE_DMG_BOOT_PROTOCOL_GUID

#define APPLE_DMG_BOOT_PROTOCOL_GUID
Value:
{ 0x85290934, 0x28DC, 0x4DF5, \
{ 0x91, 0x9A, 0x60, 0xE2, 0x8B, 0x1B, 0x94, 0x49 } }

Apple DMG boot protocol GUID. 85290934-28DC-4DF5-919A-60E28B1B9449

Definition at line 57 of file AppleDmgBoot.h.

◆ APPLE_DMG_BOOT_PROTOCOL_REVISION

#define APPLE_DMG_BOOT_PROTOCOL_REVISION   0x20000

Apple DMG boot protocol revision.

Definition at line 64 of file AppleDmgBoot.h.

◆ APPLE_FAILED_BOOT_POLICY_VARIABLE

#define APPLE_FAILED_BOOT_POLICY_VARIABLE   L"AppleFailedBootPolicy"

Relevant SMC keys used for debugging and T2 reporting: EFMU - Event Failed Mount UUID: boot volume UUID (network / disk / real). EFMV - Event Failed Mount Bridge Version GUID: from BridgeVersion.bin. EFMS - Event Failed Mount Status: 0 on failure EFBS - Event Failed Boot Policy: read from T2. TODO: Explore & Describe them properly. Failed boot poolicy variable in gAppleStartupManagerVariableGuid.

Definition at line 30 of file AppleDmgBoot.h.

◆ APPLE_FAILED_BOOT_VOLUME_UUID_VARIABLE

#define APPLE_FAILED_BOOT_VOLUME_UUID_VARIABLE   L"AppleFailedBootVolumeUUID"

Failed boot volume variable in gAppleStartupManagerVariableGuid (equal to EFMU).

Definition at line 35 of file AppleDmgBoot.h.

◆ APPLE_RECOVERY_BOOT_DISK_GUID

#define APPLE_RECOVERY_BOOT_DISK_GUID
Value:
{ 0xAF677042, 0x9346, 0x11E7, \
{ 0x9F, 0x13, 0x72, 0x00, 0x00, 0x2B, 0xCC, 0x50 } }

Set into EFMU / AppleFailedBootVolumeUUID for cmd-R AF677042-9346-11E7-9F13-7200002BCC50

Definition at line 49 of file AppleDmgBoot.h.

◆ APPLE_RECOVERY_BOOT_NETWORK_GUID

#define APPLE_RECOVERY_BOOT_NETWORK_GUID
Value:
{ 0x68D7AFF4, 0x8079, 0x4281, \
{ 0x9A, 0x1E, 0xA0, 0x4A, 0x51, 0xFB, 0x12, 0xE0 } }

Set into EFMU / AppleFailedBootVolumeUUID for cmd-opt-R 68D7AFF4-8079-4281-9A1E-A04A51FB12E0

Definition at line 41 of file AppleDmgBoot.h.

Typedef Documentation

◆ APPLE_DMG_BOOT_CALLBACK

typedef VOID(EFIAPI * APPLE_DMG_BOOT_CALLBACK) (IN VOID *Context)

Callback type used for prestart and poststart invocation.

Parameters
ContextOpaque context.

Definition at line 91 of file AppleDmgBoot.h.

◆ APPLE_DMG_BOOT_DEBUG_PRINT

typedef VOID(EFIAPI * APPLE_DMG_BOOT_DEBUG_PRINT) (IN UINTN ErrorLevel, IN CONST CHAR8 *Format,...)

Prints a debug message to the debug output device at the specified error level.

Parameters
ErrorLevelThe error level of the debug message.
FormatFormat string for the debug message to print.

Definition at line 78 of file AppleDmgBoot.h.

◆ APPLE_DMG_BOOT_PROTOCOL

Apple DMG boot protocol forward declaration.

Definition at line 69 of file AppleDmgBoot.h.

◆ APPLE_DMG_BOOT_SET_MODE

typedef EFI_STATUS(EFIAPI * APPLE_DMG_BOOT_SET_MODE) (IN APPLE_DMG_BOOT_PROTOCOL *This, IN APPLE_DMG_BOOT_MODE Mode)

Sets dmg boot mode for the dmg. When non default mode is set, boot failure will get APPLE_RECOVERY_BOOT_DISK_GUID or APPLE_RECOVERY_BOOT_DISK_GUID insted of UUID obtained from device path.

Parameters
[in]ThisInstance of this protocol.
[in]ModeDesired boot mode.
Return values
EFI_SUCCESSBoot mode was set.
EFI_INVALID_PARAMETERBoot mode is unsupported.

Definition at line 183 of file AppleDmgBoot.h.

◆ APPLE_DMG_BOOT_UNVERIFIED_BOOT

typedef EFI_STATUS(EFIAPI * APPLE_DMG_BOOT_UNVERIFIED_BOOT) (IN APPLE_DMG_BOOT_PROTOCOL *This, IN EFI_HANDLE ParentImageHandle, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN APPLE_DMG_BOOT_CALLBACK PreStartCallback OPTIONAL, IN APPLE_DMG_BOOT_CALLBACK PostStartCallback OPTIONAL, IN VOID *CallbackContext OPTIONAL, IN APPLE_DMG_BOOT_DEBUG_PRINT DebugPrintFunction OPTIONAL)

Boot from specified dmg without any kind of verification (including chunklist).

Parameters
[in]ThisInstance of this protocol.
[in]ParentImageHandleParent handle to boot from.
[in]DevicePathPath to dmg file.
[in]PreStartCallbackCallback invoked prior to starting booter.
[in]PostStartCallbackCallback invoked after starting booter.
[in]CallbackContextCallback context for PreStartCallback and PostStartCallback.
[in]DebugPrintFunctionDebug printing function, builtin is used if NULL.
Return values
EFI_SUCCESSDmg booted and returned success.
EFI_INVALID_PARAMETERParentImageHandle or DevicePath are NULL.
EFI_INVALID_PARAMETERDmg is not valid.
EFI_UNSUPPORTEDDmg is less than 512 bytes.
EFI_NOT_FOUNDDmg was not found at this device path.
EFI_OUT_OF_RESOURCESMemory allocation error happened.

Definition at line 150 of file AppleDmgBoot.h.

◆ APPLE_DMG_BOOT_VERIFIED_BOOT

typedef EFI_STATUS(EFIAPI * APPLE_DMG_BOOT_VERIFIED_BOOT) (IN APPLE_DMG_BOOT_PROTOCOL *This, IN EFI_HANDLE ParentImageHandle, IN CONST CHAR16 *BaseDmgPath, IN APPLE_DMG_BOOT_CALLBACK PreStartCallback OPTIONAL, IN APPLE_DMG_BOOT_CALLBACK PostStartCallback OPTIONAL, IN VOID *CallbackContext OPTIONAL, IN APPLE_DMG_BOOT_DEBUG_PRINT DebugPrintFunction OPTIONAL)

Boot from specified dmg with full chunklist verification. Dmg is located by replacing appending L"dmg". Chunklist is located by replacing appending L"chunklist". After verificaction completion a RamDisk is created with a SingleFile dmg file on it and UnverifiedBoot is called.

Parameters
[in]ThisInstance of this protocol.
[in]ParentImageHandleParent handle to boot from (local filesystem handle).
[in]BaseDmgPathPath to dmg file without dmg suffix (e.g. L"\\BaseSystem.").
[in]PreStartCallbackCallback invoked prior to starting booter.
[in]PostStartCallbackCallback invoked after starting booter.
[in]CallbackContextCallback context for PreStartCallback and PostStartCallback.
[in]DebugPrintFunctionDebug printing function, builtin is used if NULL.
Return values
EFI_SUCCESSDmg booted and returned success.
EFI_INVALID_PARAMETERParentImageHandle or DevicePath are NULL.
EFI_INVALID_PARAMETERDmg is not valid.
EFI_UNSUPPORTEDDmg is less than 512 bytes.
EFI_NOT_FOUNDDmg was not found at this device path.
EFI_OUT_OF_RESOURCESMemory allocation error happened.
EFI_ACCESS_DENIEDSecurity violation.

Definition at line 120 of file AppleDmgBoot.h.

Enumeration Type Documentation

◆ APPLE_DMG_BOOT_MODE

Dmg boot mode.

Enumerator
RecoveryModeDefault 
RecoveryModeDisk 
RecoveryModeNetwork 

Definition at line 164 of file AppleDmgBoot.h.

Variable Documentation

◆ gAppleDiskImageProtocolGuid

EFI_GUID gAppleDiskImageProtocolGuid
extern

◆ gAppleRecoveryBootDiskGuid

EFI_GUID gAppleRecoveryBootDiskGuid
extern

◆ gAppleRecoveryBootNetworkGuid

EFI_GUID gAppleRecoveryBootNetworkGuid
extern