#include "BootManagementInternal.h"
#include <Guid/AppleFile.h>
#include <Guid/AppleVariable.h>
#include <Guid/OcVariable.h>
#include <IndustryStandard/AppleCsrConfig.h>
#include <Protocol/AppleBeepGen.h>
#include <Protocol/AppleBootPolicy.h>
#include <Protocol/AppleKeyMapAggregator.h>
#include <Protocol/AppleUserInterface.h>
#include <Protocol/LoadedImage.h>
#include <Protocol/OcAudio.h>
#include <Protocol/SimpleTextOut.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseOverflowLib.h>
#include <Library/OcConsoleLib.h>
#include <Library/OcCryptoLib.h>
#include <Library/OcDebugLogLib.h>
#include <Library/DevicePathLib.h>
#include <Library/OcTimerLib.h>
#include <Library/OcTypingLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcAppleKeyMapLib.h>
#include <Library/OcBootManagementLib.h>
#include <Library/OcDevicePathLib.h>
#include <Library/OcFileLib.h>
#include <Library/OcMainLib.h>
#include <Library/OcMiscLib.h>
#include <Library/OcRtcLib.h>
#include <Library/OcStringLib.h>
#include <Library/OcVariableLib.h>
#include <Library/PrintLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiLib.h>
#include <Library/ResetSystemLib.h>
Go to the source code of this file.
Functions | |
STATIC EFI_STATUS | SaveMode (VOID) |
STATIC EFI_STATUS | RestoreMode (VOID) |
STATIC EFI_STATUS | RunShowMenu (IN OC_BOOT_CONTEXT *BootContext, OUT OC_BOOT_ENTRY **ChosenBootEntry) |
BOOLEAN EFIAPI | OcVerifyPassword (IN CONST UINT8 *Password, IN UINT32 PasswordSize, IN CONST OC_PRIVILEGE_CONTEXT *PrivilegeContext) |
EFI_STATUS | InternalRunRequestPrivilege (IN OC_PICKER_CONTEXT *PickerContext, IN OC_PRIVILEGE_LEVEL Level) |
EFI_STATUS | OcRunBootPicker (IN OC_PICKER_CONTEXT *Context) |
STATIC EFI_STATUS | SetPickerEntryReason (IN APPLE_PICKER_ENTRY_REASON PickerEntryReason) |
EFI_STATUS | OcRunFirmwareApplication (IN EFI_GUID *ApplicationGuid, IN BOOLEAN SetReason) |
EFI_STATUS | OcUnlockAppleFirmwareUI (VOID) |
EFI_STATUS | OcLaunchAppleBootPicker (VOID) |
Variables | |
STATIC UINT32 | mSavedGopMode |
STATIC EFI_CONSOLE_CONTROL_SCREEN_MODE | mSavedConsoleControlMode |
STATIC INT32 | mSavedConsoleMode |
STATIC CONST UINT8 | ConnectGopPrologue [] |
STATIC CONST UINT8 | ConnectGopPrologueMask [] |
STATIC CONST UINT8 | ConnectGopReplace [] |
STATIC CONST UINT8 | ConnectGopReplaceMask [] |
STATIC CONST UINT8 | AltConnectGopPrologue [] |
STATIC CONST UINT8 | AltConnectGopPrologueMask [] |
STATIC CONST UINT8 | AltConnectGopReplace [] |
STATIC CONST UINT8 | AltConnectGopReplaceMask [] |
Copyright (C) 2019, vit9696. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
Definition in file OcBootManagementLib.c.
EFI_STATUS InternalRunRequestPrivilege | ( | IN OC_PICKER_CONTEXT * | PickerContext, |
IN OC_PRIVILEGE_LEVEL | Level ) |
Definition at line 219 of file OcBootManagementLib.c.
EFI_STATUS OcLaunchAppleBootPicker | ( | VOID | ) |
Launch Apple boot picker firmware application.
EFI_SUCCESS | Picker was successfully executed, implies boot selection was returned in BootNext. |
other | Picker could not be launched, or error within picker application. |
Definition at line 763 of file OcBootManagementLib.c.
EFI_STATUS OcRunBootPicker | ( | IN OC_PICKER_CONTEXT * | Context | ) |
Install missing boot policy, scan, and show simple boot menu.
[in] | Context | Picker context. |
does | not return unless a fatal error happened. |
Definition at line 258 of file OcBootManagementLib.c.
EFI_STATUS OcRunFirmwareApplication | ( | IN EFI_GUID * | ApplicationGuid, |
IN BOOLEAN | SetReason ) |
Launch firmware application.
[in] | ApplicationGuid | Application GUID identifier in the firmware. |
[in] | SetReason | Pass enter reason (specific to Apple BootPicker). |
error | code, should not return. |
Definition at line 558 of file OcBootManagementLib.c.
EFI_STATUS OcUnlockAppleFirmwareUI | ( | VOID | ) |
Force Apple Firmware UI to always reconnect to current console GOP.
EFI_SUCCESS | Firmware UI ConnectGop method was successfully reset. |
other | Compatible firmware UI protocol for reset could not be found. |
Definition at line 687 of file OcBootManagementLib.c.
BOOLEAN EFIAPI OcVerifyPassword | ( | IN CONST UINT8 * | Password, |
IN UINT32 | PasswordSize, | ||
IN CONST OC_PRIVILEGE_CONTEXT * | PrivilegeContext ) |
Verify password.
Shared context function to be used by all pickers rather than directly linked call to OcVerifyPasswordSha512, to pick up status of Avx acceleration as enabled within OpenCore.efi and to avoid unnecessary OcCryptoLib lib linking into external picker.
[in] | Password | Password. |
[in] | PasswordSize | Password size. |
[in] | PrivilegeContext | Privilege context. |
True | if password verified successfully. |
Definition at line 199 of file OcBootManagementLib.c.
STATIC EFI_STATUS RestoreMode | ( | VOID | ) |
Definition at line 90 of file OcBootManagementLib.c.
STATIC EFI_STATUS RunShowMenu | ( | IN OC_BOOT_CONTEXT * | BootContext, |
OUT OC_BOOT_ENTRY ** | ChosenBootEntry ) |
Definition at line 138 of file OcBootManagementLib.c.
STATIC EFI_STATUS SaveMode | ( | VOID | ) |
Definition at line 53 of file OcBootManagementLib.c.
STATIC EFI_STATUS SetPickerEntryReason | ( | IN APPLE_PICKER_ENTRY_REASON | PickerEntryReason | ) |
Definition at line 544 of file OcBootManagementLib.c.
STATIC CONST UINT8 AltConnectGopPrologue[] |
Definition at line 662 of file OcBootManagementLib.c.
STATIC CONST UINT8 AltConnectGopPrologueMask[] |
Definition at line 668 of file OcBootManagementLib.c.
STATIC CONST UINT8 AltConnectGopReplace[] |
Definition at line 674 of file OcBootManagementLib.c.
STATIC CONST UINT8 AltConnectGopReplaceMask[] |
Definition at line 680 of file OcBootManagementLib.c.
STATIC CONST UINT8 ConnectGopPrologue[] |
Definition at line 627 of file OcBootManagementLib.c.
STATIC CONST UINT8 ConnectGopPrologueMask[] |
Definition at line 633 of file OcBootManagementLib.c.
STATIC CONST UINT8 ConnectGopReplace[] |
Definition at line 639 of file OcBootManagementLib.c.
STATIC CONST UINT8 ConnectGopReplaceMask[] |
Definition at line 645 of file OcBootManagementLib.c.
STATIC EFI_CONSOLE_CONTROL_SCREEN_MODE mSavedConsoleControlMode |
Definition at line 48 of file OcBootManagementLib.c.
STATIC INT32 mSavedConsoleMode |
Definition at line 49 of file OcBootManagementLib.c.
STATIC UINT32 mSavedGopMode |
Definition at line 47 of file OcBootManagementLib.c.