/** @file\r
Provide Boot Manager related library APIs.\r
\r
-Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
-(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
+Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
+(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
LoadOptionTypeDriver,\r
LoadOptionTypeSysPrep,\r
LoadOptionTypeBoot,\r
+ LoadOptionTypePlatformRecovery,\r
LoadOptionTypeMax\r
} EFI_BOOT_MANAGER_LOAD_OPTION_TYPE;\r
\r
);\r
\r
/**\r
- This function will update the Boot####/Driver####/SysPrep#### and the \r
- BootOrder/DriverOrder/SysPrepOrder to add a new load option.\r
+ This function will register the new Boot####, Driver#### or SysPrep#### option.\r
+ After the *#### is updated, the *Order will also be updated.\r
\r
- @param Option Pointer to load option to add.\r
- @param Position Position of the new load option to put in the BootOrder/DriverOrder/SysPrepOrder.\r
+ @param Option Pointer to load option to add. If on input\r
+ Option->OptionNumber is LoadOptionNumberUnassigned,\r
+ then on output Option->OptionNumber is updated to\r
+ the number of the new Boot####,\r
+ Driver#### or SysPrep#### option.\r
+ @param Position Position of the new load option to put in the ****Order variable.\r
+\r
+ @retval EFI_SUCCESS The *#### have been successfully registered.\r
+ @retval EFI_INVALID_PARAMETER The option number exceeds 0xFFFF.\r
+ @retval EFI_ALREADY_STARTED The option number of Option is being used already.\r
+ Note: this API only adds new load option, no replacement support.\r
+ @retval EFI_OUT_OF_RESOURCES There is no free option number that can be used when the\r
+ option number specified in the Option is LoadOptionNumberUnassigned.\r
+ @return Status codes of gRT->SetVariable ().\r
\r
- @retval EFI_SUCCESS The load option has been successfully added.\r
- @retval Others Error status returned by RT->SetVariable.\r
**/\r
EFI_STATUS\r
EFIAPI\r
EfiBootManagerAddLoadOptionVariable (\r
- IN EFI_BOOT_MANAGER_LOAD_OPTION *Option,\r
- IN UINTN Position\r
+ IN OUT EFI_BOOT_MANAGER_LOAD_OPTION *Option,\r
+ IN UINTN Position\r
);\r
\r
/**\r
);\r
\r
/**\r
- Return the Boot Manager Menu.\r
- \r
+ Return the boot option corresponding to the Boot Manager Menu.\r
+ It may automatically create one if the boot option hasn't been created yet.\r
+\r
@param BootOption Return the Boot Manager Menu.\r
\r
@retval EFI_SUCCESS The Boot Manager Menu is successfully returned.\r
- @retval EFI_NOT_FOUND The Boot Manager Menu is not found.\r
+ @retval EFI_NOT_FOUND The Boot Manager Menu cannot be found.\r
+ @retval others Return status of gRT->SetVariable (). BootOption still points\r
+ to the Boot Manager Menu even the Status is not EFI_SUCCESS\r
+ and EFI_NOT_FOUND.\r
**/\r
EFI_STATUS\r
EFIAPI\r
EFI_BOOT_MANAGER_LOAD_OPTION *BootOption\r
);\r
\r
+\r
+/**\r
+ Get the load option by its device path.\r
+\r
+ @param FilePath The device path pointing to a load option.\r
+ It could be a short-form device path.\r
+ @param FullPath Return the full device path of the load option after\r
+ short-form device path expanding.\r
+ Caller is responsible to free it.\r
+ @param FileSize Return the load option size.\r
+\r
+ @return The load option buffer. Caller is responsible to free the memory.\r
+**/\r
+VOID *\r
+EFIAPI\r
+EfiBootManagerGetLoadOptionBuffer (\r
+ IN EFI_DEVICE_PATH_PROTOCOL *FilePath,\r
+ OUT EFI_DEVICE_PATH_PROTOCOL **FullPath,\r
+ OUT UINTN *FileSize\r
+ );\r
+\r
/**\r
The function enumerates all the legacy boot options, creates them and \r
registers them in the BootOrder variable.\r
EfiBootManagerProcessLoadOption (\r
EFI_BOOT_MANAGER_LOAD_OPTION *LoadOption\r
);\r
+\r
+/**\r
+ Check whether the VariableName is a valid load option variable name\r
+ and return the load option type and option number.\r
+\r
+ @param VariableName The name of the load option variable.\r
+ @param OptionType Return the load option type.\r
+ @param OptionNumber Return the load option number.\r
+\r
+ @retval TRUE The variable name is valid; The load option type and\r
+ load option number are returned.\r
+ @retval FALSE The variable name is NOT valid.\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+EfiBootManagerIsValidLoadOptionVariableName (\r
+ IN CHAR16 *VariableName,\r
+ OUT EFI_BOOT_MANAGER_LOAD_OPTION_TYPE *OptionType OPTIONAL,\r
+ OUT UINT16 *OptionNumber OPTIONAL\r
+ );\r
+\r
+\r
+/**\r
+ Dispatch the deferred images that are returned from all DeferredImageLoad instances.\r
+\r
+ @retval EFI_SUCCESS At least one deferred image is loaded successfully and started.\r
+ @retval EFI_NOT_FOUND There is no deferred image.\r
+ @retval EFI_ACCESS_DENIED There are deferred images but all of them are failed to load.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiBootManagerDispatchDeferredImages (\r
+ VOID\r
+ );\r
#endif\r