]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/Bds: Do not start all devices when starting an OS loader
authorOlivier Martin <olivier.martin@arm.com>
Fri, 11 Apr 2014 11:02:59 +0000 (11:02 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 11 Apr 2014 11:02:59 +0000 (11:02 +0000)
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

ArmPlatformPkg/Bds/BootOption.c

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