]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Include/Library/BdsLib.h
ArmPlatformPkg/Bds: Remove any use of the "Fdt" UEFI variable
[mirror_edk2.git] / ArmPkg / Include / Library / BdsLib.h
index 91c67e726ee75287c50c116d46537894e1177cea..68dbfd57f2154149ef1bb7d5c99c721ad44da11b 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 *\r
-*  Copyright (c) 2011, ARM Limited. All rights reserved.\r
-*  \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
-*  http://opensource.org/licenses/bsd-license.php                                            \r
+*  Copyright (c) 2013, ARM Limited. All rights reserved.\r
 *\r
-*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \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
+*  http://opensource.org/licenses/bsd-license.php\r
+*\r
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 *\r
 **/\r
 \r
@@ -66,12 +66,84 @@ BdsConnectAllDrivers (
   VOID\r
   );\r
 \r
+/**\r
+  Return the value of a global variable defined by its VariableName.\r
+  The variable must be defined with the VendorGuid gEfiGlobalVariableGuid.\r
+\r
+  @param  VariableName          A Null-terminated string that is the name of the vendor's\r
+                                variable.\r
+  @param  DefaultValue          Value returned by the function if the variable does not exist\r
+  @param  DataSize              On input, the size in bytes of the return Data buffer.\r
+                                On output the size of data returned in Data.\r
+  @param  Value                 Value read from the UEFI Variable or copy of the default value\r
+                                if the UEFI Variable does not exist\r
+\r
+  @retval EFI_SUCCESS           All drivers have been connected\r
+  @retval EFI_NOT_FOUND         No handles match the search.\r
+  @retval EFI_OUT_OF_RESOURCES  There is not resource pool memory to store the matching results.\r
+\r
+**/\r
+EFI_STATUS\r
+GetGlobalEnvironmentVariable (\r
+  IN     CONST CHAR16*   VariableName,\r
+  IN     VOID*           DefaultValue,\r
+  IN OUT UINTN*          Size,\r
+  OUT    VOID**          Value\r
+  );\r
+\r
+/**\r
+  Return the value of the variable defined by its VariableName and VendorGuid\r
+\r
+  @param  VariableName          A Null-terminated string that is the name of the vendor's\r
+                                variable.\r
+  @param  VendorGuid            A unique identifier for the vendor.\r
+  @param  DefaultValue          Value returned by the function if the variable does not exist\r
+  @param  DataSize              On input, the size in bytes of the return Data buffer.\r
+                                On output the size of data returned in Data.\r
+  @param  Value                 Value read from the UEFI Variable or copy of the default value\r
+                                if the UEFI Variable does not exist\r
+\r
+  @retval EFI_SUCCESS           All drivers have been connected\r
+  @retval EFI_NOT_FOUND         No handles match the search.\r
+  @retval EFI_OUT_OF_RESOURCES  There is not resource pool memory to store the matching results.\r
+\r
+**/\r
+EFI_STATUS\r
+GetEnvironmentVariable (\r
+  IN     CONST CHAR16*   VariableName,\r
+  IN     EFI_GUID*       VendorGuid,\r
+  IN     VOID*           DefaultValue,\r
+  IN OUT UINTN*          Size,\r
+  OUT    VOID**          Value\r
+  );\r
+\r
+EFI_STATUS\r
+BootOptionFromLoadOptionIndex (\r
+  IN  UINT16            LoadOptionIndex,\r
+  OUT BDS_LOAD_OPTION** BdsLoadOption\r
+  );\r
+\r
+EFI_STATUS\r
+BootOptionFromLoadOptionVariable (\r
+  IN  CHAR16*           BootVariableName,\r
+  OUT BDS_LOAD_OPTION** BdsLoadOption\r
+  );\r
+\r
+EFI_STATUS\r
+BootOptionToLoadOptionVariable (\r
+  IN BDS_LOAD_OPTION*   BdsLoadOption\r
+  );\r
+\r
+UINT16\r
+BootOptionAllocateBootIndex (\r
+  VOID\r
+  );\r
+\r
 /**\r
   Start a Linux kernel from a Device Path\r
 \r
   @param  LinuxKernel           Device Path to the Linux Kernel\r
   @param  Parameters            Linux kernel arguments\r
-  @param  Fdt                   Device Path to the Flat Device Tree\r
 \r
   @retval EFI_SUCCESS           All drivers have been connected\r
   @retval EFI_NOT_FOUND         The Linux kernel Device Path has not been found\r
@@ -79,11 +151,29 @@ BdsConnectAllDrivers (
 \r
 **/\r
 EFI_STATUS\r
-BdsBootLinux (\r
+BdsBootLinuxAtag (\r
+  IN  EFI_DEVICE_PATH_PROTOCOL* LinuxKernelDevicePath,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL* InitrdDevicePath,\r
+  IN  CONST CHAR8*              Arguments\r
+  );\r
+\r
+/**\r
+  Start a Linux kernel from a Device Path\r
+\r
+  @param[in]  LinuxKernelDevicePath  Device Path to the Linux Kernel\r
+  @param[in]  InitrdDevicePath       Device Path to the Initrd\r
+  @param[in]  Arguments              Linux kernel arguments\r
+\r
+  @retval EFI_SUCCESS           All drivers have been connected\r
+  @retval EFI_NOT_FOUND         The Linux kernel Device Path has not been found\r
+  @retval EFI_OUT_OF_RESOURCES  There is not enough resource memory to store the matching results.\r
+\r
+**/\r
+EFI_STATUS\r
+BdsBootLinuxFdt (\r
   IN  EFI_DEVICE_PATH_PROTOCOL* LinuxKernelDevicePath,\r
   IN  EFI_DEVICE_PATH_PROTOCOL* InitrdDevicePath,\r
-  IN  CONST CHAR8*              Arguments,\r
-  IN  EFI_DEVICE_PATH_PROTOCOL* FdtDevicePath\r
+  IN  CONST CHAR8*              Arguments\r
   );\r
 \r
 /**\r
@@ -100,7 +190,9 @@ BdsBootLinux (
 EFI_STATUS\r
 BdsStartEfiApplication (\r
   IN EFI_HANDLE                  ParentImageHandle,\r
-  IN EFI_DEVICE_PATH_PROTOCOL    *DevicePath\r
+  IN EFI_DEVICE_PATH_PROTOCOL    *DevicePath,\r
+  IN UINTN                       LoadOptionsSize,\r
+  IN VOID*                       LoadOptions\r
   );\r
 \r
 /**\r
@@ -116,7 +208,17 @@ BdsStartEfiApplication (
 EFI_STATUS\r
 BdsLoadApplication (\r
   IN EFI_HANDLE                  ParentImageHandle,\r
-  IN CHAR16*                     EfiApp\r
+  IN CHAR16*                     EfiApp,\r
+  IN UINTN                       LoadOptionsSize,\r
+  IN VOID*                       LoadOptions\r
+  );\r
+\r
+EFI_STATUS\r
+BdsLoadImage (\r
+  IN     EFI_DEVICE_PATH       *DevicePath,\r
+  IN     EFI_ALLOCATE_TYPE     Type,\r
+  IN OUT EFI_PHYSICAL_ADDRESS* Image,\r
+  OUT    UINTN                 *FileSize\r
   );\r
 \r
 #endif\r