Revision: 14176
          http://edk2.svn.sourceforge.net/edk2/?rev=14176&view=rev
Author:   oliviermartin
Date:     2013-03-12 00:42:59 +0000 (Tue, 12 Mar 2013)
Log Message:
-----------
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 <[email protected]>

Modified Paths:
--------------
    trunk/edk2/ArmPkg/Application/LinuxLoader/LinuxConfig.c
    trunk/edk2/ArmPkg/Include/Library/BdsLib.h
    trunk/edk2/ArmPkg/Library/BdsLib/BdsHelper.c
    trunk/edk2/ArmPkg/Library/BdsLib/BdsLib.inf
    trunk/edk2/ArmPkg/Library/BdsLib/BdsLoadOption.c
    trunk/edk2/ArmPlatformPkg/Bds/Bds.c
    trunk/edk2/ArmPlatformPkg/Bds/BdsInternal.h
    trunk/edk2/ArmPlatformPkg/Bds/BootOption.c
    trunk/edk2/ArmPlatformPkg/Include/Guid/ArmGlobalVariableHob.h
    trunk/edk2/ArmPlatformPkg/Library/EblCmdLib/EblCmdFdt.c

Modified: trunk/edk2/ArmPkg/Application/LinuxLoader/LinuxConfig.c
===================================================================
--- trunk/edk2/ArmPkg/Application/LinuxLoader/LinuxConfig.c     2013-03-12 
00:41:52 UTC (rev 14175)
+++ trunk/edk2/ArmPkg/Application/LinuxLoader/LinuxConfig.c     2013-03-12 
00:42:59 UTC (rev 14176)
@@ -1,15 +1,15 @@
 /** @file
 *
-*  Copyright (c) 2011-2012, 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         
-*  which accompanies this distribution.  The full text of the license may be 
found at        
-*  http://opensource.org/licenses/bsd-license.php                              
              
+*  Copyright (c) 2011-2013, ARM Limited. All rights reserved.
 *
-*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,       
              
-*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.             
+*  This program and the accompanying materials
+*  are licensed and made available under the terms and conditions of the BSD 
License
+*  which accompanies this distribution.  The full text of the license may be 
found at
+*  http://opensource.org/licenses/bsd-license.php
 *
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.
+*
 **/
 
 #include "LinuxInternal.h"
@@ -204,7 +204,7 @@
     Choice = LINUX_LOADER_NEW;
 
     // Scan the OptionalData of every entry for the correct signature
-    Status = GetEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, 
(VOID**)&BootOrder);
+    Status = GetGlobalEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, 
(VOID**)&BootOrder);
     if (!EFI_ERROR(Status)) {
       BootOrderCount = BootOrderSize / sizeof(UINT16);
 

Modified: trunk/edk2/ArmPkg/Include/Library/BdsLib.h
===================================================================
--- trunk/edk2/ArmPkg/Include/Library/BdsLib.h  2013-03-12 00:41:52 UTC (rev 
14175)
+++ trunk/edk2/ArmPkg/Include/Library/BdsLib.h  2013-03-12 00:42:59 UTC (rev 
14176)
@@ -1,15 +1,15 @@
 /** @file
 *
-*  Copyright (c) 2011, 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         
-*  which accompanies this distribution.  The full text of the license may be 
found at        
-*  http://opensource.org/licenses/bsd-license.php                              
              
+*  Copyright (c) 2013, ARM Limited. All rights reserved.
 *
-*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,       
              
-*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.             
+*  This program and the accompanying materials
+*  are licensed and made available under the terms and conditions of the BSD 
License
+*  which accompanies this distribution.  The full text of the license may be 
found at
+*  http://opensource.org/licenses/bsd-license.php
 *
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.
+*
 **/
 
 #ifndef __BDS_ENTRY_H__
@@ -67,8 +67,17 @@
   );
 
 EFI_STATUS
