From 4c8bb1eb3bd7b40010924f23824a9e8d91af015c Mon Sep 17 00:00:00 2001 From: Olivier Martin Date: Fri, 11 Apr 2014 11:02:59 +0000 Subject: 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 git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15458 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/Bds/BootOption.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'ArmPlatformPkg') diff --git a/ArmPlatformPkg/Bds/BootOption.c b/ArmPlatformPkg/Bds/BootOption.c index 6f84ed9b63..52c9d831b7 100644 --- a/ArmPlatformPkg/Bds/BootOption.c +++ b/ArmPlatformPkg/Bds/BootOption.c @@ -41,8 +41,10 @@ BootOptionStart ( LoaderType = ReadUnaligned32 ((CONST UINT32*)&OptionalData->Header.LoaderType); if (LoaderType == BDS_LOADER_EFI_APPLICATION) { - // Need to connect every drivers to ensure no dependencies are missing for the application - BdsConnectAllDrivers(); + 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, -- cgit v1.2.3