]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Library/UefiBootManagerLib.h
MdeModulePkg/S3SmmInitDone.h: Fix copyright coding style error.
[mirror_edk2.git] / MdeModulePkg / Include / Library / UefiBootManagerLib.h
index e333ffd86bcef712a797013a782a73bac7247361..bfc0cb86f87738d61c2b37d01f04947bc1c6de82 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Provide Boot Manager related library APIs.\r
 \r
-Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2018, 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
@@ -60,14 +60,14 @@ typedef struct {
   // Used at runtime\r
   //\r
   EFI_STATUS                        Status;             // Status returned from boot attempt gBS->StartImage ()\r
-  CHAR16                            *ExitData;          // Exit data returned from gBS->StartImage () \r
+  CHAR16                            *ExitData;          // Exit data returned from gBS->StartImage ()\r
   UINTN                             ExitDataSize;       // Size of ExitData\r
 } EFI_BOOT_MANAGER_LOAD_OPTION;\r
 \r
 /**\r
   Returns an array of load options based on the EFI variable\r
   L"BootOrder"/L"DriverOrder" and the L"Boot####"/L"Driver####" variables impled by it.\r
-  #### is the hex value of the UINT16 in each BootOrder/DriverOrder entry. \r
+  #### is the hex value of the UINT16 in each BootOrder/DriverOrder entry.\r
 \r
   @param  LoadOptionCount   Returns number of entries in the array.\r
   @param  LoadOptionType    The type of the load option.\r
@@ -163,7 +163,7 @@ EfiBootManagerVariableToLoadOption (
 \r
 /**\r
   Create the Boot#### or Driver#### variable from the load option.\r
-  \r
+\r
   @param  LoadOption      Pointer to the load option.\r
 \r
   @retval EFI_SUCCESS     The variable was created.\r
@@ -176,27 +176,37 @@ EfiBootManagerLoadOptionToVariable (
   );\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. 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
-  @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
+  @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
   Delete the load option according to the OptionNumber and OptionType.\r
-  \r
+\r
   Only the BootOrder/DriverOrder is updated to remove the reference of the OptionNumber.\r
-  \r
+\r
   @param  OptionNumber        Option number of the load option.\r
   @param  OptionType          Type of the load option.\r
 \r
@@ -211,7 +221,7 @@ EfiBootManagerDeleteLoadOptionVariable (
   );\r
 \r
 /**\r
-  Sort the load options. The DriverOrder/BootOrder variables will be re-created to \r
+  Sort the load options. The DriverOrder/BootOrder variables will be re-created to\r
   reflect the new order.\r
 \r
   @param OptionType        The type of the load option.\r
@@ -227,7 +237,7 @@ EfiBootManagerSortLoadOptionVariable (
 /**\r
   Return the index of the load option in the load option array.\r
 \r
-  The function consider two load options are equal when the \r
+  The function consider two load options are equal when the\r
   OptionType, Attributes, Description, FilePath and OptionalData are equal.\r
 \r
   @param Key    Pointer to the load option to be found.\r
@@ -282,7 +292,7 @@ typedef struct {
 /**\r
   Start the hot key service so that the key press can trigger the boot option.\r
 \r
-  @param HotkeyTriggered  Return the waitable event and it will be signaled \r
+  @param HotkeyTriggered  Return the waitable event and it will be signaled\r
                           when a valid hot key is pressed.\r
 \r
   @retval EFI_SUCCESS     The hot key service is started.\r
@@ -381,7 +391,7 @@ EfiBootManagerHotkeyBoot (
   3. Non-BlockIo SimpleFileSystem - The boot option points to a device supporting\r
                                     SimpleFileSystem Protocol, but not supporting BlockIo\r
                                     protocol.\r
-  4. LoadFile                     - The boot option points to the media supporting \r
+  4. LoadFile                     - The boot option points to the media supporting\r
                                     LoadFile protocol.\r
   Reference: UEFI Spec chapter 3.3 Boot Option Variables Default Boot Behavior\r
 \r
@@ -397,9 +407,9 @@ EfiBootManagerRefreshAllBootOption (
   Attempt to boot the EFI boot option. This routine sets L"BootCurent" and\r
   signals the EFI ready to boot event. If the device path for the option starts\r
   with a BBS device path a legacy boot is attempted. Short form device paths are\r
-  also supported via this rountine. A device path starting with \r
+  also supported via this rountine. A device path starting with\r
   MEDIA_HARDDRIVE_DP, MSG_USB_WWID_DP, MSG_USB_CLASS_DP gets expaned out\r
-  to find the first device that matches. If the BootOption Device Path \r
+  to find the first device that matches. If the BootOption Device Path\r
   fails the removable media boot algorithm is attempted (\EFI\BOOTIA32.EFI,\r
   \EFI\BOOTX64.EFI,... only one file type is tried per processor type)\r
 \r
@@ -457,7 +467,7 @@ EfiBootManagerGetLoadOptionBuffer (
   );\r
 \r
 /**\r
-  The function enumerates all the legacy boot options, creates them and \r
+  The function enumerates all the legacy boot options, creates them and\r
   registers them in the BootOrder variable.\r
 **/\r
 typedef\r
@@ -550,7 +560,7 @@ EfiBootManagerConnectAll (
   @retval EFI_OUT_OF_RESOURCES   There is no resource to create new handles.\r
   @retval EFI_NOT_FOUND          Create the handle associate with one device path\r
                                  node failed.\r
-  @retval EFI_SECURITY_VIOLATION The user has no permission to start UEFI device \r
+  @retval EFI_SECURITY_VIOLATION The user has no permission to start UEFI device\r
                                  drivers on the DevicePath.\r
 **/\r
 EFI_STATUS\r
@@ -561,8 +571,8 @@ EfiBootManagerConnectDevicePath (
   );\r
 \r
 /**\r
-  This function will disconnect all current system handles. \r
-  \r
+  This function will disconnect all current system handles.\r
+\r
   gBS->DisconnectController() is invoked for each handle exists in system handle buffer.\r
   If handle is a bus type handle, all childrens also are disconnected recursively by\r
   gBS->DisconnectController().\r
@@ -646,7 +656,7 @@ EfiBootManagerConnectConsoleVariable (
   );\r
 \r
 /**\r
-  Query all the children of VideoController and return the device paths of all the \r
+  Query all the children of VideoController and return the device paths of all the\r
   children that support GraphicsOutput protocol.\r
 \r
   @param VideoController       PCI handle of video controller.\r
@@ -688,7 +698,7 @@ typedef struct {
   EFI_HANDLE                      ChildHandle;\r
 \r
   ///\r
-  /// Driver health messages of the specify Driver \r
+  /// Driver health messages of the specify Driver\r
   ///\r
   EFI_DRIVER_HEALTH_HII_MESSAGE   *MessageList;\r
 \r
@@ -746,7 +756,7 @@ EfiBootManagerFreeDriverHealthInfo (
 \r
   @param LoadOption  Pointer to the load option.\r
 \r
-  @retval EFI_INVALID_PARAMETER  The load option type is invalid, \r
+  @retval EFI_INVALID_PARAMETER  The load option type is invalid,\r
                                  or the load option file path doesn't point to a valid file.\r
   @retval EFI_UNSUPPORTED        The load option type is of LoadOptionTypeBoot.\r
   @retval EFI_SUCCESS            The load option is inactive, or successfully loaded and executed.\r
@@ -777,4 +787,17 @@ EfiBootManagerIsValidLoadOptionVariableName (
   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