]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Bds/BootOption.c
ArmPlatformPkg: Removed the global ImageHandle when UefiBootServicesTableLib is included
[mirror_edk2.git] / ArmPlatformPkg / Bds / BootOption.c
index 52c9d831b77bab7963ec90abdc8c9eb5830022ab..aa8be74bc9b6376b5cfa97d4b5c86c4812d82317 100644 (file)
@@ -1,6 +1,6 @@
 /** @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
@@ -15,8 +15,6 @@
 #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
@@ -46,7 +44,7 @@ BootOptionStart (
         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
@@ -103,7 +101,7 @@ BootOptionStart (
               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