summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/Bds/BootOption.c
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-12 00:42:59 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-12 00:42:59 +0000
commitc0b2e4775dcb06d9016f17f5d22e6276d9b58397 (patch)
tree1dbf60623d7fa73de0b5dd190bfb81ae8c4ad7e5 /ArmPlatformPkg/Bds/BootOption.c
parent7135d76d56ae96ba2fc05d0f0369b2b54ce0b05f (diff)
downloadedk2-platforms-c0b2e4775dcb06d9016f17f5d22e6276d9b58397.tar.xz
ArmPkg: Introduce GetGlobalEnvironmentVariable() function.
Rename GetEnvironmentVariable() function into GetGlobalEnvironmentVariable(). GetEnvironmentVariable() function sill exists but caller must now pass a Guid. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14176 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Bds/BootOption.c')
-rw-r--r--ArmPlatformPkg/Bds/BootOption.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ArmPlatformPkg/Bds/BootOption.c b/ArmPlatformPkg/Bds/BootOption.c
index e562add3d1..ee0301ef2c 100644
--- a/ArmPlatformPkg/Bds/BootOption.c
+++ b/ArmPlatformPkg/Bds/BootOption.c
@@ -12,6 +12,7 @@
*
**/
+#include <Guid/ArmGlobalVariableHob.h>
#include "BdsInternal.h"
extern EFI_HANDLE mImageHandle;
@@ -76,7 +77,8 @@ BootOptionStart (
// Get the FDT device path
FdtDevicePathSize = GetDevicePathSize (DefaultFdtDevicePath);
- Status = GetEnvironmentVariable ((CHAR16 *)L"Fdt", DefaultFdtDevicePath, &FdtDevicePathSize, (VOID **)&FdtDevicePath);
+ Status = GetEnvironmentVariable ((CHAR16 *)L"Fdt", &gArmGlobalVariableGuid,
+ DefaultFdtDevicePath, &FdtDevicePathSize, (VOID **)&FdtDevicePath);
ASSERT_EFI_ERROR(Status);
Status = BdsBootLinuxFdt (BootOption->FilePathList,
@@ -120,7 +122,7 @@ BootOptionList (
InitializeListHead (BootOptionList);
// Get the Boot Option Order from the environment variable
- Status = GetEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);
+ Status = GetGlobalEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);
if (EFI_ERROR(Status)) {
return Status;
}
@@ -286,7 +288,7 @@ BootOptionCreate (
);
// Add the new Boot Index to the list
- Status = GetEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);
+ Status = GetGlobalEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);
if (!EFI_ERROR(Status)) {
BootOrder = ReallocatePool (BootOrderSize, BootOrderSize + sizeof(UINT16), BootOrder);
// Add the new index at the end
@@ -358,7 +360,7 @@ BootOptionDelete (
EFI_STATUS Status;
// Remove the entry from the BootOrder environment variable
- Status = GetEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);
+ Status = GetGlobalEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);
if (!EFI_ERROR(Status)) {
BootOrderCount = BootOrderSize / sizeof(UINT16);