+GetGlobalEnvironmentVariable (
+  IN     CONST CHAR16*   VariableName,
+  IN     VOID*           DefaultValue,
+  IN OUT UINTN*          Size,
+  OUT    VOID**          Value
+  );
+
+EFI_STATUS
 GetEnvironmentVariable (
   IN     CONST CHAR16*   VariableName,
+  IN     EFI_GUID*       VendorGuid,
   IN     VOID*           DefaultValue,
   IN OUT UINTN*          Size,
   OUT    VOID**          Value

Modified: trunk/edk2/ArmPkg/Library/BdsLib/BdsHelper.c
===================================================================
--- trunk/edk2/ArmPkg/Library/BdsLib/BdsHelper.c        2013-03-12 00:41:52 UTC 
(rev 14175)
+++ trunk/edk2/ArmPkg/Library/BdsLib/BdsHelper.c        2013-03-12 00:42:59 UTC 
(rev 14176)
@@ -1,15 +1,15 @@
 /** @file
 *
-*  Copyright (c) 2011-2012, 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         
-*  which accompanies this distribution.  The full text of the license may be 
found at        
-*  http://opensource.org/licenses/bsd-license.php                              
              
+*  Copyright (c) 2011-2013, ARM Limited. All rights reserved.
 *
-*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,       
              
-*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.             
+*  This program and the accompanying materials
+*  are licensed and made available under the terms and conditions of the BSD 
License
+*  which accompanies this distribution.  The full text of the license may be 
found at
+*  http://opensource.org/licenses/bsd-license.php
 *
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.
+*
 **/
 
 #include "BdsInternal.h"
@@ -294,8 +294,21 @@
 }
 
 EFI_STATUS
