diff options
author | Olivier Martin <olivier.martin@arm.com> | 2014-04-11 11:02:59 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-04-11 11:02:59 +0000 |
commit | 4c8bb1eb3bd7b40010924f23824a9e8d91af015c (patch) | |
tree | 2d0c681c8e2e47da92a40b0a8fd1fb09b0c64530 /ArmPlatformPkg/Bds | |
parent | 3b3b72d62bccf43d51fb1cac81a465aade973a8a (diff) | |
download | edk2-4c8bb1eb3bd7b40010924f23824a9e8d91af015c.tar.gz edk2-4c8bb1eb3bd7b40010924f23824a9e8d91af015c.tar.bz2 edk2-4c8bb1eb3bd7b40010924f23824a9e8d91af015c.zip |
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
Diffstat (limited to 'ArmPlatformPkg/Bds')
-rw-r--r-- | ArmPlatformPkg/Bds/BootOption.c | 11 |
1 files changed, 9 insertions, 2 deletions
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,
|