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

Go to the source code of this file.

Data Structures

struct  APPLE_DISK_IMAGE_PROTOCOL
 

Macros

#define APPLE_DISK_IMAGE_PROTOCOL_GUID
 
#define APPLE_DISK_IMAGE_PROTOCOL_REVISION   2
 

Typedefs

typedef EFI_STATUS(EFIAPI * APPLE_DISK_IMAGE_SUPPORTED) (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
typedef EFI_STATUS(EFIAPI * APPLE_DISK_IMAGE_MOUNT_IMAGE) (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT EFI_HANDLE *Handle OPTIONAL)
 
typedef EFI_STATUS(EFIAPI * APPLE_DISK_IMAGE_UNMOUNT_IMAGE) (IN EFI_HANDLE Handle)
 

Variables

EFI_GUID gAppleDiskImageProtocolGuid
 

Detailed Description

Apple Disk Image 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 AppleDiskImage.h.

Macro Definition Documentation

◆ APPLE_DISK_IMAGE_PROTOCOL_GUID

#define APPLE_DISK_IMAGE_PROTOCOL_GUID
Value:
{ 0x004B07E8, 0x0B9C, 0x427E, \
{ 0xB0, 0xD4, 0xA4, 0x66, 0xE6, 0xE5, 0x7A, 0x62 } }

Apple Disk Image protocol GUID. 004B07E8-0B9C-427E-B0D4-A466E6E57A62

Definition at line 22 of file AppleDiskImage.h.

◆ APPLE_DISK_IMAGE_PROTOCOL_REVISION

#define APPLE_DISK_IMAGE_PROTOCOL_REVISION   2

Apple Disk Image protocol revision.

Definition at line 29 of file AppleDiskImage.h.

Typedef Documentation

◆ APPLE_DISK_IMAGE_MOUNT_IMAGE

typedef EFI_STATUS(EFIAPI * APPLE_DISK_IMAGE_MOUNT_IMAGE) (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT EFI_HANDLE *Handle OPTIONAL)

Mounts dmg file at DevicePath providing relevant protocols:

  • gEfiDevicePathProtocolGuid
  • gEfiBlockIoProtocolGuid
  • gTDMApprovedGuid
  • gAppleDiskImageProtocolGuid (as NULL) Mounted dmg handle is to be connnected recursively on all protocols with connection status unchecked.

Note, that DiskImage protocol does not protect DMG memory from the kernel. It only works in UEFI scope. For the kernel to boot the parent protocol, namely RamDisk, should have us covered by allocating DMG extent memory as wired (EfiACPIMemoryNVS).

Parameters
[in]DevicePathPath to dmg file.
[out]HandleDmg handle.
Return values
EFI_SUCCESSDmg was mounted with relevant protocols.
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 73 of file AppleDiskImage.h.

◆ APPLE_DISK_IMAGE_SUPPORTED

typedef EFI_STATUS(EFIAPI * APPLE_DISK_IMAGE_SUPPORTED) (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)

Checks whether dmg file at DevicePath is valid. Essentially this is done by verifying last 512 bytes of the file.

Parameters
[in]DevicePathPath to dmg file.
Return values
EFI_SUCCESSDmg looks valid and can be loaded.
EFI_UNSUPPORTEDDmg is unsupported.
EFI_NOT_FOUNDDmg was not found at this device path.
EFI_OUT_OF_RESOURCESMemory allocation error happened.

Definition at line 44 of file AppleDiskImage.h.

◆ APPLE_DISK_IMAGE_UNMOUNT_IMAGE

typedef EFI_STATUS(EFIAPI * APPLE_DISK_IMAGE_UNMOUNT_IMAGE) (IN EFI_HANDLE Handle)

Unmounts dmg file at handle and uninstalls the following protocols:

  • gEfiDevicePathProtocolGuid
  • gEfiBlockIoProtocolGuid
  • gAppleDiskImageProtocolGuid All the resources consumed by the dmg will be freed.
Parameters
[in]HandleDmg handle.
Return values
EFI_SUCCESSDmg was unmounted with relevant protocols.
EFI_INVALID_PARAMETERDmg handle is not valid.
EFI_NOT_FOUNDRelevant protocols were not found.

Definition at line 93 of file AppleDiskImage.h.

Variable Documentation

◆ gAppleDiskImageProtocolGuid

EFI_GUID gAppleDiskImageProtocolGuid
extern