/** @file\r
*\r
-* Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
+* Copyright (c) 2011-2014, 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
#include <Guid/ArmGlobalVariableHob.h>\r
#include "BdsInternal.h"\r
\r
-extern EFI_HANDLE mImageHandle;\r
-\r
EFI_STATUS\r
BootOptionStart (\r
IN BDS_LOAD_OPTION *BootOption\r
LoaderType = ReadUnaligned32 ((CONST UINT32*)&OptionalData->Header.LoaderType);\r
\r
if (LoaderType == BDS_LOADER_EFI_APPLICATION) {\r
- if ((BootOption->Attributes & LOAD_OPTION_CATEGORY_BOOT) == 0) {\r
+ if ((BootOption->Attributes & LOAD_OPTION_CATEGORY) == LOAD_OPTION_CATEGORY_APP) {\r
// Need to connect every drivers to ensure no dependencies are missing for the application\r
BdsConnectAllDrivers ();\r
}\r
\r
- Status = BdsStartEfiApplication (mImageHandle, BootOption->FilePathList, 0, NULL);\r
+ Status = BdsStartEfiApplication (gImageHandle, BootOption->FilePathList, 0, NULL);\r
} else if (LoaderType == BDS_LOADER_KERNEL_LINUX_ATAG) {\r
LinuxArguments = &(OptionalData->Arguments.LinuxArguments);\r
CmdLineSize = ReadUnaligned16 ((CONST UINT16*)&LinuxArguments->CmdLineSize);\r
}\r
} else {\r
// Connect all the drivers if the EFI Application is not a EFI OS Loader\r
- if ((BootOption->Attributes & LOAD_OPTION_CATEGORY_BOOT) == 0) {\r
+ if ((BootOption->Attributes & LOAD_OPTION_CATEGORY) == LOAD_OPTION_CATEGORY_APP) {\r
BdsConnectAllDrivers ();\r
}\r
\r
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
LoadOptionIndexSize, &(BootOption->LoadOptionIndex));\r
\r
- Status = BdsStartEfiApplication (mImageHandle, BootOption->FilePathList, BootOption->OptionalDataSize, BootOption->OptionalData);\r
+ Status = BdsStartEfiApplication (gImageHandle, BootOption->FilePathList, BootOption->OptionalDataSize, BootOption->OptionalData);\r
\r
// Clear BootCurrent variable\r
LoadOptionIndexSize = sizeof(UINT16);\r