3.15.12 Boot Manager Boot Option Processing

The platform boot manager displays the boot option menu and if the auto-boot TimeOut environment variable has been set, then the first boot option is loaded when the timer expires. The boot options can be enumerated by the platform boot manager by reading the BootOrder and Boot#### environment variables. These environment variables are more thoroughly discussed in the Boot Manager chapter of the UEFI Specification. A boot option is typically an OS loader that never returns to UEFI, but boot options can also be UEFI applications like diagnostic utilities or the UEFI Shell.
If a boot option does return to the platform boot manager, and the return status is not EFI_SUCCESS, then the platform boot manager processes the next boot option. This process is repeated until an OS is booted, EFI_SUCESS is returned by a boot option or the list of boot options is exhausted. Once the boot process has halted, the platform boot manager may provide a user interface that allows the user to manually boot an OS or manage the platform.
The platform boot manager uses the device path in each boot option to ensure that the device required to access the boot option has been added to the UEFI handle database. This process is exactly the same as the process used for the console variables ErrOut, ConOut, and ConIn.