]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Bds/BootOption.c
ArmPlatformPkg/Bds: Remove any use of the "Fdt" UEFI variable
[mirror_edk2.git] / ArmPlatformPkg / Bds / BootOption.c
index 80982222e160fad51cc14805622ed4ff5a67f04f..889040e3b63a26be25245ba9954f3b0fc4676a57 100644 (file)
@@ -21,13 +21,9 @@ BootOptionStart (
   )\r
 {\r
   EFI_STATUS                            Status;\r
-  EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL*   EfiDevicePathFromTextProtocol;\r
   UINT32                                LoaderType;\r
   ARM_BDS_LOADER_OPTIONAL_DATA*         OptionalData;\r
   ARM_BDS_LINUX_ARGUMENTS*              LinuxArguments;\r
-  EFI_DEVICE_PATH_PROTOCOL*             FdtDevicePath;\r
-  EFI_DEVICE_PATH_PROTOCOL*             DefaultFdtDevicePath;\r
-  UINTN                                 FdtDevicePathSize;\r
   UINTN                                 CmdLineSize;\r
   UINTN                                 InitrdSize;\r
   EFI_DEVICE_PATH*                      Initrd;\r
@@ -69,25 +65,11 @@ BootOptionStart (
       } else {\r
         Initrd = NULL;\r
       }\r
-\r
-      // Get the default FDT device path\r
-      Status = gBS->LocateProtocol (&gEfiDevicePathFromTextProtocolGuid, NULL, (VOID **)&EfiDevicePathFromTextProtocol);\r
-      ASSERT_EFI_ERROR(Status);\r
-      DefaultFdtDevicePath = EfiDevicePathFromTextProtocol->ConvertTextToDevicePath ((CHAR16*)PcdGetPtr(PcdFdtDevicePath));\r
-\r
-      // Get the FDT device path\r
-      FdtDevicePathSize = GetDevicePathSize (DefaultFdtDevicePath);\r
-      Status = GetEnvironmentVariable ((CHAR16 *)L"Fdt", &gArmGlobalVariableGuid,\r
-                 DefaultFdtDevicePath, &FdtDevicePathSize, (VOID **)&FdtDevicePath);\r
-      ASSERT_EFI_ERROR(Status);\r
-\r
-      Status = BdsBootLinuxFdt (BootOption->FilePathList,\r
-                                Initrd, // Initrd\r
-                                (CHAR8*)(LinuxArguments + 1),\r
-                                FdtDevicePath);\r
-\r
-      FreePool (DefaultFdtDevicePath);\r
-      FreePool (FdtDevicePath);\r
+      Status = BdsBootLinuxFdt (\r
+                 BootOption->FilePathList,\r
+                 Initrd,\r
+                 (CHAR8*)(LinuxArguments + 1)\r
+                 );\r
     }\r
   } else {\r
     // Connect all the drivers if the EFI Application is not a EFI OS Loader\r