OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
BootEntryProtocol.c File Reference
#include "BootManagementInternal.h"
#include <Protocol/OcBootEntry.h>
#include <Library/BaseLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcFileLib.h>
#include <Library/OcDebugLogLib.h>

Go to the source code of this file.

Data Structures

struct  BEP_ADD_ENTRIES_CONTEXT
 

Functions

VOID OcLocateBootEntryProtocolHandles (IN OUT EFI_HANDLE **EntryProtocolHandles, IN OUT UINTN *EntryProtocolHandleCount)
 
VOID OcFreeBootEntryProtocolHandles (EFI_HANDLE **EntryProtocolHandles)
 
STATIC BOOLEAN EFIAPI InternalAddEntriesFromProtocol (IN OUT OC_PICKER_CONTEXT *PickerContext, IN EFI_HANDLE BootEntryProtocolHandle, IN OC_BOOT_ENTRY_PROTOCOL *BootEntryProtocol, IN VOID *Context)
 
VOID OcConsumeBootEntryProtocol (IN OUT OC_PICKER_CONTEXT *PickerContext, IN EFI_HANDLE *EntryProtocolHandles, IN UINTN EntryProtocolHandleCount, IN OC_CONSUME_ENTRY_PROTOCOL_ACTION Action, IN VOID *Context)
 
EFI_STATUS OcAddEntriesFromBootEntryProtocol (IN OUT OC_BOOT_CONTEXT *BootContext, IN OUT OC_BOOT_FILESYSTEM *FileSystem, IN EFI_HANDLE *EntryProtocolHandles, IN UINTN EntryProtocolHandleCount, IN CONST VOID *DefaultEntryId, OPTIONAL IN BOOLEAN CreateDefault, IN BOOLEAN CreateForHotKey)
 

Detailed Description

Boot Entry Protocol.

Copyright (c) 2021, Mike Beaton. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause

Definition in file BootEntryProtocol.c.

Function Documentation

◆ InternalAddEntriesFromProtocol()

STATIC BOOLEAN EFIAPI InternalAddEntriesFromProtocol ( IN OUT OC_PICKER_CONTEXT * PickerContext,
IN EFI_HANDLE BootEntryProtocolHandle,
IN OC_BOOT_ENTRY_PROTOCOL * BootEntryProtocol,
IN VOID * Context )

Definition at line 72 of file BootEntryProtocol.c.

◆ OcAddEntriesFromBootEntryProtocol()

EFI_STATUS OcAddEntriesFromBootEntryProtocol ( IN OUT OC_BOOT_CONTEXT * BootContext,
IN OUT OC_BOOT_FILESYSTEM * FileSystem,
IN EFI_HANDLE * EntryProtocolHandles,
IN UINTN EntryProtocolHandleCount,
IN CONST VOID * DefaultEntryId,
OPTIONAL IN BOOLEAN CreateDefault,
IN BOOLEAN CreateForHotKey )

Request bootable entries from installed boot entry protocol drivers.

Parameters
[in,out]BootContextContext of filesystems.
[in,out]FileSystemFilesystem to scan for entries.
[in]EntryProtocolHandlesBoot entry protocol handles, or NULL if none.
[in]EntryProtocolHandleCountCount of boot entry protocol handles.
[in]DefaultEntryIdId of saved default entry on this file system.
[in]CreateDefaultCreate default entry if TRUE, create all others otherwise.
[in]CreateForHotKeyIf TRUE default entry is being created for protocol hotkey, otherwise for NVRAM boot entry.
Return values
EFI_SUCCESSAt least one entry was created.

Definition at line 239 of file BootEntryProtocol.c.

◆ OcConsumeBootEntryProtocol()

VOID OcConsumeBootEntryProtocol ( IN OUT OC_PICKER_CONTEXT * PickerContext,
IN EFI_HANDLE * EntryProtocolHandles,
IN UINTN EntryProtocolHandleCount,
IN OC_CONSUME_ENTRY_PROTOCOL_ACTION Action,
IN VOID * Context )

Consume boot entry protocol.

Parameters
[in,out]PickerContextPicker context.
[in]EntryProtocolHandlesBoot entry protocol handles, or NULL if none.
[in]EntryProtocolHandleCountCount of boot entry protocol handles.
[in]ActionAction to perform for each protocol instance.
[in]ContextContext.

Definition at line 187 of file BootEntryProtocol.c.

◆ OcFreeBootEntryProtocolHandles()

VOID OcFreeBootEntryProtocolHandles ( EFI_HANDLE ** EntryProtocolHandles)

Free boot entry protocol handles.

Parameters
[in,out]EntryProtocolHandlesBoot entry protocol handles, or NULL if none.

Definition at line 57 of file BootEntryProtocol.c.

◆ OcLocateBootEntryProtocolHandles()

VOID OcLocateBootEntryProtocolHandles ( IN OUT EFI_HANDLE ** EntryProtocolHandles,
IN OUT UINTN * EntryProtocolHandleCount )

Locate boot entry protocol handles.

Parameters
[in,out]EntryProtocolHandlesBoot entry protocol handles, or NULL if none.
[in,out]EntryProtocolHandleCountCount of boot entry protocol handles.

Definition at line 28 of file BootEntryProtocol.c.