]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Bds/BootOption.c
ArmPkg: Introduce GetGlobalEnvironmentVariable() function.
[mirror_edk2.git] / ArmPlatformPkg / Bds / BootOption.c
index e562add3d1ab8f084ad0ed0d60d713765de48402..ee0301ef2c9b0c7eac0daad4e25d63ccee91a665 100644 (file)
@@ -12,6 +12,7 @@
 *\r
 **/\r
 \r
+#include <Guid/ArmGlobalVariableHob.h>\r
 #include "BdsInternal.h"\r
 \r
 extern EFI_HANDLE mImageHandle;\r
@@ -76,7 +77,8 @@ BootOptionStart (
 \r
       // Get the FDT device path\r
       FdtDevicePathSize = GetDevicePathSize (DefaultFdtDevicePath);\r
-      Status = GetEnvironmentVariable ((CHAR16 *)L"Fdt", DefaultFdtDevicePath, &FdtDevicePathSize, (VOID **)&FdtDevicePath);\r
+      Status = GetEnvironmentVariable ((CHAR16 *)L"Fdt", &gArmGlobalVariableGuid,\r
+                 DefaultFdtDevicePath, &FdtDevicePathSize, (VOID **)&FdtDevicePath);\r
       ASSERT_EFI_ERROR(Status);\r
 \r
       Status = BdsBootLinuxFdt (BootOption->FilePathList,\r
@@ -120,7 +122,7 @@ BootOptionList (
   InitializeListHead (BootOptionList);\r
 \r
   // Get the Boot Option Order from the environment variable\r
-  Status = GetEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);\r
+  Status = GetGlobalEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);\r
   if (EFI_ERROR(Status)) {\r
     return Status;\r
   }\r
@@ -286,7 +288,7 @@ BootOptionCreate (
       );\r
 \r
   // Add the new Boot Index to the list\r
-  Status = GetEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);\r
+  Status = GetGlobalEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);\r
   if (!EFI_ERROR(Status)) {\r
     BootOrder = ReallocatePool (BootOrderSize, BootOrderSize + sizeof(UINT16), BootOrder);\r
     // Add the new index at the end\r
@@ -358,7 +360,7 @@ BootOptionDelete (
   EFI_STATUS    Status;\r
 \r
   // Remove the entry from the BootOrder environment variable\r
-  Status = GetEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);\r
+  Status = GetGlobalEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);\r
   if (!EFI_ERROR(Status)) {\r
     BootOrderCount = BootOrderSize / sizeof(UINT16);\r
 \r