summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/Bds/Bds.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/Bds.c
parent7135d76d56ae96ba2fc05d0f0369b2b54ce0b05f (diff)
downloadedk2-c0b2e4775dcb06d9016f17f5d22e6276d9b58397.tar.gz
edk2-c0b2e4775dcb06d9016f17f5d22e6276d9b58397.tar.bz2
edk2-c0b2e4775dcb06d9016f17f5d22e6276d9b58397.zip
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/Bds.c')
-rw-r--r--ArmPlatformPkg/Bds/Bds.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/ArmPlatformPkg/Bds/Bds.c b/ArmPlatformPkg/Bds/Bds.c
index 11a76de90f..fadba6e7a5 100644
--- a/ArmPlatformPkg/Bds/Bds.c
+++ b/ArmPlatformPkg/Bds/Bds.c
@@ -1,14 +1,14 @@
/** @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.
*
**/
@@ -39,7 +39,7 @@ GetConsoleDevicePathFromVariable (
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 @@ InitializeConsolePipe (
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 @@ StartDefaultBootOnTimeout (
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 @@ StartDefaultBootOnTimeout (
// 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 @@ StartDefaultBootOnTimeout (
}
/**
- 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 @@ BdsEntry (
// 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));