]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/Bds/BootMenu.c: Set "Fdt" UEFI variable as local
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 28 Jan 2013 11:44:50 +0000 (11:44 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 28 Jan 2013 11:44:50 +0000 (11:44 +0000)
"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

ArmPlatformPkg/Bds/Bds.inf
ArmPlatformPkg/Bds/BootMenu.c

index 502704121120b2080770ca1307ac5158cb67c8e8..5faa4b2ee740391a6b5e3254ffa2b643766ead81 100644 (file)
@@ -1,24 +1,24 @@
 #/** @file\r
-#  \r
+#\r
 #  Component description file for Bds module\r
-#  \r
-#  Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>\r
+#\r
+#  Copyright (c) 2011-2013, ARM Ltd. All rights reserved.<BR>\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
-#  \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
 \r
 \r
 [Defines]\r
   INF_VERSION                    = 0x00010005\r
   BASE_NAME                      = ArmPlatformBds\r
-  FILE_GUID                      = 5a50aa81-c3ae-4608-a0e3-41a2e69baf94 \r
+  FILE_GUID                      = 5a50aa81-c3ae-4608-a0e3-41a2e69baf94\r
   MODULE_TYPE                    = DXE_DRIVER\r
   VERSION_STRING                 = 1.0\r
 \r
   DebugLib\r
   PrintLib\r
   BaseLib\r
-  \r
+\r
 [Guids]\r
   gEfiFileSystemInfoGuid\r
-  \r
+  gArmGlobalVariableGuid\r
+\r
 [Protocols]\r
   gEfiBdsArchProtocolGuid\r
   gEfiBlockIoProtocolGuid\r
@@ -70,6 +71,6 @@
   gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths\r
-  \r
+\r
 [Depex]\r
   TRUE\r
index c2b91b8bad96aa705c12697c3519b2ac8b384879..12463194d0a6112476f960a2190ace9edf9a4a57 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 *\r
-*  Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
+*  Copyright (c) 2011-2013, 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
 \r
 #include "BdsInternal.h"\r
 \r
+#include <Guid/ArmGlobalVariableHob.h>\r
+\r
 extern EFI_HANDLE mImageHandle;\r
 extern BDS_LOAD_OPTION_SUPPORT *BdsLoadOptionSupportList;\r
 \r
+\r
 EFI_STATUS\r
 SelectBootDevice (\r
   OUT BDS_SUPPORTED_DEVICE** SupportedBootDevice\r
@@ -102,7 +105,7 @@ SelectBootDevice (
     }\r
     Index++;\r
   }\r
-  \r
+\r
 EXIT:\r
   BootDeviceListSupportedFree (&SupportedDeviceList, *SupportedBootDevice);\r
   return Status;\r
@@ -185,7 +188,7 @@ BootMenuAddBootOption (
     InitrdSize = GetDevicePathSize (InitrdPath);\r
 \r
     BootArguments = (ARM_BDS_LOADER_ARGUMENTS*)AllocatePool (sizeof(ARM_BDS_LOADER_ARGUMENTS) + CmdLineSize + InitrdSize);\r
-    \r
+\r
     BootArguments->LinuxArguments.CmdLineSize = CmdLineSize;\r
     BootArguments->LinuxArguments.InitrdSize = InitrdSize;\r
     CopyMem ((VOID*)(&BootArguments->LinuxArguments + 1), CmdLine, CmdLineSize);\r
@@ -211,7 +214,7 @@ BootMenuAddBootOption (
 FREE_DEVICE_PATH:\r
   FreePool (DevicePath);\r
 \r
-  \r
+\r
 EXIT:\r
   if (Status == EFI_ABORTED) {\r
     Print(L"\n");\r
@@ -439,7 +442,7 @@ BootMenuUpdateBootOption (
       InitrdSize = 0;\r
     }\r
 \r
-    Print(L"Arguments to pass to the binary: "); \r
+    Print(L"Arguments to pass to the binary: ");\r
     if (CmdLineSize > 0) {\r
       AsciiStrnCpy(CmdLine, (CONST CHAR8*)(LinuxArguments + 1), CmdLineSize);\r
     } else {\r
@@ -511,10 +514,22 @@ UpdateFdtPath (
     // Append the Device Path node to the select device path\r
     FdtDevicePath = AppendDevicePathNode (SupportedBootDevice->DevicePathProtocol, FdtDevicePathNode);\r
     FdtDevicePathSize = GetDevicePathSize (FdtDevicePath);\r
-    Status = gRT->SetVariable ((CHAR16*)L"Fdt", &gEfiGlobalVariableGuid, (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS ), FdtDevicePathSize, FdtDevicePath);\r
+    Status = gRT->SetVariable (\r
+                    (CHAR16*)L"Fdt",\r
+                    &gArmGlobalVariableGuid,\r
+                    EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
+                    FdtDevicePathSize,\r
+                    FdtDevicePath\r
+                    );\r
     ASSERT_EFI_ERROR(Status);\r
   } else {\r
-    gRT->SetVariable ((CHAR16*)L"Fdt", &gEfiGlobalVariableGuid, (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS ), 0, NULL);\r
+    gRT->SetVariable (\r
+           (CHAR16*)L"Fdt",\r
+           &gArmGlobalVariableGuid,\r
+           EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
+           0,\r
+           NULL\r
+           );\r
     ASSERT_EFI_ERROR(Status);\r
   }\r
 \r