29 IN OUT EFI_HANDLE **EntryProtocolHandles,
30 IN OUT UINTN *EntryProtocolHandleCount
35 Status =
gBS->LocateHandleBuffer (
39 EntryProtocolHandleCount,
43 if (EFI_ERROR (Status)) {
47 if (Status != EFI_NOT_FOUND) {
48 DEBUG ((DEBUG_ERROR,
"BEP: Error locating driver handles - %r\n", Status));
51 *EntryProtocolHandleCount = 0;
52 *EntryProtocolHandles = NULL;
74 IN EFI_HANDLE BootEntryProtocolHandle,
86 AddEntriesContext = Context;
90 Status = EFI_NOT_FOUND;
91 if (BootEntryProtocol->GetBootEntries) {
92 Status = BootEntryProtocol->GetBootEntries (
100 if (EFI_ERROR (Status)) {
104 if (Status != EFI_NOT_FOUND) {
105 DEBUG ((DEBUG_WARN,
"BEP: Unable to fetch boot entries - %r\n", Status));
111 for (EntryIndex = 0; EntryIndex < NumEntries; EntryIndex++) {
112 if (Entries[EntryIndex].Id == NULL) {
113 DEBUG ((DEBUG_WARN,
"BEP: Entry->Id is required, ignoring entry.\n"));
124 &Entries[EntryIndex],
128 if (EFI_ERROR (Status)) {
132 if (Status != EFI_UNSUPPORTED) {
133 DEBUG ((DEBUG_WARN,
"BEP: Error adding entries - %r\n", Status));
157 if (BootEntryProtocol->FreeBootEntries) {
158 BootEntryProtocol->FreeBootEntries (
179 if (EFI_ERROR (Status) && (Status != EFI_UNSUPPORTED)) {
189 IN EFI_HANDLE *EntryProtocolHandles,
190 IN UINTN EntryProtocolHandleCount,
199 ASSERT (EntryProtocolHandleCount == 0 || EntryProtocolHandles != NULL);
201 for (Index = 0; Index < EntryProtocolHandleCount; ++Index) {
205 if (EntryProtocolHandles[Index] == NULL) {
209 Status =
gBS->HandleProtocol (
210 EntryProtocolHandles[Index],
212 (VOID **)&BootEntryProtocol
215 if (EFI_ERROR (Status)) {
216 DEBUG ((DEBUG_ERROR,
"BEP: HandleProtocol failed - %r\n", Status));
217 EntryProtocolHandles[Index] = NULL;
224 "BEP: Invalid revision %u (!= %u) in loaded driver\n",
225 BootEntryProtocol->Revision,
228 EntryProtocolHandles[Index] = NULL;
232 if (!Action (PickerContext, EntryProtocolHandles[Index], BootEntryProtocol, Context)) {
242 IN EFI_HANDLE *EntryProtocolHandles,
243 IN UINTN EntryProtocolHandleCount,
244 IN CONST VOID *DefaultEntryId, OPTIONAL
245 IN BOOLEAN CreateDefault,
246 IN BOOLEAN CreateForHotKey
254 ASSERT (FileSystem != NULL);
255 ASSERT (!CreateDefault || (DefaultEntryId != NULL));
265 BootContext->PickerContext,
266 EntryProtocolHandles,
267 EntryProtocolHandleCount,
EFI_STATUS InternalAddBootEntryFromCustomEntry(IN OUT OC_BOOT_CONTEXT *BootContext, IN OUT OC_BOOT_FILESYSTEM *FileSystem, IN OC_PICKER_ENTRY *CustomEntry, IN BOOLEAN IsBootEntryProtocol)
VOID OcLocateBootEntryProtocolHandles(IN OUT EFI_HANDLE **EntryProtocolHandles, IN OUT UINTN *EntryProtocolHandleCount)
VOID OcFreeBootEntryProtocolHandles(EFI_HANDLE **EntryProtocolHandles)
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)
STATIC BOOLEAN EFIAPI InternalAddEntriesFromProtocol(IN OUT OC_PICKER_CONTEXT *PickerContext, IN EFI_HANDLE BootEntryProtocolHandle, IN OC_BOOT_ENTRY_PROTOCOL *BootEntryProtocol, 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)
EFI_GUID gOcBootEntryProtocolGuid
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)
#define OC_BOOT_ENTRY_PROTOCOL_REVISION