ArmPlatformPkg/Bds: Do not start all devices when starting an OS loader

EFI OS Loader application will be responsible to start their needed drivers.
While other EFI applications (eg: EFI Shell) expect to have all their drivers
started when they run.

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@15458 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Olivier Martin 2014-04-11 11:02:59 +00:00 committed by oliviermartin
parent 3b3b72d62b
commit 4c8bb1eb3b
1 changed files with 9 additions and 2 deletions

View File

@ -41,8 +41,10 @@ BootOptionStart (
LoaderType = ReadUnaligned32 ((CONST UINT32*)&OptionalData->Header.LoaderType);
if (LoaderType == BDS_LOADER_EFI_APPLICATION) {
if ((BootOption->Attributes & LOAD_OPTION_CATEGORY_BOOT) == 0) {
// Need to connect every drivers to ensure no dependencies are missing for the application
BdsConnectAllDrivers ();
}
Status = BdsStartEfiApplication (mImageHandle, BootOption->FilePathList, 0, NULL);
} else if (LoaderType == BDS_LOADER_KERNEL_LINUX_ATAG) {
@ -90,6 +92,11 @@ BootOptionStart (
FreePool (FdtDevicePath);
}
} else {
// Connect all the drivers if the EFI Application is not a EFI OS Loader
if ((BootOption->Attributes & LOAD_OPTION_CATEGORY_BOOT) == 0) {
BdsConnectAllDrivers ();
}
// Set BootCurrent variable
LoadOptionIndexSize = sizeof(UINT16);
gRT->SetVariable (L"BootCurrent", &gEfiGlobalVariableGuid,