]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg: Introduce GetGlobalEnvironmentVariable() function.
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 12 Mar 2013 00:42:59 +0000 (00:42 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 12 Mar 2013 00:42:59 +0000 (00:42 +0000)
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

ArmPkg/Application/LinuxLoader/LinuxConfig.c
ArmPkg/Include/Library/BdsLib.h
ArmPkg/Library/BdsLib/BdsHelper.c
ArmPkg/Library/BdsLib/BdsLib.inf
ArmPkg/Library/BdsLib/BdsLoadOption.c
ArmPlatformPkg/Bds/Bds.c
ArmPlatformPkg/Bds/BdsInternal.h
ArmPlatformPkg/Bds/BootOption.c
ArmPlatformPkg/Include/Guid/ArmGlobalVariableHob.h
ArmPlatformPkg/Library/EblCmdLib/EblCmdFdt.c

index 273fecd2d9a0fb39be22c1f39c696bf7f62cb38e..10aadb7335f5e33f900ec855d77a0f5d61bf2559 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 *\r
-*  Copyright (c) 2011-2012, 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) 2011-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
@@ -204,7 +204,7 @@ LinuxLoaderConfig (
     Choice = LINUX_LOADER_NEW;\r
 \r
     // Scan the OptionalData of every entry for the correct signature\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
index c8e02c934eadb641365380f0f522e6ffcee20dfe..d16748da46f32818517a34585c3f150b524880c0 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,9 +66,18 @@ BdsConnectAllDrivers (
   VOID\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
 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
index 5016bedcd48e9dc9bd0dbc794503051d51db3a90..fb2ac9b8062ea5df9ef391ad519197664c52f88e 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 *\r
-*  Copyright (c) 2011-2012, 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) 2011-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
@@ -293,9 +293,22 @@ PrintPerformance (
   SerialPortWrite ((UINT8 *) Buffer, CharCount);\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
+  return GetEnvironmentVariable (VariableName, &gEfiGlobalVariableGuid,\r
+           DefaultValue, Size, Value);\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
@@ -307,13 +320,13 @@ GetEnvironmentVariable (
   // Try to get the variable size.\r
   *Value = NULL;\r
   VariableSize = 0;\r
-  Status = gRT->GetVariable ((CHAR16 *) VariableName, &gEfiGlobalVariableGuid, NULL, &VariableSize, *Value);\r
+  Status = gRT->GetVariable ((CHAR16 *) VariableName, VendorGuid, NULL, &VariableSize, *Value);\r
   if (Status == EFI_NOT_FOUND) {\r
     if ((DefaultValue != NULL) && (Size != NULL) && (*Size != 0)) {\r
       // If the environment variable does not exist yet then set it with the default value\r
       Status = gRT->SetVariable (\r
                     (CHAR16*)VariableName,\r
-                    &gEfiGlobalVariableGuid,\r
+                    VendorGuid,\r
                     EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
                     *Size,\r
                     DefaultValue\r
@@ -329,7 +342,7 @@ GetEnvironmentVariable (
       return EFI_OUT_OF_RESOURCES;\r
     }\r
 \r
-    Status = gRT->GetVariable ((CHAR16 *)VariableName, &gEfiGlobalVariableGuid, NULL, &VariableSize, *Value);\r
+    Status = gRT->GetVariable ((CHAR16 *)VariableName, VendorGuid, NULL, &VariableSize, *Value);\r
     if (EFI_ERROR (Status)) {\r
       FreePool(*Value);\r
       return EFI_INVALID_PARAMETER;\r
index 541bce88bd4e26d0e567b47c2ce080e4af706aa3..d9439d983aa16fa5e84227c19568e31ed72588e0 100644 (file)
@@ -49,6 +49,7 @@
 [Guids]\r
   gEfiFileInfoGuid\r
   gArmMpCoreInfoGuid\r
+  gArmGlobalVariableGuid\r
 \r
 [Protocols]\r
   gEfiBdsArchProtocolGuid                       \r
index 3f4566ffab133e06396d896213274e2d5bd89ad6..be5ed41980a325177414fea9f2b9ea9884b77bab 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
@@ -76,7 +76,7 @@ BootOptionFromLoadOptionVariable (
   EFI_LOAD_OPTION       EfiLoadOption;\r
   UINTN                 EfiLoadOptionSize;\r
 \r
-  Status = GetEnvironmentVariable (BootVariableName, NULL, &EfiLoadOptionSize, (VOID**)&EfiLoadOption);\r
+  Status = GetGlobalEnvironmentVariable (BootVariableName, NULL, &EfiLoadOptionSize, (VOID**)&EfiLoadOption);\r
   if (!EFI_ERROR(Status)) {\r
     *BdsLoadOption = NULL;\r
     Status = BootOptionParseLoadOption (EfiLoadOption, EfiLoadOptionSize, BdsLoadOption);\r
@@ -203,7 +203,7 @@ BootOptionToLoadOptionVariable (
   // When it is a new entry we must add the entry to the BootOrder\r
   if (OldLoadOption == NULL) {\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
@@ -225,7 +225,7 @@ BootOptionToLoadOptionVariable (
         );\r
     DEBUG((EFI_D_ERROR,"Create %s\n",BootVariableName));\r
 \r
-    // Free memory allocated by GetEnvironmentVariable\r
+    // Free memory allocated by GetGlobalEnvironmentVariable\r
     if (!EFI_ERROR(Status)) {\r
       FreePool (BootOrder);\r
     }\r
@@ -249,7 +249,7 @@ BootOptionAllocateBootIndex (
   BOOLEAN           Found;\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
     for (BootIndex = 0; BootIndex <= 0xFFFF; BootIndex++) {\r
       Found = FALSE;\r
index 11a76de90f139092d4ba046b34858c832b43e937..fadba6e7a5c89f79acbd495c08fbe36bec717f37 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 *\r
-*  Copyright (c) 2011-2012, 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) 2011-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
@@ -39,7 +39,7 @@ GetConsoleDevicePathFromVariable (
   CHAR16*                   NextDevicePathStr;\r
   EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL  *EfiDevicePathFromTextProtocol;\r
 \r
-  Status = GetEnvironmentVariable (ConsoleVarName, NULL, NULL, (VOID**)&DevicePathInstances);\r
+  Status = GetGlobalEnvironmentVariable (ConsoleVarName, NULL, NULL, (VOID**)&DevicePathInstances);\r
   if (EFI_ERROR(Status)) {\r
     // In case no default console device path has been defined we assume a driver handles the console (eg: SimpleTextInOutSerial)\r
     if ((DefaultConsolePaths == NULL) || (DefaultConsolePaths[0] == L'\0')) {\r
@@ -124,7 +124,7 @@ InitializeConsolePipe (
         EFI_DEVICE_PATH_TO_TEXT_PROTOCOL* DevicePathToTextProtocol;\r
         CHAR16* DevicePathTxt;\r
         EFI_STATUS Status;\r
-       \r
+\r
         Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, (VOID **)&DevicePathToTextProtocol);\r
         if (!EFI_ERROR(Status)) {\r
           DevicePathTxt = DevicePathToTextProtocol->ConvertDevicePathToText (DevicePath, TRUE, TRUE);\r
@@ -313,7 +313,7 @@ StartDefaultBootOnTimeout (
   Size = sizeof(UINT16);\r
   Timeout = (UINT16)PcdGet16 (PcdPlatformBootTimeOut);\r
   TimeoutPtr = &Timeout;\r
-  GetEnvironmentVariable (L"Timeout", &Timeout, &Size, (VOID**)&TimeoutPtr);\r
+  GetGlobalEnvironmentVariable (L"Timeout", &Timeout, &Size, (VOID**)&TimeoutPtr);\r
 \r
   if (Timeout != 0xFFFF) {\r
     if (Timeout > 0) {\r
@@ -344,7 +344,7 @@ StartDefaultBootOnTimeout (
     // In case of Timeout we start the default boot selection\r
     if (Timeout == 0) {\r
       // Get the Boot Option Order from the environment variable (a default value should have been created)\r
-      GetEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);\r
+      GetGlobalEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);\r
 \r
       for (Index = 0; Index < BootOrderSize / sizeof (UINT16); Index++) {\r
         UnicodeSPrint (BootVariableName, 9 * sizeof(CHAR16), L"Boot%04X", BootOrder[Index]);\r
@@ -362,19 +362,19 @@ StartDefaultBootOnTimeout (
 }\r
 \r
 /**\r
-  This function uses policy data from the platform to determine what operating \r
-  system or system utility should be loaded and invoked.  This function call \r
-  also optionally make the use of user input to determine the operating system \r
-  or system utility to be loaded and invoked.  When the DXE Core has dispatched \r
-  all the drivers on the dispatch queue, this function is called.  This \r
-  function will attempt to connect the boot devices required to load and invoke \r
-  the selected operating system or system utility.  During this process, \r
-  additional firmware volumes may be discovered that may contain addition DXE \r
-  drivers that can be dispatched by the DXE Core.   If a boot device cannot be \r
-  fully connected, this function calls the DXE Service Dispatch() to allow the \r
-  DXE drivers from any newly discovered firmware volumes to be dispatched.  \r
-  Then the boot device connection can be attempted again.  If the same boot \r
-  device connection operation fails twice in a row, then that boot device has \r
+  This function uses policy data from the platform to determine what operating\r
+  system or system utility should be loaded and invoked.  This function call\r
+  also optionally make the use of user input to determine the operating system\r
+  or system utility to be loaded and invoked.  When the DXE Core has dispatched\r
+  all the drivers on the dispatch queue, this function is called.  This\r
+  function will attempt to connect the boot devices required to load and invoke\r
+  the selected operating system or system utility.  During this process,\r
+  additional firmware volumes may be discovered that may contain addition DXE\r
+  drivers that can be dispatched by the DXE Core.   If a boot device cannot be\r
+  fully connected, this function calls the DXE Service Dispatch() to allow the\r
+  DXE drivers from any newly discovered firmware volumes to be dispatched.\r
+  Then the boot device connection can be attempted again.  If the same boot\r
+  device connection operation fails twice in a row, then that boot device has\r
   failed, and should be skipped.  This function should never return.\r
 \r
   @param  This             The EFI_BDS_ARCH_PROTOCOL instance.\r
@@ -408,7 +408,7 @@ BdsEntry (
 \r
   // If BootNext environment variable is defined then we just load it !\r
   BootNextSize = sizeof(UINT16);\r
-  Status = GetEnvironmentVariable (L"BootNext", NULL, &BootNextSize, (VOID**)&BootNext);\r
+  Status = GetGlobalEnvironmentVariable (L"BootNext", NULL, &BootNextSize, (VOID**)&BootNext);\r
   if (!EFI_ERROR(Status)) {\r
     ASSERT(BootNextSize == sizeof(UINT16));\r
 \r
index 1307e2ae6832398e22a81281467018caa94d5be8..426d61e3cf28e8cfd96e7460f40687fb34a8ee48 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
@@ -54,7 +54,7 @@ typedef enum {
 typedef struct {\r
   UINT16                     CmdLineSize;\r
   UINT16                     InitrdSize;\r
-  \r
+\r
   // These following fields have variable length and are packed:\r
   //CHAR8                      *CmdLine;\r
   //EFI_DEVICE_PATH_PROTOCOL   *InitrdPathList;\r
@@ -107,14 +107,6 @@ typedef struct _BDS_LOAD_OPTION_SUPPORT {
 #define LOAD_OPTION_ENTRY_FROM_LINK(a)  BASE_CR(a, BDS_LOAD_OPTION_ENTRY, Link)\r
 #define LOAD_OPTION_FROM_LINK(a)        ((BDS_LOAD_OPTION_ENTRY*)BASE_CR(a, BDS_LOAD_OPTION_ENTRY, Link))->BdsLoadOption\r
 \r
-EFI_STATUS\r
-GetEnvironmentVariable (\r
-  IN     CONST CHAR16*   VariableName,\r
-  IN     VOID*           DefaultValue,\r
-  IN OUT UINTN*          Size,\r
-  OUT    VOID**          Value\r
-  );\r
-\r
 EFI_STATUS\r
 BootDeviceListSupportedInit (\r
   IN OUT LIST_ENTRY *SupportedDeviceList\r
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
index f61036840d1dcbf220246f1ac14af8c46c2c7c08..c175cee6df4c30d463f367fd7d76255e88bb79e4 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 *\r
-*  Copyright (c) 2011, 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
@@ -15,6 +15,9 @@
 #ifndef __ARM_GLOBAL_VARIABLE_GUID_H__\r
 #define __ARM_GLOBAL_VARIABLE_GUID_H__\r
 \r
+#include <Pi/PiBootMode.h>\r
+#include <Pi/PiHob.h>\r
+\r
 #define ARM_HOB_GLOBAL_VARIABLE_GUID  \\r
   { 0xc3253c90, 0xa24f, 0x4599, { 0xa6, 0x64, 0x1f, 0x88, 0x13, 0x77, 0x8f, 0xc9} };\r
 \r
index 5da71cff2b4aee70928e1711b8626cfc38b4dc0a..dcd7c41001c46aa77dcfe66ad1c476f1404ff05c 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 *\r
-*  Copyright (c) 2011-2012, 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) 2011-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
@@ -26,7 +26,7 @@
 \r
 #include <Protocol/DevicePathFromText.h>\r
 \r
-#include <Guid/GlobalVariable.h>\r
+#include <Guid/ArmGlobalVariableHob.h>\r
 \r
 #include <libfdt.h>\r
 \r
@@ -187,7 +187,7 @@ EblDumpFdt (
 \r
   // If no FDT file is passed to the argument then get the one from the platform\r
   if (Argc < 2) {\r
-    Status = GetEnvironmentVariable (L"Fdt",NULL,NULL,(VOID**)&FdtDevicePath);\r
+    Status = GetEnvironmentVariable (L"Fdt", &gArmGlobalVariableGuid, NULL, NULL, (VOID**)&FdtDevicePath);\r
     if (Status == EFI_NOT_FOUND) {\r
       // No set yet, get the Default Device Path\r
       Status = gBS->LocateProtocol (&gEfiDevicePathFromTextProtocolGuid, NULL, (VOID **)&EfiDevicePathFromTextProtocol);\r