OpenCore
1.0.4
OpenCore Bootloader
|
#include "BootManagementInternal.h"
#include <Guid/AppleBless.h>
#include <IndustryStandard/AppleDiskLabel.h>
#include <IndustryStandard/AppleIcon.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/OcDebugLogLib.h>
#include <Library/DevicePathLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcDevicePathLib.h>
#include <Library/OcFileLib.h>
#include <Library/OcStringLib.h>
#include <Library/OcXmlLib.h>
#include <Library/PrintLib.h>
#include <Library/UefiBootServicesTableLib.h>
Go to the source code of this file.
Functions | |
EFI_STATUS | InternalReadBootEntryFile (IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *FileSystem, IN CONST CHAR16 *DirectoryName, IN CONST CHAR16 *Filename, IN UINT32 MaxFileSize, IN UINT32 MinFileSize, OUT VOID **FileData, OUT UINT32 *DataSize OPTIONAL) |
CHAR16 * | InternalGetAppleDiskLabel (IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *FileSystem, IN CONST CHAR16 *BootDirectoryName, IN CONST CHAR16 *LabelFilename) |
CHAR8 * | InternalGetContentFlavour (IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *FileSystem, IN CONST CHAR16 *BootDirectoryName) |
STATIC EFI_STATUS | GetAppleVersionFromPlist (IN CHAR8 *SystemVersionData, IN UINT32 SystemVersionDataSize, OUT CHAR8 *AppleVersion) |
STATIC CHAR16 * | InternalGetAppleRecoveryName (IN CHAR8 *Version) |
STATIC EFI_STATUS | InternalGetAppleVersion (IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *FileSystem, IN CONST CHAR16 *DirectoryName, OUT CHAR8 *AppleVersion) |
EFI_STATUS | InternalGetRecoveryOsBooter (IN EFI_HANDLE Device, OUT EFI_DEVICE_PATH_PROTOCOL **FilePath, IN BOOLEAN Basic) |
EFI_STATUS EFIAPI | OcGetBootEntryLabelImage (IN OC_PICKER_CONTEXT *Context, IN OC_BOOT_ENTRY *BootEntry, IN UINT8 Scale, OUT VOID **ImageData, OUT UINT32 *DataLength) |
EFI_STATUS EFIAPI | OcGetBootEntryIcon (IN OC_PICKER_CONTEXT *Context, IN OC_BOOT_ENTRY *BootEntry, OUT VOID **ImageData, OUT UINT32 *DataLength) |
EFI_STATUS EFIAPI | InternalGetBootEntryFile (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN CONST CHAR16 *FileName, IN CONST CHAR16 *DebugBootEntryName, IN CONST CHAR8 *DebugFileType, IN UINT32 MaxFileSize, IN UINT32 MinFileSize, OUT VOID **FileData, OUT UINT32 *DataLength OPTIONAL, IN BOOLEAN SearchAtLeaf, IN BOOLEAN SearchAtRoot) |
EFI_STATUS EFIAPI | OcGetBootEntryFileFromDevicePath (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN CONST CHAR16 *FileName, IN CONST CHAR8 *DebugFileType, IN UINT32 MaxFileSize, IN UINT32 MinFileSize, OUT VOID **FileData, OUT UINT32 *DataLength OPTIONAL, IN BOOLEAN SearchAtLeaf, IN BOOLEAN SearchAtRoot) |
EFI_STATUS EFIAPI | OcGetBootEntryFile (IN OC_BOOT_ENTRY *BootEntry, IN CONST CHAR16 *FileName, IN CONST CHAR8 *DebugFileType, IN UINT32 MaxFileSize, IN UINT32 MinFileSize, OUT VOID **FileData, OUT UINT32 *DataLength OPTIONAL, IN BOOLEAN SearchAtLeaf, IN BOOLEAN SearchAtRoot) |
STATIC CHAR8 * | InternalAddAppleVersion (IN CHAR8 *Flavour, IN CHAR8 *Version) |
EFI_STATUS | InternalDescribeBootEntry (IN OC_BOOT_CONTEXT *BootContext, IN OUT OC_BOOT_ENTRY *BootEntry) |
Copyright (C) 2019, vit9696. All rights reserved.
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 BootEntryInfo.c.
STATIC EFI_STATUS GetAppleVersionFromPlist | ( | IN CHAR8 * | SystemVersionData, |
IN UINT32 | SystemVersionDataSize, | ||
OUT CHAR8 * | AppleVersion ) |
Definition at line 151 of file BootEntryInfo.c.
STATIC CHAR8 * InternalAddAppleVersion | ( | IN CHAR8 * | Flavour, |
IN CHAR8 * | Version ) |
Definition at line 628 of file BootEntryInfo.c.
EFI_STATUS InternalDescribeBootEntry | ( | IN OC_BOOT_CONTEXT * | BootContext, |
IN OUT OC_BOOT_ENTRY * | BootEntry ) |
Describe boot entry contents by setting fields other than DevicePath.
[in] | BootContext | Boot context. |
[in,out] | BootEntry | Located boot entry. |
EFI_SUCCESS | The entry point is described successfully. |
Definition at line 692 of file BootEntryInfo.c.
CHAR16 * InternalGetAppleDiskLabel | ( | IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL * | FileSystem, |
IN CONST CHAR16 * | BootDirectoryName, | ||
IN CONST CHAR16 * | LabelFilename ) |
Definition at line 86 of file BootEntryInfo.c.
STATIC CHAR16 * InternalGetAppleRecoveryName | ( | IN CHAR8 * | Version | ) |
Definition at line 209 of file BootEntryInfo.c.
STATIC EFI_STATUS InternalGetAppleVersion | ( | IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL * | FileSystem, |
IN CONST CHAR16 * | DirectoryName, | ||
OUT CHAR8 * | AppleVersion ) |
Definition at line 232 of file BootEntryInfo.c.
EFI_STATUS EFIAPI InternalGetBootEntryFile | ( | IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath, |
IN CONST CHAR16 * | FileName, | ||
IN CONST CHAR16 * | DebugBootEntryName, | ||
IN CONST CHAR8 * | DebugFileType, | ||
IN UINT32 | MaxFileSize, | ||
IN UINT32 | MinFileSize, | ||
OUT VOID ** | FileData, | ||
OUT UINT32 *DataLength | OPTIONAL, | ||
IN BOOLEAN | SearchAtLeaf, | ||
IN BOOLEAN | SearchAtRoot ) |
Definition at line 443 of file BootEntryInfo.c.
CHAR8 * InternalGetContentFlavour | ( | IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL * | FileSystem, |
IN CONST CHAR16 * | BootDirectoryName ) |
Definition at line 122 of file BootEntryInfo.c.
EFI_STATUS InternalGetRecoveryOsBooter | ( | IN EFI_HANDLE | Device, |
OUT EFI_DEVICE_PATH_PROTOCOL ** | FilePath, | ||
IN BOOLEAN | Basic ) |
Definition at line 263 of file BootEntryInfo.c.
EFI_STATUS InternalReadBootEntryFile | ( | IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL * | FileSystem, |
IN CONST CHAR16 * | DirectoryName, | ||
IN CONST CHAR16 * | Filename, | ||
IN UINT32 | MaxFileSize, | ||
IN UINT32 | MinFileSize, | ||
OUT VOID ** | FileData, | ||
OUT UINT32 *DataSize | OPTIONAL ) |
Definition at line 34 of file BootEntryInfo.c.
EFI_STATUS EFIAPI OcGetBootEntryFile | ( | IN OC_BOOT_ENTRY * | BootEntry, |
IN CONST CHAR16 * | FileName, | ||
IN CONST CHAR8 * | DebugFileType, | ||
IN UINT32 | MaxFileSize, | ||
IN UINT32 | MinFileSize, | ||
OUT VOID ** | FileData, | ||
OUT UINT32 *DataLength | OPTIONAL, | ||
IN BOOLEAN | SearchAtLeaf, | ||
IN BOOLEAN | SearchAtRoot ) |
Read boot entry meta-data file. Validates that boot entry is external tool or OS type.
[in] | BootEntry | Boot entry. |
[in] | FileName | File name to search for. |
[in] | DebugFileType | Brief description of file for use in debug messages. |
[in] | MaxFileSize | Maximum allowed file size (inclusive). |
[in] | MinFileSize | Minimum allowed file size (inclusive). |
[out] | FileData | Returned file data. |
[out] | DataLength | Returned data length. |
[in] | SearchAtLeaf | Search next to boot file (or in boot folder) first. |
[in] | SearchAtRoot | After SearchAtLeaf (if specified), search at OC-specific GUID sub-folder location (if present), then at FS root. |
EFI_SUCCESS | Boot entry was correct type, file was located, validated against allowed length, and returned. |
other | Boot entry was incorrect type, or file could not be located, or had invalid length. |
Definition at line 593 of file BootEntryInfo.c.
EFI_STATUS EFIAPI OcGetBootEntryFileFromDevicePath | ( | IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath, |
IN CONST CHAR16 * | FileName, | ||
IN CONST CHAR8 * | DebugFileType, | ||
IN UINT32 | MaxFileSize, | ||
IN UINT32 | MinFileSize, | ||
OUT VOID ** | FileData, | ||
OUT UINT32 *DataLength | OPTIONAL, | ||
IN BOOLEAN | SearchAtLeaf, | ||
IN BOOLEAN | SearchAtRoot ) |
Read boot entry meta-data file from boot entry device path. May be used before before OC_BOOT_ENTRY struct is created.
[in] | DevicePath | Boot entry device path. |
[in] | FileName | File name to search for. |
[in] | DebugFileType | Brief description of file for use in debug messages. |
[in] | MaxFileSize | Maximum allowed file size (inclusive). |
[in] | MinFileSize | Minimum allowed file size (inclusive). |
[out] | FileData | Returned file data. |
[out] | DataLength | Returned data length. |
[in] | SearchAtLeaf | Search next to boot file (or in boot folder) first. |
[in] | SearchAtRoot | After SearchAtLeaf (if specified), search at OC-specific GUID sub-folder location (if present), then at FS root. |
EFI_SUCCESS | File was located, validated against allowed length, and returned. |
other | File could not be located, or had invalid length. |
Definition at line 565 of file BootEntryInfo.c.
EFI_STATUS EFIAPI OcGetBootEntryIcon | ( | IN OC_PICKER_CONTEXT * | Context, |
IN OC_BOOT_ENTRY * | BootEntry, | ||
OUT VOID ** | ImageData, | ||
OUT UINT32 * | DataLength ) |
Get '.VolumeIcon.icns' file contents, if exists.
[in] | BootEntry | Located boot entry. |
[out] | ImageData | File contents. |
[out] | DataLength | File length. |
EFI_SUCCESS | The file was read successfully. |
Definition at line 420 of file BootEntryInfo.c.
EFI_STATUS EFIAPI OcGetBootEntryLabelImage | ( | IN OC_PICKER_CONTEXT * | Context, |
IN OC_BOOT_ENTRY * | BootEntry, | ||
IN UINT8 | Scale, | ||
OUT VOID ** | ImageData, | ||
OUT UINT32 * | DataLength ) |
Get '.disk_label' or '.disk_label_2x' file contents, if exists.
[in] | BootEntry | Located boot entry. |
[in] | Scale | User interface scale. |
[out] | ImageData | File contents. |
[out] | DataLength | File length. |
EFI_SUCCESS | The file was read successfully. |
Definition at line 396 of file BootEntryInfo.c.