summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/Bds/BootMenu.c
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-01-28 11:44:50 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-01-28 11:44:50 +0000
commitaeaf64d64da4242a93ba36f1b290da4e5e1129a3 (patch)
tree64f1c4ce99ec9ca6ced4f9a14d084da724e61c0d /ArmPlatformPkg/Bds/BootMenu.c
parent76aee8f4cf7b5729b8d1b5de9286f3ee94b557d1 (diff)
downloadedk2-platforms-aeaf64d64da4242a93ba36f1b290da4e5e1129a3.tar.xz
ArmPlatformPkg/Bds/BootMenu.c: Set "Fdt" UEFI variable as local
"Fdt" UEFI variable is not a global variable as defined by UEFI specification. Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14104 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Bds/BootMenu.c')
-rw-r--r--ArmPlatformPkg/Bds/BootMenu.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c
index c2b91b8bad..12463194d0 100644
--- a/ArmPlatformPkg/Bds/BootMenu.c
+++ b/ArmPlatformPkg/Bds/BootMenu.c
@@ -1,6 +1,6 @@
/** @file
*
-* Copyright (c) 2011-2012, ARM Limited. All rights reserved.
+* Copyright (c) 2011-2013, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License
@@ -14,9 +14,12 @@
#include "BdsInternal.h"
+#include <Guid/ArmGlobalVariableHob.h>
+
extern EFI_HANDLE mImageHandle;
extern BDS_LOAD_OPTION_SUPPORT *BdsLoadOptionSupportList;
+
EFI_STATUS
SelectBootDevice (
OUT BDS_SUPPORTED_DEVICE** SupportedBootDevice
@@ -102,7 +105,7 @@ SelectBootDevice (
}
Index++;
}
-
+
EXIT:
BootDeviceListSupportedFree (&SupportedDeviceList, *SupportedBootDevice);
return Status;
@@ -185,7 +188,7 @@ BootMenuAddBootOption (
InitrdSize = GetDevicePathSize (InitrdPath);
BootArguments = (ARM_BDS_LOADER_ARGUMENTS*)AllocatePool (sizeof(ARM_BDS_LOADER_ARGUMENTS) + CmdLineSize + InitrdSize);
-
+
BootArguments->LinuxArguments.CmdLineSize = CmdLineSize;
BootArguments->LinuxArguments.InitrdSize = InitrdSize;
CopyMem ((VOID*)(&BootArguments->LinuxArguments + 1), CmdLine, CmdLineSize);
@@ -211,7 +214,7 @@ BootMenuAddBootOption (
FREE_DEVICE_PATH:
FreePool (DevicePath);
-
+
EXIT:
if (Status == EFI_ABORTED) {
Print(L"\n");
@@ -439,7 +442,7 @@ BootMenuUpdateBootOption (
InitrdSize = 0;
}
- Print(L"Arguments to pass to the binary: ");
+ Print(L"Arguments to pass to the binary: ");
if (CmdLineSize > 0) {
AsciiStrnCpy(CmdLine, (CONST CHAR8*)(LinuxArguments + 1), CmdLineSize);
} else {
@@ -511,10 +514,22 @@ UpdateFdtPath (
// Append the Device Path node to the select device path
FdtDevicePath = AppendDevicePathNode (SupportedBootDevice->DevicePathProtocol, FdtDevicePathNode);
FdtDevicePathSize = GetDevicePathSize (FdtDevicePath);
- Status = gRT->SetVariable ((CHAR16*)L"Fdt", &gEfiGlobalVariableGuid, (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS ), FdtDevicePathSize, FdtDevicePath);
+ Status = gRT->SetVariable (
+ (CHAR16*)L"Fdt",
+ &gArmGlobalVariableGuid,
+ EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
+ FdtDevicePathSize,
+ FdtDevicePath
+ );
ASSERT_EFI_ERROR(Status);
} else {
- gRT->SetVariable ((CHAR16*)L"Fdt", &gEfiGlobalVariableGuid, (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS ), 0, NULL);
+ gRT->SetVariable (
+ (CHAR16*)L"Fdt",
+ &gArmGlobalVariableGuid,
+ EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
+ 0,
+ NULL
+ );
ASSERT_EFI_ERROR(Status);
}