]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/Bds: Remove any use of the "Fdt" UEFI variable
authorRonald Cron <Ronald.Cron@arm.com>
Thu, 26 Feb 2015 11:02:39 +0000 (11:02 +0000)
committeroliviermartin <oliviermartin@Edk2>
Thu, 26 Feb 2015 11:02:39 +0000 (11:02 +0000)
Remove the option to update the "Fdt" UEFI variable in the ARM BDS as
the "setfdt" EFI Shell command provides this service from now.

Remove the use of this variable in the legacy kernel boot loader and
use the FDT installed in the configuration table instead.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ronald Cron <Ronald.Cron@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16940 6f19259b-4bc3-4df7-8a09-765794883524

22 files changed:
ArmPkg/Application/LinuxLoader/LinuxFdtLoader.c
ArmPkg/Include/Library/BdsLib.h
ArmPkg/Library/BdsLib/AArch64/BdsLinuxLoader.c
ArmPkg/Library/BdsLib/Arm/BdsLinuxLoader.c
ArmPkg/Library/BdsLib/BdsLib.inf
ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc
ArmPlatformPkg/ArmPlatformPkg.dec
ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA15-A7.dsc
ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc
ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.dsc
ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A9x4.dsc
ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-AEMv8Ax4-foundation.dsc
ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-AEMv8Ax4.dsc
ArmPlatformPkg/Bds/Bds.inf
ArmPlatformPkg/Bds/BootMenu.c
ArmPlatformPkg/Bds/BootOption.c
ArmPlatformPkg/Documentation/ArmPlatformPkg.txt
ArmPlatformPkg/Library/EblCmdLib/EblCmdFdt.c
ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.inf
BeagleBoardPkg/BeagleBoardPkg.dsc
EmbeddedPkg/Application/AndroidFastboot/Arm/BootAndroidBootImg.c

index 07d0ea7b4120e735d61fb47b47c862dba77d9576..8e5d1c6aa0f87743ff8a5d9f84c73b80f5f346b4 100644 (file)
@@ -39,7 +39,6 @@ UefiMain (
   EFI_LOADED_IMAGE_PROTOCOL   *LoadedImage;\r
   LINUX_LOADER_OPTIONAL_DATA*  LinuxOptionalData;\r
   EFI_DEVICE_PATH*             DevicePathKernel;\r
   EFI_LOADED_IMAGE_PROTOCOL   *LoadedImage;\r
   LINUX_LOADER_OPTIONAL_DATA*  LinuxOptionalData;\r
   EFI_DEVICE_PATH*             DevicePathKernel;\r
-  EFI_DEVICE_PATH*             DevicePathFdt;\r
   EFI_DEVICE_PATH*             InitrdDevicePath;\r
   CHAR16*                      OptionalDataInitrd;\r
   CHAR8*                       OptionalDataArguments;\r
   EFI_DEVICE_PATH*             InitrdDevicePath;\r
   CHAR16*                      OptionalDataInitrd;\r
   CHAR8*                       OptionalDataArguments;\r
@@ -57,9 +56,8 @@ UefiMain (
       return EFI_UNSUPPORTED;\r
     }\r
 \r
       return EFI_UNSUPPORTED;\r
     }\r
 \r
-    // Generate the File Path Node for the Linux Kernel & Device Tree blob\r
+    // Generate the File Path Node for the Linux Kernel\r
     DevicePathKernel = FileDevicePath (LoadedImage->DeviceHandle, LINUX_KERNEL_NAME);\r
     DevicePathKernel = FileDevicePath (LoadedImage->DeviceHandle, LINUX_KERNEL_NAME);\r
