OpenCore
1.0.4
OpenCore Bootloader
|
Go to the source code of this file.
Data Structures | |
struct | OC_BOOT_ENTRY_PROTOCOL_ |
Macros | |
#define | OC_BOOT_ENTRY_PROTOCOL_GUID |
#define | OC_BOOT_ENTRY_PROTOCOL_REVISION 6 |
Typedefs | |
typedef struct OC_BOOT_ENTRY_PROTOCOL_ | OC_BOOT_ENTRY_PROTOCOL |
typedef EFI_STATUS(EFIAPI * | OC_BOOT_ENTRY_PROTOCOL_GET_ENTRIES) (IN OUT OC_PICKER_CONTEXT *PickerContext, IN CONST EFI_HANDLE Device OPTIONAL, OUT OC_PICKER_ENTRY **Entries, OUT UINTN *NumEntries) |
typedef VOID(EFIAPI * | OC_BOOT_ENTRY_PROTOCOL_FREE_ENTRIES) (IN OC_PICKER_ENTRY **Entries, IN UINTN NumEntries) |
typedef CHAR8 *(EFIAPI * | OC_BOOT_ENTRY_PROTOCOL_CHECK_HOTKEYS) (IN OUT OC_PICKER_CONTEXT *Context, IN UINTN NumKeys, IN APPLE_MODIFIER_MAP Modifiers, IN APPLE_KEY_CODE *Keys) |
typedef BOOLEAN(EFIAPI * | OC_CONSUME_ENTRY_PROTOCOL_ACTION) (IN OUT OC_PICKER_CONTEXT *PickerContext, IN EFI_HANDLE BootEntryProtocolHandle, IN OC_BOOT_ENTRY_PROTOCOL *BootEntryProtocol, IN VOID *Context) |
Functions | |
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) |
Variables | |
EFI_GUID | gOcBootEntryProtocolGuid |
OpenCore Boot Entry Protocol.
Copyright (C) 2021, Mike Beaton. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
Definition in file OcBootEntry.h.
#define OC_BOOT_ENTRY_PROTOCOL_GUID |
8604716E-ADD4-45B4-8495-08E36D497F4F
Definition at line 19 of file OcBootEntry.h.
#define OC_BOOT_ENTRY_PROTOCOL_REVISION 6 |
Currently supported OC_BOOT_ENTRY_PROTOCOL protocol revision. Needs to be changed every time the contract changes, including when passed-in structures OC_PICKER_CONTEXT and OC_PICKER_ENTRY change.
WARNING: This protocol is currently undergoing active design.
Definition at line 31 of file OcBootEntry.h.
typedef struct OC_BOOT_ENTRY_PROTOCOL_ OC_BOOT_ENTRY_PROTOCOL |
Forward declaration of OC_BOOT_ENTRY_PROTOCOL structure.
Definition at line 36 of file OcBootEntry.h.
typedef CHAR8 *(EFIAPI * OC_BOOT_ENTRY_PROTOCOL_CHECK_HOTKEYS) (IN OUT OC_PICKER_CONTEXT *Context, IN UINTN NumKeys, IN APPLE_MODIFIER_MAP Modifiers, IN APPLE_KEY_CODE *Keys) |
Detect hotkeys for boot entry protocol. If non-NULL is returned, it is the entry ID of the entry from this protocol which should be started immediately with no picker shown, similarly to a default boot entry. If protocol does not in fact return an entry with this ID, then picker with all auxiliary entries will be shown.
[in] | PickerContext | Picker context. |
[in] | NumKeys | Number of keys held down. Recommended to check Keys and NumKeys using OcKeyMapHasKey. |
[out] | Modifiers | Keyboard modifiers. |
[out] | Keys | Keys held down. Recommended to check Keys and NumKeys using OcKeyMapHasKey. |
ID | of entry to start immediately, or NULL. |
Definition at line 106 of file OcBootEntry.h.
typedef VOID(EFIAPI * OC_BOOT_ENTRY_PROTOCOL_FREE_ENTRIES) (IN OC_PICKER_ENTRY **Entries, IN UINTN NumEntries) |
Free list of OpenCore boot entries from previous call to OC_BOOT_ENTRY_PROTOCOL_GET_ENTRIES.
[in] | Entries | List of boot entries, as returned by previous call. Correct implementation of interface should additionally zero this pointer before returning. |
[in] | NumEntries | The number of entries, as returned by previous call. |
Definition at line 83 of file OcBootEntry.h.
typedef EFI_STATUS(EFIAPI * OC_BOOT_ENTRY_PROTOCOL_GET_ENTRIES) (IN OUT OC_PICKER_CONTEXT *PickerContext, IN CONST EFI_HANDLE Device OPTIONAL, OUT OC_PICKER_ENTRY **Entries, OUT UINTN *NumEntries) |
Return list of OpenCore boot entries associated with filesystem.
[in] | PickerContext | Picker context. |
[in] | Device | The handle of the device to scan. NULL is passed in to request custom entries (e.g. system actions), non-NULL for entries found by scanning a given device. All implementations must support NULL and non-NULL values, but may immediately return EFI_NOT_FOUND if they do not provide entries of the corresponding type. |
[out] | BootEntries | List of boot entries associated with the filesystem. On EFI_SUCCESS BootEntries must be freed by the caller with FreePool after use, and each individual boot entry should eventually be freed by FreeBootEntry (as for boot entries created within OC itself). Does not point to allocated memory on return, if any status other than EFI_SUCCESS was returned. |
[out] | NumEntries | The number of entries returned in the BootEntries list. If any status other than EFI_SUCCESS was returned, this value may not have been initialised and should be ignored by the caller. |
EFI_SUCCESS | At least one matching entry was found, and the list and count of boot entries has been returned. |
EFI_NOT_FOUND | No matching boot entries were found. |
EFI_OUT_OF_RESOURCES | Memory allocation failure. |
other | An error returned by a sub-operation. |
Definition at line 66 of file OcBootEntry.h.
typedef BOOLEAN(EFIAPI * OC_CONSUME_ENTRY_PROTOCOL_ACTION) (IN OUT OC_PICKER_CONTEXT *PickerContext, IN EFI_HANDLE BootEntryProtocolHandle, IN OC_BOOT_ENTRY_PROTOCOL *BootEntryProtocol, IN VOID *Context) |
Action to perform for each boot entry protocol instance during OcConsumeBootEntryProtocol.
[in,out] | PickerContext | Picker context. |
[in] | BootEntryProtocolHandle | Boot entry protocol handle. |
[in] | BootEntryProtocol | Boot entry protocol. |
[in] | Context | Action context. |
TRUE,proceed | to next protocol instance. |
FALSE,do | not proceed to next protocol instance. |
Definition at line 126 of file OcBootEntry.h.
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.
[in,out] | PickerContext | Picker context. |
[in] | EntryProtocolHandles | Boot entry protocol handles, or NULL if none. |
[in] | EntryProtocolHandleCount | Count of boot entry protocol handles. |
[in] | Action | Action to perform for each protocol instance. |
[in] | Context | Context. |
Definition at line 187 of file BootEntryProtocol.c.
|
extern |