Ashish, I prefer EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL and could have two fields for this protocol for now: Revision and RefreshAllBootOption (IN Options, IN OptionCount, OUT UpdatedOptions, OUT UpdatedOptionCount) Usually EDKII puts Count in second and buffer in first.
The reason of using EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL as the new protocol name is in future we could increase the revision and put more platform hook API in this protocol. The reason of combining two APIs to one RefreshAllBootOption() is when I checked the code change below, I see no need to separate them. What do you think? Thanks, Ray > // > + // Locate Platform Boot Options Protocol > + // > + PlatformBootOptions = NULL; > + Status = gBS->LocateProtocol (&gEdkiiPlatformBootOptionsProtocolGuid, > + NULL, > + (VOID **)&PlatformBootOptions); > + if (!EFI_ERROR (Status)) { > + // > + // If found, call platform specific overrides to auto enumerated > + // boot options. > + // > + Status = PlatformBootOptions->OverridePlatformBootOptions ((CONST > UINTN)BootOptionCount, > + (CONST > EFI_BOOT_MANAGER_LOAD_OPTION *)BootOptions, > + > &UpdatedBootOptionCount, > + > &UpdatedBootOptions); > + if (!EFI_ERROR (Status)) { > + EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount); > + BootOptions = UpdatedBootOptions; > + BootOptionCount = UpdatedBootOptionCount; > + } > + > + // > + // Call platform specific override to remove invalid boot options from NV > + // > + Status = PlatformBootOptions->RemoveInvalidPlatformNvBootOptions ((CONST > UINTN)NvBootOptionCount, > + (CONST > EFI_BOOT_MANAGER_LOAD_OPTION *)NvBootOptions, > + > &UpdatedBootOptionCount, > + > &UpdatedBootOptions); > + if (!EFI_ERROR (Status)) { > + EfiBootManagerFreeLoadOptions (NvBootOptions, NvBootOptionCount); > + NvBootOptions = UpdatedBootOptions; > + NvBootOptionCount = UpdatedBootOptionCount; > + } > + } > + -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52300): https://edk2.groups.io/g/devel/message/52300 Mute This Topic: https://groups.io/mt/68770160/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-