+GetGlobalEnvironmentVariable (
+  IN     CONST CHAR16*   VariableName,
+  IN     VOID*           DefaultValue,
+  IN OUT UINTN*          Size,
+  OUT    VOID**          Value
+  )
+{
+  return GetEnvironmentVariable (VariableName, &gEfiGlobalVariableGuid,
+           DefaultValue, Size, Value);
+}
+
+EFI_STATUS
 GetEnvironmentVariable (
   IN     CONST CHAR16*   VariableName,
+  IN     EFI_GUID*       VendorGuid,
   IN     VOID*           DefaultValue,
   IN OUT UINTN*          Size,
   OUT    VOID**          Value
@@ -307,13 +320,13 @@
   // Try to get the variable size.
   *Value = NULL;
   VariableSize = 0;
-  Status = gRT->GetVariable ((CHAR16 *) VariableName, &gEfiGlobalVariableGuid, 
NULL, &VariableSize, *Value);
+  Status = gRT->GetVariable ((CHAR16 *) VariableName, VendorGuid, NULL, 
&VariableSize, *Value);
   if (Status == EFI_NOT_FOUND) {
     if ((DefaultValue != NULL) && (Size != NULL) && (*Size != 0)) {
       // If the environment variable does not exist yet then set it with the 
default value
       Status = gRT->SetVariable (
                     (CHAR16*)VariableName,
-                    &gEfiGlobalVariableGuid,
+                    VendorGuid,
                     EFI_VARIABLE_NON_VOLATILE | 
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
                     *Size,
                     DefaultValue
@@ -329,7 +342,7 @@
       return EFI_OUT_OF_RESOURCES;
     }
 
-    Status = gRT->GetVariable ((CHAR16 *)VariableName, 
&gEfiGlobalVariableGuid, NULL, &VariableSize, *Value);
+    Status = gRT->GetVariable ((CHAR16 *)VariableName, VendorGuid, NULL, 
&VariableSize, *Value);
     if (EFI_ERROR (Status)) {
       FreePool(*Value);
       return EFI_INVALID_PARAMETER;

Modified: trunk/edk2/ArmPkg/Library/BdsLib/BdsLib.inf
===================================================================
--- trunk/edk2/ArmPkg/Library/BdsLib/BdsLib.inf 2013-03-12 00:41:52 UTC (rev 
14175)
+++ trunk/edk2/ArmPkg/Library/BdsLib/BdsLib.inf 2013-03-12 00:42:59 UTC (rev 
14176)
@@ -49,6 +49,7 @@
 [Guids]
   gEfiFileInfoGuid
   gArmMpCoreInfoGuid
+  gArmGlobalVariableGuid
 
 [Protocols]
   gEfiBdsArchProtocolGuid                       

Modified: trunk/edk2/ArmPkg/Library/BdsLib/BdsLoadOption.c
===================================================================
--- trunk/edk2/ArmPkg/Library/BdsLib/BdsLoadOption.c    2013-03-12 00:41:52 UTC 
(rev 14175)
+++ trunk/edk2/ArmPkg/Library/BdsLib/BdsLoadOption.c    2013-03-12 00:42:59 UTC 
(rev 14176)
@@ -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
@@ -76,7 +76,7 @@
   EFI_LOAD_OPTION       EfiLoadOption;
   UINTN                 EfiLoadOptionSize;
 
-  Status = GetEnvironmentVariable (BootVariableName, NULL, &EfiLoadOptionSize, 
(VOID**)&EfiLoadOption);
+  Status = GetGlobalEnvironmentVariable (BootVariableName, NULL, 
&EfiLoadOptionSize, (VOID**)&EfiLoadOption);
   if (!EFI_ERROR(Status)) {
     *BdsLoadOption = NULL;
     Status = BootOptionParseLoadOption (EfiLoadOption, EfiLoadOptionSize, 
BdsLoadOption);
@@ -203,7 +203,7 @@
   // When it is a new entry we must add the entry to the BootOrder
   if (OldLoadOption == NULL) {
     // 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
@@ -225,7 +225,7 @@
         );
     DEBUG((EFI_D_ERROR,"Create %s\n",BootVariableName));
 
-    // Free memory allocated by GetEnvironmentVariable
+    // Free memory allocated by GetGlobalEnvironmentVariable
     if (!EFI_ERROR(Status)) {
       FreePool (BootOrder);
     }
@@ -249,7 +249,7 @@
   BOOLEAN           Found;
 
   // 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)) {
     for (BootIndex = 0; BootIndex <= 0xFFFF; BootIndex++) {
       Found = FALSE;

Modified: trunk/edk2/ArmPlatformPkg/Bds/Bds.c
===================================================================
--- trunk/edk2/ArmPlatformPkg/Bds/Bds.c 2013-03-12 00:41:52 UTC (rev 14175)
+++ trunk/edk2/ArmPlatformPkg/Bds/Bds.c 2013-03-12 00:42:59 UTC (rev 14176)
@@ -1,15 +1,15 @@
 /** @file
 *
-*  Copyright (c) 2011-2012, 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         
-*  which accompanies this distribution.  The full text of the license may be 
found at        
-*  http://opensource.org/licenses/bsd-license.php                              
              
+*  Copyright (c) 2011-2013, ARM Limited. All rights reserved.
 *
-*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,       
              
-*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.             
+*  This program and the accompanying materials
+*  are licensed and made available under the terms and conditions of the BSD 
License
+*  which accompanies this distribution.  The full text of the license may be 
found at
+*  http://opensource.org/licenses/bsd-license.php
 *
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.
+*
 **/
 
 #include "BdsInternal.h"
@@ -39,7 +39,7 @@
   CHAR16*                   NextDevicePathStr;
   EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL  *EfiDevicePathFromTextProtocol;
 
-  Status = GetEnvironmentVariable (ConsoleVarName, NULL, NULL, 
(VOID**)&DevicePathInstances);
+  Status = GetGlobalEnvironmentVariable (ConsoleVarName, NULL, NULL, 
(VOID**)&DevicePathInstances);
   if (EFI_ERROR(Status)) {
     // In case no default console device path has been defined we assume a 
driver handles the console (eg: SimpleTextInOutSerial)
     if ((DefaultConsolePaths == NULL) || (DefaultConsolePaths[0] == L'\0')) {
@@ -124,7 +124,7 @@
         EFI_DEVICE_PATH_TO_TEXT_PROTOCOL* DevicePathToTextProtocol;
         CHAR16* DevicePathTxt;
         EFI_STATUS Status;
-       
+
         Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, 
(VOID **)&DevicePathToTextProtocol);
         if (!EFI_ERROR(Status)) {
           DevicePathTxt = DevicePathToTextProtocol->ConvertDevicePathToText 
(DevicePath, TRUE, TRUE);
@@ -313,7 +313,7 @@
   Size = sizeof(UINT16);
   Timeout = (UINT16)PcdGet16 (PcdPlatformBootTimeOut);
   TimeoutPtr = &Timeout;
-  GetEnvironmentVariable (L"Timeout", &Timeout, &Size, (VOID**)&TimeoutPtr);
+  GetGlobalEnvironmentVariable (L"Timeout", &Timeout, &Size, 
(VOID**)&TimeoutPtr);
 
   if (Timeout != 0xFFFF) {
     if (Timeout > 0) {
@@ -344,7 +344,7 @@
     // In case of Timeout we start the default boot selection
     if (Timeout == 0) {
       // Get the Boot Option Order from the environment variable (a default 
value should have been created)
-      GetEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, 
(VOID**)&BootOrder);
+      GetGlobalEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, 
(VOID**)&BootOrder);
 
       for (Index = 0; Index < BootOrderSize / sizeof (UINT16); Index++) {
         UnicodeSPrint (BootVariableName, 9 * sizeof(CHAR16), L"Boot%04X", 
BootOrder[Index]);
@@ -362,19 +362,19 @@
 }
 
 /**
-  This function uses policy data from the platform to determine what operating 
-  system or system utility should be loaded and invoked.  This function call 
-  also optionally make the use of user input to determine the operating system 
-  or system utility to be loaded and invoked.  When the DXE Core has 
dispatched 
-  all the drivers on the dispatch queue, this function is called.  This 
-  function will attempt to connect the boot devices required to load and 
invoke 
-  the selected operating system or system utility.  During this process, 
-  additional firmware volumes may be discovered that may contain addition DXE 
-  drivers that can be dispatched by the DXE Core.   If a boot device cannot be 
-  fully connected, this function calls the DXE Service Dispatch() to allow the 
-  DXE drivers from any newly discovered firmware volumes to be dispatched.  
-  Then the boot device connection can be attempted again.  If the same boot 
-  device connection operation fails twice in a row, then that boot device has 
+  This function uses policy data from the platform to determine what operating
+  system or system utility should be loaded and invoked.  This function call
+  also optionally make the use of user input to determine the operating system
+  or system utility to be loaded and invoked.  When the DXE Core has dispatched
+  all the drivers on the dispatch queue, this function is called.  This
+  function will attempt to connect the boot devices required to load and invoke
+  the selected operating system or system utility.  During this process,
+  additional firmware volumes may be discovered that may contain addition DXE
+  drivers that can be dispatched by the DXE Core.   If a boot device cannot be
+  fully connected, this function calls the DXE Service Dispatch() to allow the
+  DXE drivers from any newly discovered firmware volumes to be dispatched.
+  Then the boot device connection can be attempted again.  If the same boot
+  device connection operation fails twice in a row, then that boot device has
   failed, and should be skipped.  This function should never return.
 
   @param  This             The EFI_BDS_ARCH_PROTOCOL instance.
@@ -408,7 +408,7 @@
 
   // If BootNext environment variable is defined then we just load it !
   BootNextSize = sizeof(UINT16);
-  Status = GetEnvironmentVariable (L"BootNext", NULL, &BootNextSize, 
(VOID**)&BootNext);
+  Status = GetGlobalEnvironmentVariable (L"BootNext", NULL, &BootNextSize, 
(VOID**)&BootNext);
   if (!EFI_ERROR(Status)) {
     ASSERT(BootNextSize == sizeof(UINT16));
 

Modified: trunk/edk2/ArmPlatformPkg/Bds/BdsInternal.h
===================================================================
--- trunk/edk2/ArmPlatformPkg/Bds/BdsInternal.h 2013-03-12 00:41:52 UTC (rev 
14175)
+++ trunk/edk2/ArmPlatformPkg/Bds/BdsInternal.h 2013-03-12 00:42:59 UTC (rev 
14176)
@@ -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
@@ -54,7 +54,7 @@
 typedef struct {
   UINT16                     CmdLineSize;
   UINT16                     InitrdSize;
-  
+
   // These following fields have variable length and are packed:
   //CHAR8                      *CmdLine;
   //EFI_DEVICE_PATH_PROTOCOL   *InitrdPathList;
@@ -108,14 +108,6 @@
 #define LOAD_OPTION_FROM_LINK(a)        ((BDS_LOAD_OPTION_ENTRY*)BASE_CR(a, 
BDS_LOAD_OPTION_ENTRY, Link))->BdsLoadOption
 
 EFI_STATUS
-GetEnvironmentVariable (
-  IN     CONST CHAR16*   VariableName,
-  IN     VOID*           DefaultValue,
-  IN OUT UINTN*          Size,
-  OUT    VOID**          Value
-  );
-
-EFI_STATUS
 BootDeviceListSupportedInit (
   IN OUT LIST_ENTRY *SupportedDeviceList
   );

Modified: trunk/edk2/ArmPlatformPkg/Bds/BootOption.c
===================================================================
--- trunk/edk2/ArmPlatformPkg/Bds/BootOption.c  2013-03-12 00:41:52 UTC (rev 
14175)
+++ trunk/edk2/ArmPlatformPkg/Bds/BootOption.c  2013-03-12 00:42:59 UTC (rev 
14176)
@@ -12,6 +12,7 @@
 *
 **/
 
+#include <Guid/ArmGlobalVariableHob.h>
 #include "BdsInternal.h"
 
 extern EFI_HANDLE mImageHandle;
@@ -76,7 +77,8 @@
 
       // 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 @@
   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 @@
       );
 
   // 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 @@
   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);
 

Modified: trunk/edk2/ArmPlatformPkg/Include/Guid/ArmGlobalVariableHob.h
===================================================================
--- trunk/edk2/ArmPlatformPkg/Include/Guid/ArmGlobalVariableHob.h       
2013-03-12 00:41:52 UTC (rev 14175)
+++ trunk/edk2/ArmPlatformPkg/Include/Guid/ArmGlobalVariableHob.h       
2013-03-12 00:42:59 UTC (rev 14176)
@@ -1,6 +1,6 @@
 /** @file
 *
-*  Copyright (c) 2011, 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
@@ -15,6 +15,9 @@
 #ifndef __ARM_GLOBAL_VARIABLE_GUID_H__
 #define __ARM_GLOBAL_VARIABLE_GUID_H__
 
+#include <Pi/PiBootMode.h>
+#include <Pi/PiHob.h>
+
 #define ARM_HOB_GLOBAL_VARIABLE_GUID  \
   { 0xc3253c90, 0xa24f, 0x4599, { 0xa6, 0x64, 0x1f, 0x88, 0x13, 0x77, 0x8f, 
0xc9} };
 

Modified: trunk/edk2/ArmPlatformPkg/Library/EblCmdLib/EblCmdFdt.c
===================================================================
--- trunk/edk2/ArmPlatformPkg/Library/EblCmdLib/EblCmdFdt.c     2013-03-12 
00:41:52 UTC (rev 14175)
+++ trunk/edk2/ArmPlatformPkg/Library/EblCmdLib/EblCmdFdt.c     2013-03-12 
00:42:59 UTC (rev 14176)
@@ -1,15 +1,15 @@
 /** @file
 *
-*  Copyright (c) 2011-2012, 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         
-*  which accompanies this distribution.  The full text of the license may be 
found at        
-*  http://opensource.org/licenses/bsd-license.php                              
              
+*  Copyright (c) 2011-2013, ARM Limited. All rights reserved.
 *
-*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,       
              
-*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.             
+*  This program and the accompanying materials
+*  are licensed and made available under the terms and conditions of the BSD 
License
+*  which accompanies this distribution.  The full text of the license may be 
found at
+*  http://opensource.org/licenses/bsd-license.php
 *
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.
+*
 **/
 
 #include <Base.h>
@@ -26,7 +26,7 @@
 
 #include <Protocol/DevicePathFromText.h>
 
-#include <Guid/GlobalVariable.h>
+#include <Guid/ArmGlobalVariableHob.h>
 
 #include <libfdt.h>
 
@@ -187,7 +187,7 @@
 
   // If no FDT file is passed to the argument then get the one from the 
platform
   if (Argc < 2) {
-    Status = GetEnvironmentVariable (L"Fdt",NULL,NULL,(VOID**)&FdtDevicePath);
+    Status = GetEnvironmentVariable (L"Fdt", &gArmGlobalVariableGuid, NULL, 
NULL, (VOID**)&FdtDevicePath);
     if (Status == EFI_NOT_FOUND) {
       // No set yet, get the Default Device Path
       Status = gBS->LocateProtocol (&gEfiDevicePathFromTextProtocolGuid, NULL, 
(VOID **)&EfiDevicePathFromTextProtocol);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to