mirror of https://github.com/acidanthera/audk.git
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 <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15737 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d8162fb5aa
commit
c3b6d97563
|
@ -440,8 +440,6 @@ ArmAndroidFastbootPlatformEntryPoint (
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
IN EFI_SYSTEM_TABLE *SystemTable
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
gImageHandle = ImageHandle;
|
|
||||||
|
|
||||||
return gBS->InstallProtocolInterface (
|
return gBS->InstallProtocolInterface (
|
||||||
&ImageHandle,
|
&ImageHandle,
|
||||||
&gAndroidFastbootPlatformProtocolGuid,
|
&gAndroidFastbootPlatformProtocolGuid,
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
|
|
||||||
#define EFI_SET_TIMER_TO_SECOND 10000000
|
#define EFI_SET_TIMER_TO_SECOND 10000000
|
||||||
|
|
||||||
EFI_HANDLE mImageHandle;
|
|
||||||
|
|
||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
GetConsoleDevicePathFromVariable (
|
GetConsoleDevicePathFromVariable (
|
||||||
|
@ -542,8 +540,6 @@ BdsInitialize (
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
mImageHandle = ImageHandle;
|
|
||||||
|
|
||||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
&ImageHandle,
|
&ImageHandle,
|
||||||
&gEfiBdsArchProtocolGuid, &gBdsProtocol,
|
&gEfiBdsArchProtocolGuid, &gBdsProtocol,
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
#include <Guid/ArmGlobalVariableHob.h>
|
#include <Guid/ArmGlobalVariableHob.h>
|
||||||
|
|
||||||
extern EFI_HANDLE mImageHandle;
|
|
||||||
extern BDS_LOAD_OPTION_SUPPORT *BdsLoadOptionSupportList;
|
extern BDS_LOAD_OPTION_SUPPORT *BdsLoadOptionSupportList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -954,7 +953,7 @@ BootShell (
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
// Start EFI Shell
|
// Start EFI Shell
|
||||||
Status = BdsLoadApplication (mImageHandle, L"Shell", 0, NULL);
|
Status = BdsLoadApplication (gImageHandle, L"Shell", 0, NULL);
|
||||||
if (Status == EFI_NOT_FOUND) {
|
if (Status == EFI_NOT_FOUND) {
|
||||||
Print (L"Error: EFI Application not found.\n");
|
Print (L"Error: EFI Application not found.\n");
|
||||||
} else if (EFI_ERROR(Status)) {
|
} else if (EFI_ERROR(Status)) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/** @file
|
/** @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
|
* This program and the accompanying materials
|
||||||
* are licensed and made available under the terms and conditions of the BSD License
|
* are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
@ -15,8 +15,6 @@
|
||||||
#include <Guid/ArmGlobalVariableHob.h>
|
#include <Guid/ArmGlobalVariableHob.h>
|
||||||
#include "BdsInternal.h"
|
#include "BdsInternal.h"
|
||||||
|
|
||||||
extern EFI_HANDLE mImageHandle;
|
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BootOptionStart (
|
BootOptionStart (
|
||||||
IN BDS_LOAD_OPTION *BootOption
|
IN BDS_LOAD_OPTION *BootOption
|
||||||
|
@ -46,7 +44,7 @@ BootOptionStart (
|
||||||
BdsConnectAllDrivers ();
|
BdsConnectAllDrivers ();
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = BdsStartEfiApplication (mImageHandle, BootOption->FilePathList, 0, NULL);
|
Status = BdsStartEfiApplication (gImageHandle, BootOption->FilePathList, 0, NULL);
|
||||||
} else if (LoaderType == BDS_LOADER_KERNEL_LINUX_ATAG) {
|
} else if (LoaderType == BDS_LOADER_KERNEL_LINUX_ATAG) {
|
||||||
LinuxArguments = &(OptionalData->Arguments.LinuxArguments);
|
LinuxArguments = &(OptionalData->Arguments.LinuxArguments);
|
||||||
CmdLineSize = ReadUnaligned16 ((CONST UINT16*)&LinuxArguments->CmdLineSize);
|
CmdLineSize = ReadUnaligned16 ((CONST UINT16*)&LinuxArguments->CmdLineSize);
|
||||||
|
@ -103,7 +101,7 @@ BootOptionStart (
|
||||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||||
LoadOptionIndexSize, &(BootOption->LoadOptionIndex));
|
LoadOptionIndexSize, &(BootOption->LoadOptionIndex));
|
||||||
|
|
||||||
Status = BdsStartEfiApplication (mImageHandle, BootOption->FilePathList, BootOption->OptionalDataSize, BootOption->OptionalData);
|
Status = BdsStartEfiApplication (gImageHandle, BootOption->FilePathList, BootOption->OptionalDataSize, BootOption->OptionalData);
|
||||||
|
|
||||||
// Clear BootCurrent variable
|
// Clear BootCurrent variable
|
||||||
LoadOptionIndexSize = sizeof(UINT16);
|
LoadOptionIndexSize = sizeof(UINT16);
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include "BootMonFsInternal.h"
|
#include "BootMonFsInternal.h"
|
||||||
|
|
||||||
EFI_DEVICE_PATH* mBootMonFsSupportedDevicePaths;
|
EFI_DEVICE_PATH* mBootMonFsSupportedDevicePaths;
|
||||||
EFI_HANDLE mImageHandle;
|
|
||||||
LIST_ENTRY mInstances;
|
LIST_ENTRY mInstances;
|
||||||
|
|
||||||
EFI_FILE_PROTOCOL mBootMonFsRootTemplate = {
|
EFI_FILE_PROTOCOL mBootMonFsRootTemplate = {
|
||||||
|
@ -217,7 +216,7 @@ BootMonFsDriverSupported (
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
&gEfiDiskIoProtocolGuid,
|
&gEfiDiskIoProtocolGuid,
|
||||||
(VOID **) &DiskIo,
|
(VOID **) &DiskIo,
|
||||||
mImageHandle,
|
gImageHandle,
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||||
);
|
);
|
||||||
|
@ -231,7 +230,7 @@ BootMonFsDriverSupported (
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
&gEfiDiskIoProtocolGuid,
|
&gEfiDiskIoProtocolGuid,
|
||||||
mImageHandle,
|
gImageHandle,
|
||||||
ControllerHandle
|
ControllerHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -240,7 +239,7 @@ BootMonFsDriverSupported (
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
&gEfiBlockIoProtocolGuid,
|
&gEfiBlockIoProtocolGuid,
|
||||||
NULL,
|
NULL,
|
||||||
mImageHandle,
|
gImageHandle,
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||||
);
|
);
|
||||||
|
@ -253,7 +252,7 @@ BootMonFsDriverSupported (
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
&gEfiDevicePathProtocolGuid,
|
&gEfiDevicePathProtocolGuid,
|
||||||
(VOID **)&DevicePathProtocol,
|
(VOID **)&DevicePathProtocol,
|
||||||
mImageHandle,
|
gImageHandle,
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||||
);
|
);
|
||||||
|
@ -277,7 +276,7 @@ BootMonFsDriverSupported (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gBS->CloseProtocol (ControllerHandle, &gEfiDevicePathProtocolGuid, mImageHandle, ControllerHandle);
|
gBS->CloseProtocol (ControllerHandle, &gEfiDevicePathProtocolGuid, gImageHandle, ControllerHandle);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,7 +302,7 @@ BootMonFsDriverStart (
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
&gEfiBlockIoProtocolGuid,
|
&gEfiBlockIoProtocolGuid,
|
||||||
(VOID **)&(Instance->BlockIo),
|
(VOID **)&(Instance->BlockIo),
|
||||||
mImageHandle,
|
gImageHandle,
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||||
);
|
);
|
||||||
|
@ -316,7 +315,7 @@ BootMonFsDriverStart (
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
&gEfiDiskIoProtocolGuid,
|
&gEfiDiskIoProtocolGuid,
|
||||||
(VOID **)&(Instance->DiskIo),
|
(VOID **)&(Instance->DiskIo),
|
||||||
mImageHandle,
|
gImageHandle,
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||||
);
|
);
|
||||||
|
@ -360,7 +359,7 @@ BootMonFsDriverStart (
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
&gEfiDevicePathProtocolGuid,
|
&gEfiDevicePathProtocolGuid,
|
||||||
(VOID **)&(Instance->DevicePath),
|
(VOID **)&(Instance->DevicePath),
|
||||||
mImageHandle,
|
gImageHandle,
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||||
);
|
);
|
||||||
|
@ -459,7 +458,6 @@ BootMonFsEntryPoint (
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
mImageHandle = ImageHandle;
|
|
||||||
InitializeListHead (&mInstances);
|
InitializeListHead (&mInstances);
|
||||||
|
|
||||||
// Initialize the list of Device Paths that could support BootMonFs
|
// Initialize the list of Device Paths that could support BootMonFs
|
||||||
|
|
|
@ -23,8 +23,6 @@
|
||||||
|
|
||||||
BOOLEAN gConsolePresent = FALSE;
|
BOOLEAN gConsolePresent = FALSE;
|
||||||
|
|
||||||
|
|
||||||
EFI_HANDLE mBdsImageHandle = NULL;
|
|
||||||
EFI_BDS_ARCH_PROTOCOL gBdsProtocol = {
|
EFI_BDS_ARCH_PROTOCOL gBdsProtocol = {
|
||||||
BdsEntry,
|
BdsEntry,
|
||||||
};
|
};
|
||||||
|
@ -228,13 +226,11 @@ BdsInitialize (
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
mBdsImageHandle = ImageHandle;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Install protocol interface
|
// Install protocol interface
|
||||||
//
|
//
|
||||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
&mBdsImageHandle,
|
&ImageHandle,
|
||||||
&gEfiBdsArchProtocolGuid, &gBdsProtocol,
|
&gEfiBdsArchProtocolGuid, &gBdsProtocol,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue