From c3b6d97563982940a2af26671c371998684a2fd9 Mon Sep 17 00:00:00 2001 From: Olivier Martin Date: Fri, 1 Aug 2014 18:33:17 +0000 Subject: ArmPlatformPkg: Removed the global ImageHandle when UefiBootServicesTableLib is included UefiBootServicesTableLib already defines gImageHandle that has been initialized with the value of ImageHandle. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15737 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/Bds/Bds.c | 4 ---- ArmPlatformPkg/Bds/BootMenu.c | 3 +-- ArmPlatformPkg/Bds/BootOption.c | 8 +++----- 3 files changed, 4 insertions(+), 11 deletions(-) (limited to 'ArmPlatformPkg/Bds') diff --git a/ArmPlatformPkg/Bds/Bds.c b/ArmPlatformPkg/Bds/Bds.c index 6a5cd7a603..e2f97307f6 100644 --- a/ArmPlatformPkg/Bds/Bds.c +++ b/ArmPlatformPkg/Bds/Bds.c @@ -21,8 +21,6 @@ #define EFI_SET_TIMER_TO_SECOND 10000000 -EFI_HANDLE mImageHandle; - STATIC EFI_STATUS GetConsoleDevicePathFromVariable ( @@ -542,8 +540,6 @@ BdsInitialize ( { EFI_STATUS Status; - mImageHandle = ImageHandle; - Status = gBS->InstallMultipleProtocolInterfaces ( &ImageHandle, &gEfiBdsArchProtocolGuid, &gBdsProtocol, diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c index b96a1c3f92..42212385a8 100644 --- a/ArmPlatformPkg/Bds/BootMenu.c +++ b/ArmPlatformPkg/Bds/BootMenu.c @@ -16,7 +16,6 @@ #include -extern EFI_HANDLE mImageHandle; extern BDS_LOAD_OPTION_SUPPORT *BdsLoadOptionSupportList; /** @@ -954,7 +953,7 @@ BootShell ( EFI_STATUS Status; // Start EFI Shell - Status = BdsLoadApplication (mImageHandle, L"Shell", 0, NULL); + Status = BdsLoadApplication (gImageHandle, L"Shell", 0, NULL); if (Status == EFI_NOT_FOUND) { Print (L"Error: EFI Application not found.\n"); } else if (EFI_ERROR(Status)) { diff --git a/ArmPlatformPkg/Bds/BootOption.c b/ArmPlatformPkg/Bds/BootOption.c index 52c9d831b7..aa8be74bc9 100644 --- a/ArmPlatformPkg/Bds/BootOption.c +++ b/ArmPlatformPkg/Bds/BootOption.c @@ -1,6 +1,6 @@ /** @file * -* Copyright (c) 2011-2013, ARM Limited. All rights reserved. +* Copyright (c) 2011-2014, 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,8 +15,6 @@ #include #include "BdsInternal.h" -extern EFI_HANDLE mImageHandle; - EFI_STATUS BootOptionStart ( IN BDS_LOAD_OPTION *BootOption @@ -46,7 +44,7 @@ BootOptionStart ( BdsConnectAllDrivers (); } - Status = BdsStartEfiApplication (mImageHandle, BootOption->FilePathList, 0, NULL); + Status = BdsStartEfiApplication (gImageHandle, BootOption->FilePathList, 0, NULL); } else if (LoaderType == BDS_LOADER_KERNEL_LINUX_ATAG) { LinuxArguments = &(OptionalData->Arguments.LinuxArguments); CmdLineSize = ReadUnaligned16 ((CONST UINT16*)&LinuxArguments->CmdLineSize); @@ -103,7 +101,7 @@ BootOptionStart ( EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, LoadOptionIndexSize, &(BootOption->LoadOptionIndex)); - Status = BdsStartEfiApplication (mImageHandle, BootOption->FilePathList, BootOption->OptionalDataSize, BootOption->OptionalData); + Status = BdsStartEfiApplication (gImageHandle, BootOption->FilePathList, BootOption->OptionalDataSize, BootOption->OptionalData); // Clear BootCurrent variable LoadOptionIndexSize = sizeof(UINT16); -- cgit v1.2.3