-    DevicePathFdt    = FileDevicePath (LoadedImage->DeviceHandle, FDT_NAME);\r
 \r
     if (LinuxOptionalData->CmdLineLength > 0) {\r
       OptionalDataArguments = (CHAR8*)LinuxOptionalData + sizeof(LINUX_LOADER_OPTIONAL_DATA);\r
 \r
     if (LinuxOptionalData->CmdLineLength > 0) {\r
       OptionalDataArguments = (CHAR8*)LinuxOptionalData + sizeof(LINUX_LOADER_OPTIONAL_DATA);\r
@@ -89,7 +87,7 @@ UefiMain (
     }\r
 \r
     // Load and Start the Linux Kernel (we should never return)\r
     }\r
 \r
     // Load and Start the Linux Kernel (we should never return)\r
-    Status = BdsBootLinuxFdt (DevicePathKernel, InitrdDevicePath, OptionalDataArguments, DevicePathFdt);\r
+    Status = BdsBootLinuxFdt (DevicePathKernel, InitrdDevicePath, OptionalDataArguments);\r
 \r
     if ((UINTN)OptionalDataInitrd & 0x1) {\r
       FreePool (Initrd);\r
 \r
     if ((UINTN)OptionalDataInitrd & 0x1) {\r
       FreePool (Initrd);\r
index 9fa687041860f2f74dbdcac2c9af6b676280d237..68dbfd57f2154149ef1bb7d5c99c721ad44da11b 100644 (file)
@@ -160,9 +160,9 @@ BdsBootLinuxAtag (
 /**\r
   Start a Linux kernel from a Device Path\r
 \r
 /**\r
   Start a Linux kernel from a Device Path\r
 \r
-  @param  LinuxKernel           Device Path to the Linux Kernel\r
-  @param  Parameters            Linux kernel arguments\r
-  @param  Fdt                   Device Path to the Flat Device Tree\r
+  @param[in]  LinuxKernelDevicePath  Device Path to the Linux Kernel\r
+  @param[in]  InitrdDevicePath       Device Path to the Initrd\r
+  @param[in]  Arguments              Linux kernel arguments\r
 \r
   @retval EFI_SUCCESS           All drivers have been connected\r
   @retval EFI_NOT_FOUND         The Linux kernel Device Path has not been found\r
 \r
   @retval EFI_SUCCESS           All drivers have been connected\r
   @retval EFI_NOT_FOUND         The Linux kernel Device Path has not been found\r
@@ -173,8 +173,7 @@ EFI_STATUS
 BdsBootLinuxFdt (\r
   IN  EFI_DEVICE_PATH_PROTOCOL* LinuxKernelDevicePath,\r
   IN  EFI_DEVICE_PATH_PROTOCOL* InitrdDevicePath,\r
 BdsBootLinuxFdt (\r
   IN  EFI_DEVICE_PATH_PROTOCOL* LinuxKernelDevicePath,\r
   IN  EFI_DEVICE_PATH_PROTOCOL* InitrdDevicePath,\r
-  IN  CONST CHAR8*              Arguments,\r
-  IN  EFI_DEVICE_PATH_PROTOCOL* FdtDevicePath\r
+  IN  CONST CHAR8*              Arguments\r
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
index e094413a53b83db914032619abf67d34b734dbf6..76515978fc9948ffb9068245be64a5f72a3c94fd 100644 (file)
@@ -14,6 +14,8 @@
 #include <Library/ArmGicLib.h>\r
 #include <Ppi/ArmMpCoreInfo.h>\r
 #include <Library/IoLib.h>\r
 #include <Library/ArmGicLib.h>\r
 #include <Ppi/ArmMpCoreInfo.h>\r
 #include <Library/IoLib.h>\r
+#include <Guid/Fdt.h>\r
+#include <libfdt.h>\r
 \r
 #include "BdsInternal.h"\r
 #include "BdsLinuxLoader.h"\r
 \r
 #include "BdsInternal.h"\r
 #include "BdsLinuxLoader.h"\r
@@ -171,9 +173,9 @@ BdsBootLinuxAtag (
 /**\r
   Start a Linux kernel from a Device Path\r
 \r
 /**\r
   Start a Linux kernel from a Device Path\r
 \r
-  @param  LinuxKernel           Device Path to the Linux Kernel\r
-  @param  Parameters            Linux kernel agruments\r
-  @param  Fdt                   Device Path to the Flat Device Tree\r
+  @param[in]  LinuxKernelDevicePath  Device Path to the Linux Kernel\r
+  @param[in]  InitrdDevicePath       Device Path to the Initrd\r
+  @param[in]  Arguments              Linux kernel arguments\r
 \r
   @retval EFI_SUCCESS           All drivers have been connected\r
   @retval EFI_NOT_FOUND         The Linux kernel Device Path has not been found\r
 \r
   @retval EFI_SUCCESS           All drivers have been connected\r
   @retval EFI_NOT_FOUND         The Linux kernel Device Path has not been found\r
@@ -184,26 +186,26 @@ EFI_STATUS
 BdsBootLinuxFdt (\r
   IN  EFI_DEVICE_PATH_PROTOCOL* LinuxKernelDevicePath,\r
   IN  EFI_DEVICE_PATH_PROTOCOL* InitrdDevicePath,\r
 BdsBootLinuxFdt (\r
   IN  EFI_DEVICE_PATH_PROTOCOL* LinuxKernelDevicePath,\r
   IN  EFI_DEVICE_PATH_PROTOCOL* InitrdDevicePath,\r
-  IN  CONST CHAR8*              Arguments,\r
-  IN  EFI_DEVICE_PATH_PROTOCOL* FdtDevicePath\r
+  IN  CONST CHAR8*              Arguments\r
   )\r
 {\r
   )\r
 {\r
-  EFI_STATUS            Status;\r
-  EFI_STATUS            PenBaseStatus;\r
-  UINTN                 LinuxImageSize;\r
-  UINTN                 InitrdImageSize;\r
-  UINTN                 InitrdImageBaseSize;\r
-  UINTN                 FdtBlobSize;\r
-  EFI_PHYSICAL_ADDRESS  FdtBlobBase;\r
-  EFI_PHYSICAL_ADDRESS  LinuxImage;\r
-  EFI_PHYSICAL_ADDRESS  InitrdImage;\r
-  EFI_PHYSICAL_ADDRESS  InitrdImageBase;\r
-  ARM_PROCESSOR_TABLE   *ArmProcessorTable;\r
-  ARM_CORE_INFO         *ArmCoreInfoTable;\r
-  UINTN                 Index;\r
-  EFI_PHYSICAL_ADDRESS  PenBase;\r
-  UINTN                 PenSize;\r
-  UINTN                 MailBoxBase;\r
+  EFI_STATUS               Status;\r
+  EFI_STATUS               PenBaseStatus;\r
+  UINTN                    LinuxImageSize;\r
+  UINTN                    InitrdImageSize;\r
+  UINTN                    InitrdImageBaseSize;\r
+  VOID                     *InstalledFdtBase;\r
+  UINTN                    FdtBlobSize;\r
+  EFI_PHYSICAL_ADDRESS     FdtBlobBase;\r
+  EFI_PHYSICAL_ADDRESS     LinuxImage;\r
+  EFI_PHYSICAL_ADDRESS     InitrdImage;\r
+  EFI_PHYSICAL_ADDRESS     InitrdImageBase;\r
+  ARM_PROCESSOR_TABLE      *ArmProcessorTable;\r
+  ARM_CORE_INFO            *ArmCoreInfoTable;\r
+  UINTN                    Index;\r
+  EFI_PHYSICAL_ADDRESS     PenBase;\r
+  UINTN                    PenSize;\r
+  UINTN                    MailBoxBase;\r
 \r
   PenBaseStatus = EFI_UNSUPPORTED;\r
   PenSize = 0;\r
 \r
   PenBaseStatus = EFI_UNSUPPORTED;\r
   PenSize = 0;\r
@@ -259,14 +261,18 @@ BdsBootLinuxFdt (
     }\r
   }\r
 \r
     }\r
   }\r
 \r
-  // Load the FDT binary from a device path.\r
-  // The FDT will be reloaded later to a more appropriate location for the Linux kernel.\r
-  FdtBlobBase = LINUX_KERNEL_MAX_OFFSET;\r
-  Status = BdsLoadImage (FdtDevicePath, AllocateMaxAddress, &FdtBlobBase, &FdtBlobSize);\r
-  if (EFI_ERROR(Status)) {\r
-    Print (L"ERROR: Did not find Device Tree blob (%r).\n", Status);\r
+  //\r
+  // Get the FDT from the Configuration Table.\r
+  // The FDT will be reloaded in PrepareFdt() to a more appropriate\r
+  // location for the Linux Kernel.\r
+  //\r
+  Status = EfiGetSystemConfigurationTable (&gFdtTableGuid, &InstalledFdtBase);\r
+  if (EFI_ERROR (Status)) {\r
+    Print (L"ERROR: Did not get the Device Tree blob (%r).\n", Status);\r
     goto EXIT_FREE_INITRD;\r
   }\r
     goto EXIT_FREE_INITRD;\r
   }\r
+  FdtBlobBase = (EFI_PHYSICAL_ADDRESS)InstalledFdtBase;\r
+  FdtBlobSize = fdt_totalsize (InstalledFdtBase);\r
 \r
   //\r
   // Install secondary core pens if the Power State Coordination Interface is not supported\r
 \r
   //\r
   // Install secondary core pens if the Power State Coordination Interface is not supported\r
index 42f301d9b9cd0f9158634191f265a0be40a929c4..e5fda081f8a93c0176fca9877d9a47fafa0b7fba 100644 (file)
@@ -12,6 +12,9 @@
 *\r
 **/\r
 \r
 *\r
 **/\r
 \r
+#include <Guid/Fdt.h>\r
+#include <libfdt.h>\r
+\r
 #include "BdsInternal.h"\r
 #include "BdsLinuxLoader.h"\r
 \r
 #include "BdsInternal.h"\r
 #include "BdsLinuxLoader.h"\r
 \r
@@ -222,9 +225,9 @@ EXIT_FREE_LINUX:
 /**\r
   Start a Linux kernel from a Device Path\r
 \r
 /**\r
   Start a Linux kernel from a Device Path\r
 \r
-  @param  LinuxKernel           Device Path to the Linux Kernel\r
-  @param  Parameters            Linux kernel arguments\r
-  @param  Fdt                   Device Path to the Flat Device Tree\r
+  @param  LinuxKernelDevicePath  Device Path to the Linux Kernel\r
+  @param  InitrdDevicePath       Device Path to the Initrd\r
+  @param  CommandLineArguments   Linux command line\r
 \r
   @retval EFI_SUCCESS           All drivers have been connected\r
   @retval EFI_NOT_FOUND         The Linux kernel Device Path has not been found\r
 \r
   @retval EFI_SUCCESS           All drivers have been connected\r
   @retval EFI_NOT_FOUND         The Linux kernel Device Path has not been found\r
@@ -235,19 +238,19 @@ EFI_STATUS
 BdsBootLinuxFdt (\r
   IN  EFI_DEVICE_PATH_PROTOCOL* LinuxKernelDevicePath,\r
   IN  EFI_DEVICE_PATH_PROTOCOL* InitrdDevicePath,\r
 BdsBootLinuxFdt (\r
   IN  EFI_DEVICE_PATH_PROTOCOL* LinuxKernelDevicePath,\r
   IN  EFI_DEVICE_PATH_PROTOCOL* InitrdDevicePath,\r
-  IN  CONST CHAR8*              CommandLineArguments,\r
-  IN  EFI_DEVICE_PATH_PROTOCOL* FdtDevicePath\r
+  IN  CONST CHAR8*              CommandLineArguments\r
   )\r
 {\r
   )\r
 {\r
-  EFI_STATUS            Status;\r
-  UINT32                LinuxImageSize;\r
-  UINT32                InitrdImageBaseSize = 0;\r
-  UINT32                InitrdImageSize = 0;\r
-  UINT32                FdtBlobSize;\r
-  EFI_PHYSICAL_ADDRESS  FdtBlobBase;\r
-  EFI_PHYSICAL_ADDRESS  LinuxImage;\r
-  EFI_PHYSICAL_ADDRESS  InitrdImageBase = 0;\r
-  EFI_PHYSICAL_ADDRESS  InitrdImage = 0;\r
+  EFI_STATUS               Status;\r
+  UINT32                   LinuxImageSize;\r
+  UINT32                   InitrdImageBaseSize = 0;\r
+  UINT32                   InitrdImageSize = 0;\r
+  VOID                     *InstalledFdtBase;\r
+  UINT32                   FdtBlobSize;\r
+  EFI_PHYSICAL_ADDRESS     FdtBlobBase;\r
+  EFI_PHYSICAL_ADDRESS     LinuxImage;\r
+  EFI_PHYSICAL_ADDRESS     InitrdImageBase = 0;\r
+  EFI_PHYSICAL_ADDRESS     InitrdImage = 0;\r
 \r
   PERF_START (NULL, "BDS", NULL, 0);\r
 \r
 \r
   PERF_START (NULL, "BDS", NULL, 0);\r
 \r
@@ -281,13 +284,18 @@ BdsBootLinuxFdt (
     }\r
   }\r
 \r
     }\r
   }\r
 \r
-  // Load the FDT binary from a device path. The FDT will be reloaded later to a more appropriate location for the Linux kernel.\r
-  FdtBlobBase = 0;\r
-  Status = BdsLoadImage (FdtDevicePath, AllocateAnyPages, &FdtBlobBase, &FdtBlobSize);\r
-  if (EFI_ERROR(Status)) {\r
-    Print (L"ERROR: Did not find Device Tree blob.\n");\r
+  //\r
+  // Get the FDT from the Configuration Table.\r
+  // The FDT will be reloaded in PrepareFdt() to a more appropriate\r
+  // location for the Linux Kernel.\r
+  //\r
+  Status = EfiGetSystemConfigurationTable (&gFdtTableGuid, &InstalledFdtBase);\r
+  if (EFI_ERROR (Status)) {\r
+    Print (L"ERROR: Did not get the Device Tree blob (%r).\n", Status);\r
     goto EXIT_FREE_INITRD;\r
   }\r
     goto EXIT_FREE_INITRD;\r
   }\r
+  FdtBlobBase = (EFI_PHYSICAL_ADDRESS)(UINTN)InstalledFdtBase;\r
+  FdtBlobSize = fdt_totalsize (InstalledFdtBase);\r
 \r
   // Update the Fdt with the Initrd information. The FDT will increase in size.\r
   // By setting address=0 we leave the memory allocation to the function\r
 \r
   // Update the Fdt with the Initrd information. The FDT will increase in size.\r
   // By setting address=0 we leave the memory allocation to the function\r
index 6d6a2dfa8ab5e8e8b2c41a684ff0ba1d0b0b8047..ecf6de52d06f9bdd50b485aa16a71cc62f216656 100644 (file)
   AArch64/BdsLinuxLoaderHelper.S\r
 \r
 [Packages]\r
   AArch64/BdsLinuxLoaderHelper.S\r
 \r
 [Packages]\r
-  MdePkg/MdePkg.dec\r
-  MdeModulePkg/MdeModulePkg.dec\r
   EmbeddedPkg/EmbeddedPkg.dec\r
   ArmPkg/ArmPkg.dec\r
   EmbeddedPkg/EmbeddedPkg.dec\r
   ArmPkg/ArmPkg.dec\r
+  MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
   ArmPlatformPkg/ArmPlatformPkg.dec\r
 \r
 [LibraryClasses]\r
   ArmPlatformPkg/ArmPlatformPkg.dec\r
 \r
 [LibraryClasses]\r
@@ -63,6 +63,7 @@
   gEfiFileInfoGuid\r
   gArmMpCoreInfoGuid\r
   gArmGlobalVariableGuid\r
   gEfiFileInfoGuid\r
   gArmMpCoreInfoGuid\r
   gArmGlobalVariableGuid\r
+  gFdtTableGuid\r
 \r
 [Protocols]\r
   gEfiBdsArchProtocolGuid\r
 \r
 [Protocols]\r
   gEfiBdsArchProtocolGuid\r
index 9b125289228b611117ecfba28c16dd5a8c2efc11..a260286eae44ce8feea3d1cf6ca8f1d882c3679b 100644 (file)
   #\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"Linux from NOR Flash"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)/Image"\r
   #\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"Linux from NOR Flash"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)/Image"\r
-  gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)/juno.dtb"\r
 \r
   # Support the Linux EFI stub by default\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|L"console=ttyAMA0,115200 earlycon=pl011,0x7ff80000 root=/dev/sda1 rootwait verbose debug"\r
 \r
   # Support the Linux EFI stub by default\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|L"console=ttyAMA0,115200 earlycon=pl011,0x7ff80000 root=/dev/sda1 rootwait verbose debug"\r
index 44597cefd83e7e98ffd8ae90eca48056a603ca61..9364bb92c5f022dc90435e465671690638448b95 100644 (file)
   #  - 1 = a Linux kernel with ATAG support\r
   #  - 2 = a Linux kernel with FDT support\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|0|UINT32|0x00000010\r
   #  - 1 = a Linux kernel with ATAG support\r
   #  - 2 = a Linux kernel with FDT support\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|0|UINT32|0x00000010\r
-  gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L""|VOID*|0x00000011\r
 \r
   ## Timeout value for displaying progressing bar in before boot OS.\r
   #  According to UEFI 2.0 spec, the default TimeOut should be 0xffff.\r
 \r
   ## Timeout value for displaying progressing bar in before boot OS.\r
   #  According to UEFI 2.0 spec, the default TimeOut should be 0xffff.\r
index e765617d692619d3b3bc497a733e200c3dbe0b40..c4bc514bee561409e0e4bcb54524323847d80c16 100644 (file)
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(1F15DA3C-37FF-4070-B471-BB4AF12A724A)/MemoryMapped(0x0,0xE000000,0xE800000)"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"console=ttyAMA0,38400 earlyprintk debug verbose"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(1F15DA3C-37FF-4070-B471-BB4AF12A724A)/MemoryMapped(0x0,0xE000000,0xE800000)"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"console=ttyAMA0,38400 earlyprintk debug verbose"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2\r
-  gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(1F15DA3C-37FF-4070-B471-BB4AF12A724A)/MemoryMapped(0x0,0x0E800000,0x0E803000)"\r
 \r
   # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)\r
   # PL111 - CLCD\r
 \r
   # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)\r
   # PL111 - CLCD\r
index f0c99dae9474993a00038886c7a24fae0193e283..d5d19461d4e5e17bc9737c8249879fc0804fb770 100644 (file)
   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|L"console=ttyAMA0 earlycon=pl011,0x1c090000 debug user_debug=31 loglevel=9"\r
   # Use EFI Stub\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|0\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|L"console=ttyAMA0 earlycon=pl011,0x1c090000 debug user_debug=31 loglevel=9"\r
   # Use EFI Stub\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|0\r
-  gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/fdt.dtb"\r
 \r
   # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"\r
 \r
   # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"\r
index 6c8498077792e39fda5a57578391d7cee0b11f88..1a7ff249904c46a8acd572309aca4a538f7dcf8c 100644 (file)
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"SemiHosting"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/zImage"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"SemiHosting"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/zImage"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2\r
-  gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/rtsm_ve-cortex_a15x1.dtb"\r
 \r
   # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"\r
 \r
   # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"\r
index 0021a0a2354bacf34721876d8b786bb825396395..e91cbb2f87eaf249f5a3bb9d15dc4497f596a95c 100644 (file)
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"SemiHosting"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/zImage"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"SemiHosting"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/zImage"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2\r
-  gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/rtsm_ve-cortex_a15x4.dtb"\r
 \r
   # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"\r
 \r
   # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"\r
index a13f443712a27448257c6b66a3d8fee9691bb52b..df82e597b5376134a85d3354ded2d35a33764b25 100644 (file)
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"SemiHosting"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/zImage"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"SemiHosting"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/zImage"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2\r
-  gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/rtsm_ve-cortex_a9x4.dtb"\r
 \r
   # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"\r
 \r
   # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"\r
index c05043533d0a3b9cfe7372e99855c36e52606fdc..c1cd6791d0003ea30038f5fbadaff702828eaac0 100644 (file)
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/Image"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"root=/dev/vda2 rw console=ttyAMA0 earlyprintk=pl011,0x1c090000 maxcpus=4 debug user_debug=31 loglevel=9"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/Image"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"root=/dev/vda2 rw console=ttyAMA0 earlyprintk=pl011,0x1c090000 maxcpus=4 debug user_debug=31 loglevel=9"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2\r
-  gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/foundation-v8.dtb"\r
 \r
   # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();"\r
 \r
   # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();"\r
   #\r
   # ARM Architectural Timer Frequency\r
   #\r
   #\r
   # ARM Architectural Timer Frequency\r
   #\r
-  # Set model tick to 100Mhz. This depends a lot on workstation performance.\r
+  # Set model tick to 100MHz. This depends a lot on workstation performance.\r
   gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|100000000\r
 \r
 [PcdsDynamicDefault.common]\r
   gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|100000000\r
 \r
 [PcdsDynamicDefault.common]\r
index 4d4c62555c8bf4659123923f1476898eaf61e2eb..eae58f610ec5347d24270b123444b428d73e8bb6 100644 (file)
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/Image"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"root=/dev/mmcblk0p2 console=ttyAMA0 earlyprintk=pl011,0x1c090000 debug user_debug=31 loglevel=9"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/Image"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"root=/dev/mmcblk0p2 console=ttyAMA0 earlyprintk=pl011,0x1c090000 debug user_debug=31 loglevel=9"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2\r
-  gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/rtsm_ve-aemv8a.dtb"\r
 \r
   # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"\r
 \r
   # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"\r
   #\r
   # ARM Architectural Timer Frequency\r
   #\r
   #\r
   # ARM Architectural Timer Frequency\r
   #\r
-  # Set model tick to 100Mhz. This depends a lot on workstation performance.\r
+  # Set model tick to 100MHz. This depends a lot on workstation performance.\r
   gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|100000000\r
 \r
 [PcdsDynamicDefault.common]\r
   gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|100000000\r
 \r
 [PcdsDynamicDefault.common]\r
index 190bbc997592e6516393febcb22f8368017899c7..d49b0efdcba5ed88e1a6ff473d25d37b34085a8a 100644 (file)
@@ -73,7 +73,6 @@
   gArmPlatformTokenSpaceGuid.PcdDefaultBootInitrdPath\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootInitrdPath\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType\r
-  gArmPlatformTokenSpaceGuid.PcdFdtDevicePath\r
   gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths\r
   gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths\r
index 04a2eee6f5a88217369a68533ce9345c4e85f54f..76c66fd0bb3f867442dbdbc3473774e4d715dc4b 100644 (file)
@@ -824,63 +824,6 @@ ErrorExit:
   return Status ;\r
 }\r
 \r
   return Status ;\r
 }\r
 \r
-EFI_STATUS\r
-UpdateFdtPath (\r
-  IN LIST_ENTRY *BootOptionsList\r
-  )\r
-{\r
-  EFI_STATUS                Status;\r
-  UINTN                     FdtDevicePathSize;\r
-  BDS_SUPPORTED_DEVICE      *SupportedBootDevice;\r
-  EFI_DEVICE_PATH_PROTOCOL  *FdtDevicePathNodes;\r
-  EFI_DEVICE_PATH_PROTOCOL  *FdtDevicePath;\r
-\r
-  Status = SelectBootDevice (&SupportedBootDevice);\r
-  if (EFI_ERROR(Status)) {\r
-    Status = EFI_ABORTED;\r
-    goto EXIT;\r
-  }\r
-\r
-  // Create the specific device path node\r
-  Status = SupportedBootDevice->Support->CreateDevicePathNode (L"FDT blob", &FdtDevicePathNodes);\r
-  if (EFI_ERROR(Status)) {\r
-    Status = EFI_ABORTED;\r
-    goto EXIT;\r
-  }\r
-\r
-  if (FdtDevicePathNodes != NULL) {\r
-    // Append the Device Path node to the select device path\r
-    FdtDevicePath = AppendDevicePath (SupportedBootDevice->DevicePathProtocol, FdtDevicePathNodes);\r
-    // Free the FdtDevicePathNodes created by Support->CreateDevicePathNode()\r
-    FreePool (FdtDevicePathNodes);\r
-    FdtDevicePathSize = GetDevicePathSize (FdtDevicePath);\r
-    Status = gRT->SetVariable (\r
-                    (CHAR16*)L"Fdt",\r
-                    &gArmGlobalVariableGuid,\r
-                    EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-                    FdtDevicePathSize,\r
-                    FdtDevicePath\r
-                    );\r
-    ASSERT_EFI_ERROR(Status);\r
-  } else {\r
-    Status = gRT->SetVariable (\r
-           (CHAR16*)L"Fdt",\r
-           &gArmGlobalVariableGuid,\r
-           EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-           0,\r
-           NULL\r
-           );\r
-    ASSERT_EFI_ERROR(Status);\r
-  }\r
-\r
-EXIT:\r
-  if (Status == EFI_ABORTED) {\r
-    Print(L"\n");\r
-  }\r
-  FreePool(SupportedBootDevice);\r
-  return Status;\r
-}\r
-\r
 /**\r
   Set boot timeout\r
 \r
 /**\r
   Set boot timeout\r
 \r
@@ -937,7 +880,6 @@ struct BOOT_MANAGER_ENTRY {
     { L"Update Boot Device Entry", BootMenuUpdateBootOption },\r
     { L"Remove Boot Device Entry", BootMenuRemoveBootOption },\r
     { L"Reorder Boot Device Entries", BootMenuReorderBootOptions },\r
     { L"Update Boot Device Entry", BootMenuUpdateBootOption },\r
     { L"Remove Boot Device Entry", BootMenuRemoveBootOption },\r
     { L"Reorder Boot Device Entries", BootMenuReorderBootOptions },\r
-    { L"Update FDT path", UpdateFdtPath },\r
     { L"Set Boot Timeout", BootMenuSetBootTimeout },\r
 };\r
 \r
     { L"Set Boot Timeout", BootMenuSetBootTimeout },\r
 };\r
 \r
index 80982222e160fad51cc14805622ed4ff5a67f04f..889040e3b63a26be25245ba9954f3b0fc4676a57 100644 (file)
@@ -21,13 +21,9 @@ BootOptionStart (
   )\r
 {\r
   EFI_STATUS                            Status;\r
   )\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
   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
   UINTN                                 CmdLineSize;\r
   UINTN                                 InitrdSize;\r
   EFI_DEVICE_PATH*                      Initrd;\r
@@ -69,25 +65,11 @@ BootOptionStart (
       } else {\r
         Initrd = NULL;\r
       }\r
       } 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
     }\r
   } else {\r
     // Connect all the drivers if the EFI Application is not a EFI OS Loader\r
index e591767a103e52d8142688d22d44d5011e5d2eba..7a400cc2fb4fb2fed3482fbeadc8eaab1fa6220b 100644 (file)
@@ -46,7 +46,6 @@ gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription      : Description of the D
 gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath       : DevicePath of the Default Boot Entry\r
 gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument         : Argument for the Default Boot Entry\r
 gArmPlatformTokenSpaceGuid.PcdDefaultBootType             : Define the binary type of the Default Boot Entry (0=EFI application, 1=Linux kernel with ATAG support, 2=Linux Kernel with FDT support)  \r
 gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath       : DevicePath of the Default Boot Entry\r
 gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument         : Argument for the Default Boot Entry\r
 gArmPlatformTokenSpaceGuid.PcdDefaultBootType             : Define the binary type of the Default Boot Entry (0=EFI application, 1=Linux kernel with ATAG support, 2=Linux Kernel with FDT support)  \r
-gArmPlatformTokenSpaceGuid.PcdFdtDevicePath               : DevicePath of the Platform Device Tree\r
 gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut         : Timeout before booting on the Device Boot entry (by default the auto boot is skipped)\r
 gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths           : List of Device Path use for the Console Input\r
 gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths          : List of Device Path use for the Console Output\r
 gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut         : Timeout before booting on the Device Boot entry (by default the auto boot is skipped)\r
 gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths           : List of Device Path use for the Console Input\r
 gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths          : List of Device Path use for the Console Output\r
index dcd7c41001c46aa77dcfe66ad1c476f1404ff05c..8aae7b2c4e08f98cf683d43be1d75dfd6cba7da6 100644 (file)
@@ -27,6 +27,7 @@
 #include <Protocol/DevicePathFromText.h>\r
 \r
 #include <Guid/ArmGlobalVariableHob.h>\r
 #include <Protocol/DevicePathFromText.h>\r
 \r
 #include <Guid/ArmGlobalVariableHob.h>\r
+#include <Guid/Fdt.h>\r
 \r
 #include <libfdt.h>\r
 \r
 \r
 #include <libfdt.h>\r
 \r
@@ -178,41 +179,28 @@ EblDumpFdt (
   IN CHAR8  **Argv\r
   )\r
 {\r
   IN CHAR8  **Argv\r
   )\r
 {\r
-  EFI_STATUS           Status;\r
-  EFI_DEVICE_PATH*     FdtDevicePath;\r
-  EFI_PHYSICAL_ADDRESS FdtBlob;\r
-  UINTN                FdtBlobSize;\r
-  UINTN                Ret;\r
-  EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL  *EfiDevicePathFromTextProtocol;\r
+  EFI_STATUS  Status;\r
+  VOID        *FdtBlob;\r
+  UINTN       Ret;\r
 \r
   // If no FDT file is passed to the argument then get the one from the platform\r
   if (Argc < 2) {\r
 \r
   // If no FDT file is passed to the argument then get the one from the platform\r
   if (Argc < 2) {\r
-    Status = GetEnvironmentVariable (L"Fdt", &gArmGlobalVariableGuid, NULL, NULL, (VOID**)&FdtDevicePath);\r
-    if (Status == EFI_NOT_FOUND) {\r
-      // No set yet, get the Default Device Path\r
-      Status = gBS->LocateProtocol (&gEfiDevicePathFromTextProtocolGuid, NULL, (VOID **)&EfiDevicePathFromTextProtocol);\r
-      ASSERT_EFI_ERROR(Status);\r
-      FdtDevicePath = EfiDevicePathFromTextProtocol->ConvertTextToDevicePath ((CHAR16*)PcdGetPtr(PcdFdtDevicePath));\r
+    Status = EfiGetSystemConfigurationTable (&gFdtTableGuid, &FdtBlob);\r
+    if (EFI_ERROR (Status)) {\r
+      Print (L"ERROR: Did not find the Fdt Blob.\n");\r
+      return Status;\r
     }\r
   } else {\r
     return EFI_NOT_FOUND;\r
   }\r
 \r
     }\r
   } else {\r
     return EFI_NOT_FOUND;\r
   }\r
 \r
-  Status = BdsLoadImage (FdtDevicePath, AllocateAnyPages, &FdtBlob, &FdtBlobSize);\r
-  if (EFI_ERROR(Status)) {\r
-    Print (L"ERROR: Did not find the Fdt Blob.\n");\r
-    return Status;\r
-  }\r
-\r
-  Ret = fdt_check_header((CONST VOID*)(UINTN)FdtBlob);\r
+  Ret = fdt_check_header (FdtBlob);\r
   if (Ret != 0) {\r
   if (Ret != 0) {\r
-    Print (L"ERROR: Device Tree header not valid (err:%d)\n",Ret);\r
-    return Status;\r
+    Print (L"ERROR: Device Tree header not valid (err:%d)\n", Ret);\r
+    return EFI_INVALID_PARAMETER;\r
   }\r
 \r
   }\r
 \r
-  DumpFdt ((VOID*)(UINTN)FdtBlob);\r
-\r
-  FreePool (FdtDevicePath);\r
+  DumpFdt (FdtBlob);\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
index 5506c77ebeabddf0da32d2618e3710d08635c338..c4b2ae1f6473b7bfd645d2f0bc2237fd4d1adf15 100644 (file)
@@ -61,6 +61,4 @@
 \r
 [Guids]\r
   gEfiDebugImageInfoTableGuid\r
 \r
 [Guids]\r
   gEfiDebugImageInfoTableGuid\r
-\r
-[Pcd]\r
-  gArmPlatformTokenSpaceGuid.PcdFdtDevicePath\r
+  gFdtTableGuid\r
index 64d207e33f61f1c7876027499ffedbe32d29b4ec..3fbd79d07a34f61d7df12424eeb470d520c78cff 100644 (file)
   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"console=tty0 console=ttyS2,115200n8 root=UUID=a4af765b-c2b5-48f4-9564-7a4e9104c4f6 rootwait ro earlyprintk"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|1\r
   gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut|10\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"console=tty0 console=ttyS2,115200n8 root=UUID=a4af765b-c2b5-48f4-9564-7a4e9104c4f6 rootwait ro earlyprintk"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|1\r
   gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut|10\r
-  gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(B615F1F5-5088-43CD-809C-A16E52487D00)/HD(1,MBR,0x00000000,0x3F,0x19FC0)/omap3-beagle.dtb"\r
 \r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(115200,8,N,1)/VenPcAnsi();VenHw(E68088EF-D1A4-4336-C1DB-4D3A204730A6)"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(115200,8,N,1)/VenPcAnsi()"\r
 \r
   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(115200,8,N,1)/VenPcAnsi();VenHw(E68088EF-D1A4-4336-C1DB-4D3A204730A6)"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(115200,8,N,1)/VenPcAnsi()"\r
index d4e1904d7dcfc2b232b485511e2a6456b60dded4..7e9ad880baf037f5ee95453f4d632452091a4a00 100644 (file)
@@ -56,7 +56,6 @@ BootAndroidBootImg (
   IN VOID    *Buffer\r
   )\r
 {\r
   IN VOID    *Buffer\r
   )\r
 {\r
-  EFI_DEVICE_PATH_PROTOCOL           *FdtDevicePath;\r
   EFI_STATUS                          Status;\r
   CHAR8                               KernelArgs[BOOTIMG_KERNEL_ARGS_SIZE];\r
   VOID                               *Kernel;\r
   EFI_STATUS                          Status;\r
   CHAR8                               KernelArgs[BOOTIMG_KERNEL_ARGS_SIZE];\r
   VOID                               *Kernel;\r
@@ -93,20 +92,10 @@ BootAndroidBootImg (
     RamdiskDevicePath->Node1.EndingAddress   = ((EFI_PHYSICAL_ADDRESS)(UINTN) Ramdisk) + RamdiskSize;\r
   }\r
 \r
     RamdiskDevicePath->Node1.EndingAddress   = ((EFI_PHYSICAL_ADDRESS)(UINTN) Ramdisk) + RamdiskSize;\r
   }\r
 \r
-  // Get the default FDT device path\r
-  Status = GetEnvironmentVariable ((CHAR16 *)L"Fdt", &gArmGlobalVariableGuid,\r
-             NULL, 0, (VOID **)&FdtDevicePath);\r
-  if (Status == EFI_NOT_FOUND) {\r
-    DEBUG ((EFI_D_ERROR, "Error: Please update FDT path in boot manager\n"));\r
-    return EFI_DEVICE_ERROR;\r
-  }\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
   Status = BdsBootLinuxFdt (\r
               (EFI_DEVICE_PATH_PROTOCOL *) &KernelDevicePath,\r
               (EFI_DEVICE_PATH_PROTOCOL *) RamdiskDevicePath,\r
   Status = BdsBootLinuxFdt (\r
               (EFI_DEVICE_PATH_PROTOCOL *) &KernelDevicePath,\r
               (EFI_DEVICE_PATH_PROTOCOL *) RamdiskDevicePath,\r
-              KernelArgs,\r
-              FdtDevicePath\r
+              KernelArgs\r
               );\r
   if (EFI_ERROR (Status)) {\r
     DEBUG ((EFI_D_ERROR, "Couldn't Boot Linux: %d\n", Status));\r
               );\r
   if (EFI_ERROR (Status)) {\r
     DEBUG ((EFI_D_ERROR, "Couldn't Boot Linux: %d\n", Status));\r
@@ -117,8 +106,6 @@ BootAndroidBootImg (
     FreePool (RamdiskDevicePath);\r
   }\r
 \r
     FreePool (RamdiskDevicePath);\r
   }\r
 \r
-  FreePool (FdtDevicePath);\r
-\r
   // If we got here we do a confused face because BootLinuxFdt returned,\r
   // reporting success.\r
   DEBUG ((EFI_D_ERROR, "WARNING: BdsBootLinuxFdt returned EFI_SUCCESS.\n"));\r
   // If we got here we do a confused face because BootLinuxFdt returned,\r
   // reporting success.\r
   DEBUG ((EFI_D_ERROR, "WARNING: BdsBootLinuxFdt returned EFI_SUCCESS.\n"));\r