]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/ArmJunoPkg : Use FdtPlatformDxe driver to install the FDT
authorRonald Cron <Ronald.Cron@arm.com>
Thu, 26 Feb 2015 10:56:20 +0000 (10:56 +0000)
committeroliviermartin <oliviermartin@Edk2>
Thu, 26 Feb 2015 10:56:20 +0000 (10:56 +0000)
Remove the installation of the FDT for Juno into the UEFI Configuration
Table from the Juno specific DXE driver. Use the FdtPlatformDxe driver to
do it 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@16938 6f19259b-4bc3-4df7-8a09-765794883524

ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc
ArmPlatformPkg/ArmJunoPkg/ArmJuno.fdf
ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf
ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxeInternal.h
ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/InstallFdt.c [deleted file]
ArmPlatformPkg/ArmPlatformPkg.dec
ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc
ArmPlatformPkg/Bds/Bds.inf
ArmPlatformPkg/Bds/BootMenu.c
ArmPlatformPkg/Include/Guid/ArmPlatformEvents.h [deleted file]

index a2230105613d1c525a5919d15407faebceb56406..1639bf4269523d6f23bc91644fbb1c18cb5e4bcd 100644 (file)
 \r
   gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE\r
 \r
+  #\r
+  # FDT installation : enable the development specific features\r
+  #\r
+  gEmbeddedTokenSpaceGuid.PcdOverridePlatformFdt|TRUE\r
+\r
 [PcdsFixedAtBuild.common]\r
   gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"ARM Juno"\r
   gEmbeddedTokenSpaceGuid.PcdEmbeddedPrompt|"ArmJuno"\r
   # List of Device Paths that support BootMonFs\r
   gArmPlatformTokenSpaceGuid.PcdBootMonFsSupportedDevicePaths|L"VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)"\r
 \r
+  #\r
+  # Define the device path to the FDT for its installation\r
+  #\r
+!ifdef $(JUNO_EMULATOR)\r
+  # From DRAM\r
+  gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths|L"VenHw(30F57E4A-69CE-4FB7-B7A1-4C7CE49D57A6)/MemoryMapped(0x0,0x88000000,0x88200000)"\r
+!else\r
+!ifdef $(JUNO_MODEL)\r
+  # From semi-hosting\r
+  gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/juno.dtb"\r
+!else\r
+  # From NOR flash\r
+  gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths|L"VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)/juno.dtb"\r
+!endif\r
+!endif\r
+\r
   #\r
   # ARM OS Loader\r
   #\r
index e0aa56f7a6c579ef233338474733275b42bddc7f..b36c77ab9023aade8be14831fa7a1825bf37de6c 100644 (file)
@@ -108,6 +108,11 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf\r
   INF RuleOverride=ACPITABLE ArmPlatformPkg/ArmJunoPkg/AcpiTables/AcpiTables.inf\r
 \r
+  #\r
+  # FDT installation\r
+  #\r
+  INF EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf\r
+\r
   INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf\r
 \r
   #\r
index 0542a2003672a414dcd9814865fcde1eefc1edeb..7f92931518efcf4d8349b36d7aa8e9c65253cb3e 100644 (file)
@@ -83,9 +83,5 @@ ArmJunoEntryPoint (
     return Status;\r
   }\r
 \r
-  // Try to install the Flat Device Tree (FDT). This function actually installs the\r
-  // UEFI Driver Binding Protocol.\r
-  Status = JunoFdtInstall (ImageHandle);\r
-\r
   return Status;\r
 }\r
index fd77a5d3f1319be7d494b7f1b7cbb48bc10718a6..d29703b20fa6f3e818ca93a4481fb2299ac938f5 100644 (file)
@@ -20,7 +20,6 @@
 \r
 [Sources.common]\r
   ArmJunoDxe.c\r
-  InstallFdt.c\r
   PciEmulation.c\r
   PciRootBridgeIo.c\r
 \r
@@ -39,7 +38,6 @@
   DebugLib\r
   DmaLib\r
   DxeServicesTableLib\r
-  FdtLib\r
   IoLib\r
   PcdLib\r
   PrintLib\r
@@ -53,8 +51,6 @@
   gArmGlobalVariableGuid\r
   gEfiEndOfDxeEventGroupGuid\r
   gEfiFileInfoGuid\r
-  gFdtTableGuid\r
-  gArmPlatformUpdateFdtEventGuid\r
 \r
 [Protocols]\r
   gEfiBlockIoProtocolGuid\r
index 5ebb5161f81be96f2124b15addb0b59066822b07..a9f58dd00bd7938e96e1adb71037f3e5e4c5b59a 100644 (file)
@@ -28,9 +28,4 @@ PciEmulationEntryPoint (
   VOID\r
   );\r
 \r
-EFI_STATUS\r
-JunoFdtInstall (\r
-  IN EFI_HANDLE                            ImageHandle\r
-  );\r
-\r
 #endif // __ARM_JUNO_DXE_INTERNAL_H__\r
diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/InstallFdt.c b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/InstallFdt.c
deleted file mode 100644 (file)
index 337a4f0..0000000
+++ /dev/null
@@ -1,444 +0,0 @@
-/** @file\r
-*\r
-*  Copyright (c) 2014-2015, ARM Limited. All rights reserved.\r
-*\r
-*  This program and the accompanying materials\r
-*  are licensed and made available under the terms and conditions of the BSD License\r
-*  which accompanies this distribution.  The full text of the license may be found at\r
-*  http://opensource.org/licenses/bsd-license.php\r
-*\r
-*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-*\r
-**/\r
-\r
-#include "ArmJunoDxeInternal.h"\r
-\r
-#include <Protocol/BlockIo.h>\r
-#include <Protocol/DevicePathFromText.h>\r
-#include <Protocol/DriverBinding.h>\r
-#include <Protocol/SimpleFileSystem.h>\r
-\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/BdsLib.h>\r
-#include <Library/DevicePathLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/PrintLib.h>\r
-#include <Library/SerialPortLib.h>\r
-#include <Library/UefiRuntimeServicesTableLib.h>\r
-\r
-#include <Guid/ArmGlobalVariableHob.h>\r
-#include <Guid/ArmPlatformEvents.h>\r
-#include <Guid/EventGroup.h>\r
-#include <Guid/Fdt.h>\r
-#include <Guid/FileInfo.h>\r
-\r
-#include <libfdt.h>\r
-\r
-#define FDT_DEFAULT_FILENAME  L"juno"\r
-\r
-#define IS_DEVICE_PATH_NODE(node,type,subtype) (((node)->Type == (type)) && ((node)->SubType == (subtype)))\r
-\r
-// Hardware Vendor Device Path node for the Juno NOR Flash. We use the Juno NOR Flash if the user\r
-// has not specified another filesystem location into the UEFI Variable 'Fdt'.\r
-// The Juno NOR Flash has its own filesystem format (supported by ArmPlatformPkg/FileSystem/BootMonFs).\r
-STATIC CONST struct {\r
-  VENDOR_DEVICE_PATH NorGuid;\r
-  EFI_DEVICE_PATH    End;\r
-} mJunoNorFlashDevicePath = {\r
-  {\r
-    { HARDWARE_DEVICE_PATH, HW_VENDOR_DP, { sizeof (VENDOR_DEVICE_PATH), 0 } },\r
-    {0xE7223039, 0x5836, 0x41E1, { 0xB5, 0x42, 0xD7, 0xEC, 0x73, 0x6C, 0x5E, 0x59} }\r
-  },\r
-  { END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, { sizeof (EFI_DEVICE_PATH_PROTOCOL), 0 } }\r
-};\r
-\r
-STATIC EFI_DEVICE_PATH* mFdtFileSystemDevicePath = NULL;\r
-STATIC CHAR16* mFdtFileName = NULL;\r
-\r
-STATIC BOOLEAN mFdtTableInstalled = FALSE;\r
-\r
-/**\r
-  See definition EFI_DRIVER_BINDING_PROTOCOL.Supported()\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-JunoFdtSupported (\r
-  IN        EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r
-  IN        EFI_HANDLE                   ControllerHandle,\r
-  IN        EFI_DEVICE_PATH_PROTOCOL    *RemainingDevicePath OPTIONAL\r
-  )\r
-{\r
-  EFI_STATUS                Status;\r
-  EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
-\r
-  //\r
-  // Check if the Handle support the Simple File System Protocol\r
-  //\r
-  Status = gBS->OpenProtocol (\r
-                  ControllerHandle,\r
-                  &gEfiSimpleFileSystemProtocolGuid,\r
-                  NULL,\r
-                  gImageHandle,\r
-                  ControllerHandle,\r
-                  EFI_OPEN_PROTOCOL_TEST_PROTOCOL\r
-                  );\r
-\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  // Check if a DevicePath is attached to the handle\r
-  Status = gBS->OpenProtocol (\r
-                  ControllerHandle,\r
-                  &gEfiDevicePathProtocolGuid,\r
-                  (VOID **)&DevicePath,\r
-                  gImageHandle,\r
-                  ControllerHandle,\r
-                  EFI_OPEN_PROTOCOL_BY_DRIVER\r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  // Check if the Device Path is the one from the NOR Flash\r
-  if (CompareMem (mFdtFileSystemDevicePath, DevicePath, GetDevicePathSize (mFdtFileSystemDevicePath)) != 0) {\r
-    return EFI_NOT_FOUND;\r
-  }\r
-\r
-  gBS->CloseProtocol (ControllerHandle, &gEfiDevicePathProtocolGuid, gImageHandle, ControllerHandle);\r
-  return Status;\r
-}\r
-\r
-/**\r
-  This function is used to print messages back to the user.\r
-\r
-  We use the Serial terminal for these messages as the gST->ConOut might not be initialized at this stage.\r
-\r
-  @param Message    Message to display to the user\r
-**/\r
-STATIC\r
-VOID\r
-PrintMessage (\r
-  IN CHAR8* Message,\r
-  ...\r
-  )\r
-{\r
-  UINTN   CharCount;\r
-  CHAR8   Buffer[100];\r
-  VA_LIST Marker;\r
-\r
-  VA_START (Marker, Message);\r
-  CharCount = AsciiVSPrint (Buffer, sizeof (Buffer), Message, Marker);\r
-  VA_END (Marker);\r
-\r
-  SerialPortWrite ((UINT8*)Buffer, CharCount);\r
-}\r
-\r
-/**\r
-  See definition EFI_DRIVER_BINDING_PROTOCOL.Start ()\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-JunoFdtStart (\r
-  IN        EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r
-  IN        EFI_HANDLE                   ControllerHandle,\r
-  IN        EFI_DEVICE_PATH_PROTOCOL    *DevicePath OPTIONAL\r
-  )\r
-{\r
-  EFI_STATUS                       Status;\r
-  EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *BootMonFs;\r
-  EFI_FILE_PROTOCOL               *Fs;\r
-  EFI_FILE_PROTOCOL               *File;\r
-  UINTN                            Size;\r
-  EFI_PHYSICAL_ADDRESS             FdtBlob;\r
-  EFI_FILE_INFO                   *FileInfo;\r
-\r
-  if (mFdtTableInstalled) {\r
-    return EFI_ALREADY_STARTED;\r
-  }\r
-\r
-  Status = gBS->OpenProtocol (\r
-                  ControllerHandle,\r
-                  &gEfiSimpleFileSystemProtocolGuid,\r
-                  (VOID**)&BootMonFs,\r
-                  gImageHandle,\r
-                  ControllerHandle,\r
-                  EFI_OPEN_PROTOCOL_BY_DRIVER\r
-                  );\r
-\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  // Try to Open the volume and get root directory\r
-  Status = BootMonFs->OpenVolume (BootMonFs, &Fs);\r
-  if (EFI_ERROR (Status)) {\r
-    PrintMessage ("Warning: Fail to open file system that should contain FDT file.\n");\r
-    goto CLOSE_PROTOCOL;\r
-  }\r
-\r
-  File = NULL;\r
-  Status = Fs->Open (Fs, &File, mFdtFileName, EFI_FILE_MODE_READ, 0);\r
-  if (EFI_ERROR (Status)) {\r
-    PrintMessage ("Warning: Fail to load FDT file '%s'.\n", mFdtFileName);\r
-    goto CLOSE_PROTOCOL;\r
-  }\r
-\r
-  Size = 0;\r
-  File->GetInfo (File, &gEfiFileInfoGuid, &Size, NULL);\r
-  FileInfo = AllocatePool (Size);\r
-  Status = File->GetInfo (File, &gEfiFileInfoGuid, &Size, FileInfo);\r
-  if (EFI_ERROR (Status)) {\r
-    goto CLOSE_FILE;\r
-  }\r
-\r
-  // Get the file size\r
-  Size = FileInfo->FileSize;\r
-  FreePool (FileInfo);\r
-\r
-  // The FDT blob is attached to the Configuration Table. It is better to load it as Runtime Service Data\r
-  // to prevent the kernel to overwrite its data\r
-  Status = gBS->AllocatePages (AllocateAnyPages, EfiRuntimeServicesData, EFI_SIZE_TO_PAGES (Size), &FdtBlob);\r
-  if (!EFI_ERROR (Status)) {\r
-    Status = File->Read (File, &Size, (VOID*)(UINTN)(FdtBlob));\r
-    if (EFI_ERROR (Status)) {\r
-      gBS->FreePages (FdtBlob, EFI_SIZE_TO_PAGES (Size));\r
-    } else {\r
-      // Check the FDT header is valid. We only make this check in DEBUG mode in case the FDT header change on\r
-      // production device and this ASSERT() becomes not valid.\r
-      ASSERT (fdt_check_header ((VOID*)(UINTN)(FdtBlob)) == 0);\r
-\r
-      // Ensure the Size of the Device Tree is smaller than the size of the read file\r
-      ASSERT ((UINTN)fdt_totalsize ((VOID*)(UINTN)FdtBlob) <= Size);\r
-\r
-      // Install the FDT into the Configuration Table\r
-      Status = gBS->InstallConfigurationTable (&gFdtTableGuid, (VOID*)(UINTN)(FdtBlob));\r
-      if (!EFI_ERROR (Status)) {\r
-        mFdtTableInstalled = TRUE;\r
-      }\r
-    }\r
-  }\r
-\r
-CLOSE_FILE:\r
-  File->Close (File);\r
-\r
-CLOSE_PROTOCOL:\r
-  // We do not need the FileSystem protocol\r
-  gBS->CloseProtocol (\r
-         ControllerHandle,\r
-         &gEfiSimpleFileSystemProtocolGuid,\r
-         gImageHandle,\r
-         ControllerHandle);\r
-\r
-  return Status;\r
-}\r
-\r
-/**\r
-  See definition EFI_DRIVER_BINDING_PROTOCOL.Stop()\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-JunoFdtStop (\r
-  IN        EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r
-  IN        EFI_HANDLE                   ControllerHandle,\r
-  IN        UINTN                        NumberOfChildren,\r
-  IN        EFI_HANDLE                  *ChildHandleBuffer OPTIONAL\r
-  )\r
-{\r
-  UINTN      Index;\r
-  VOID*      FdtBlob;\r
-  UINTN      FdtSize;\r
-\r
-  // Look for FDT Table\r
-  for (Index = 0; Index < gST->NumberOfTableEntries; Index++) {\r
-    // Check for correct GUID type\r
-    if (CompareGuid (&gFdtTableGuid, &(gST->ConfigurationTable[Index].VendorGuid))) {\r
-      FdtBlob = gST->ConfigurationTable[Index].VendorTable;\r
-      FdtSize = (UINTN)fdt_totalsize (FdtBlob);\r
-\r
-      // Uninstall the FDT Configuration Table\r
-      gBS->InstallConfigurationTable (&gFdtTableGuid, NULL);\r
-\r
-      // Free the memory\r
-      gBS->FreePages ((EFI_PHYSICAL_ADDRESS)(UINTN)FdtBlob, EFI_SIZE_TO_PAGES (FdtSize));\r
-\r
-      return EFI_SUCCESS;\r
-    }\r
-  }\r
-\r
-  return EFI_NOT_FOUND;\r
-}\r
-\r
-//\r
-// Driver Binding Protocol for Juno FDT support\r
-//\r
-EFI_DRIVER_BINDING_PROTOCOL mJunoFdtBinding = {\r
-  JunoFdtSupported,\r
-  JunoFdtStart,\r
-  JunoFdtStop,\r
-  0xa,\r
-  NULL,\r
-  NULL\r
-};\r
-\r
-/**\r
-  Notification function of EFI_END_OF_DXE_EVENT_GROUP_GUID event group.\r
-\r
-  This is a notification function registered on EFI_END_OF_DXE_EVENT_GROUP_GUID event group.\r
-\r
-  @param  Event        Event whose notification function is being invoked.\r
-  @param  Context      Pointer to the notification function's context.\r
-\r
-**/\r
-STATIC\r
-VOID\r
-EFIAPI\r
-LoadFdtOnEvent (\r
-  EFI_EVENT                               Event,\r
-  VOID                                    *Context\r
-  )\r
-{\r
-  EFI_DEVICE_PATH *DevicePathNode;\r
-  EFI_HANDLE       Handle;\r
-  EFI_STATUS       Status;\r
-  UINTN            VariableSize;\r
-  CHAR16*          FdtDevicePathStr;\r
-  EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL  *EfiDevicePathFromTextProtocol;\r
-  EFI_EVENT        ArmPlatformUpdateFdtEvent;\r
-\r
-  //\r
-  // Read the 'FDT' UEFI Variable to know where we should we read the blob from.\r
-  // The 'Fdt' variable contains either the full device path or only the filename of the FDT.\r
-  // If 'Fdt' only contains the filename then we assume its location is on the NOR Flash.\r
-  //\r
-  VariableSize     = 0;\r
-  Status = gRT->GetVariable (L"Fdt", &gArmGlobalVariableGuid, NULL, &VariableSize, mFdtFileSystemDevicePath);\r
-  if (Status == EFI_BUFFER_TOO_SMALL) {\r
-    // Get the environment variable value\r
-    mFdtFileSystemDevicePath = AllocatePool (VariableSize);\r
-    if (mFdtFileSystemDevicePath != NULL) {\r
-      Status = gRT->GetVariable (L"Fdt", &gArmGlobalVariableGuid, NULL, &VariableSize, mFdtFileSystemDevicePath);\r
-      if (EFI_ERROR (Status)) {\r
-        FreePool (mFdtFileSystemDevicePath);\r
-        ASSERT_EFI_ERROR (Status);\r
-        return;\r
-      }\r
-    } else {\r
-      ASSERT_EFI_ERROR (EFI_OUT_OF_RESOURCES);\r
-      return;\r
-    }\r
-  } else if (Status == EFI_NOT_FOUND) {\r
-    // If the 'Fdt' variable does not exist then we get the FDT location from the PCD\r
-    FdtDevicePathStr = (CHAR16*)PcdGetPtr (PcdFdtDevicePath);\r
-\r
-    Status = gBS->LocateProtocol (&gEfiDevicePathFromTextProtocolGuid, NULL, (VOID **)&EfiDevicePathFromTextProtocol);\r
-    if (EFI_ERROR (Status)) {\r
-      ASSERT_EFI_ERROR (Status);\r
-      return;\r
-    }\r
-\r
-    // Conversion of the Device Path string into EFI Device Path\r
-    mFdtFileSystemDevicePath = EfiDevicePathFromTextProtocol->ConvertTextToDevicePath (FdtDevicePathStr);\r
-  }\r
-\r
-  if (mFdtFileSystemDevicePath != NULL) {\r
-    // Look for the FDT filename that should be contained into the FilePath device path node\r
-    DevicePathNode = mFdtFileSystemDevicePath;\r
-    while (!IsDevicePathEnd (DevicePathNode)) {\r
-      if (IS_DEVICE_PATH_NODE (DevicePathNode, MEDIA_DEVICE_PATH, MEDIA_FILEPATH_DP)) {\r
-        // Extract the name from the File Path Node. The name of the Filename is the size of the\r
-        // device path node minus the size of the device path node header.\r
-        mFdtFileName = AllocateCopyPool (\r
-            DevicePathNodeLength (DevicePathNode) - sizeof(EFI_DEVICE_PATH_PROTOCOL),\r
-            ((FILEPATH_DEVICE_PATH*)DevicePathNode)->PathName);\r
-        if (mFdtFileName == NULL) {\r
-          ASSERT_EFI_ERROR (EFI_OUT_OF_RESOURCES);\r
-          return;\r
-        }\r
-\r
-        // We remove the FilePath device path node from the FileSystem Device Path\r
-        // because it will never match a device path installed by the FileSystem driver\r
-        SetDevicePathEndNode (DevicePathNode);\r
-        break;\r
-      }\r
-      DevicePathNode = NextDevicePathNode (DevicePathNode);\r
-    }\r
-\r
-    // The UEFI Variable might just contain the FDT filename. In this case we assume the FileSystem is\r
-    // the NOR Flash based one (ie: BootMonFs).\r
-    // If it was only containing the FilePath device node then the previous condition should have\r
-    // replaced it by the End Device Path Node.\r
-    if (IsDevicePathEndType (mFdtFileSystemDevicePath)) {\r
-      mFdtFileSystemDevicePath = (EFI_DEVICE_PATH*)&mJunoNorFlashDevicePath;\r
-    }\r
-  } else {\r
-    // Fallback on the NOR Flash filesystem\r
-    mFdtFileSystemDevicePath = (EFI_DEVICE_PATH*)&mJunoNorFlashDevicePath;\r
-  }\r
-\r
-  // If the FDT FileName has been provided during the FileSystem identification\r
-  if (mFdtFileName == NULL) {\r
-    mFdtFileName = AllocateCopyPool (StrSize (FDT_DEFAULT_FILENAME), FDT_DEFAULT_FILENAME);\r
-    if (mFdtFileName == NULL) {\r
-      ASSERT_EFI_ERROR (Status);\r
-      return;\r
-    }\r
-  }\r
-\r
-  // Context is not NULL when this function is called for a gEfiEndOfDxeEventGroupGuid event\r
-  if (Context) {\r
-    // Install the Binding protocol to verify when the FileSystem that contains the FDT has been installed\r
-    Status = gBS->InstallMultipleProtocolInterfaces (\r
-                    &gImageHandle,\r
-                    &gEfiDriverBindingProtocolGuid, &mJunoFdtBinding,\r
-                    NULL\r
-                    );\r
-    if (EFI_ERROR (Status)) {\r
-      ASSERT_EFI_ERROR (Status);\r
-      return;\r
-    }\r
-\r
-    // Register the event triggered when the 'Fdt' variable is updated.\r
-    Status = gBS->CreateEventEx (\r
-                    EVT_NOTIFY_SIGNAL,\r
-                    TPL_CALLBACK,\r
-                    LoadFdtOnEvent,\r
-                    NULL,\r
-                    &gArmPlatformUpdateFdtEventGuid,\r
-                    &ArmPlatformUpdateFdtEvent\r
-                    );\r
-    ASSERT_EFI_ERROR (Status);\r
-  }\r
-\r
-  //\r
-  // Force to connect the FileSystem that contains the FDT\r
-  //\r
-  BdsConnectDevicePath (mFdtFileSystemDevicePath, &Handle, NULL);\r
-}\r
-\r
-STATIC CONST BOOLEAN mIsEndOfDxeEvent = TRUE;\r
-\r
-EFI_STATUS\r
-JunoFdtInstall (\r
-  IN EFI_HANDLE                            ImageHandle\r
-  )\r
-{\r
-  EFI_STATUS Status;\r
-  EFI_EVENT  EndOfDxeEvent;\r
-\r
-  // Register the event handling function to set the End Of DXE flag.\r
-  // We wait until the end of the DXE phase to load the FDT to make sure\r
-  // all the required drivers (NOR Flash, UEFI Variable, BootMonFs) are dispatched\r
-  Status = gBS->CreateEventEx (\r
-                  EVT_NOTIFY_SIGNAL,\r
-                  TPL_CALLBACK,\r
-                  LoadFdtOnEvent,\r
-                  &mIsEndOfDxeEvent,\r
-                  &gEfiEndOfDxeEventGroupGuid,\r
-                  &EndOfDxeEvent\r
-                  );\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  return Status;\r
-}\r
index 2515af8e5918486d014d13f3c7c3fba2fbb5510b..44597cefd83e7e98ffd8ae90eca48056a603ca61 100644 (file)
@@ -42,9 +42,6 @@
 \r
   gArmBootMonFsFileInfoGuid   = { 0x41e26b9c, 0xada6, 0x45b3, { 0x80, 0x8e, 0x23, 0x57, 0xa3, 0x5b, 0x60, 0xd6 } }\r
 \r
-  ## Include/Guid/ArmPlatformEvents.h\r
-  gArmPlatformUpdateFdtEventGuid = { 0xaffe115b, 0x8589, 0x456d, { 0xba, 0xb5, 0x8f, 0x2e, 0xda, 0x53, 0xae, 0xb7 } }\r
-\r
 [Ppis]\r
   ## Include/Ppi/ArmGlobalVariable.h\r
   gArmGlobalVariablePpiGuid = { 0xab1c1816, 0xd542, 0x4e6f, {0x9b, 0x1e, 0x8e, 0xcd, 0x92, 0x53, 0xe2, 0xe7} }\r
index 745f9025b8e7069a44427327ad8b398d132dc208..483e8698356d8d135612feded23cfa0d78e7b7dd 100644 (file)
 \r
   # FV Filesystem\r
   MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf\r
+\r
+  #\r
+  # FDT installation\r
+  #\r
+  EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf\r
index 9872ce38aca5c1631b292e01e147aa3e9c704553..190bbc997592e6516393febcb22f8368017899c7 100644 (file)
@@ -53,7 +53,6 @@
   gEfiEndOfDxeEventGroupGuid\r
   gEfiFileSystemInfoGuid\r
   gArmGlobalVariableGuid\r
-  gArmPlatformUpdateFdtEventGuid\r
 \r
 [Protocols]\r
   gEfiBdsArchProtocolGuid\r
index 3676bf02459471f26a5bc82d4db750f2701dd7c5..04a2eee6f5a88217369a68533ce9345c4e85f54f 100644 (file)
@@ -15,7 +15,6 @@
 #include "BdsInternal.h"\r
 \r
 #include <Guid/ArmGlobalVariableHob.h>\r
-#include <Guid/ArmPlatformEvents.h>\r
 \r
 extern BDS_LOAD_OPTION_SUPPORT *BdsLoadOptionSupportList;\r
 \r
@@ -835,7 +834,6 @@ UpdateFdtPath (
   BDS_SUPPORTED_DEVICE      *SupportedBootDevice;\r
   EFI_DEVICE_PATH_PROTOCOL  *FdtDevicePathNodes;\r
   EFI_DEVICE_PATH_PROTOCOL  *FdtDevicePath;\r
-  EFI_EVENT                 UpdateFdtEvent;\r
 \r
   Status = SelectBootDevice (&SupportedBootDevice);\r
   if (EFI_ERROR(Status)) {\r
@@ -875,23 +873,6 @@ UpdateFdtPath (
     ASSERT_EFI_ERROR(Status);\r
   }\r
 \r
-  if (!EFI_ERROR (Status)) {\r
-    //\r
-    // Signal FDT has been updated\r
-    //\r
-    Status = gBS->CreateEventEx (\r
-        EVT_NOTIFY_SIGNAL,\r
-        TPL_NOTIFY,\r
-        EmptyCallbackFunction,\r
-        NULL,\r
-        &gArmPlatformUpdateFdtEventGuid,\r
-        &UpdateFdtEvent\r
-        );\r
-    if (!EFI_ERROR (Status)) {\r
-      gBS->SignalEvent (UpdateFdtEvent);\r
-    }\r
-  }\r
-\r
 EXIT:\r
   if (Status == EFI_ABORTED) {\r
     Print(L"\n");\r
diff --git a/ArmPlatformPkg/Include/Guid/ArmPlatformEvents.h b/ArmPlatformPkg/Include/Guid/ArmPlatformEvents.h
deleted file mode 100644 (file)
index 9027bc3..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/** @file\r
-*\r
-*  Copyright (c) 2015, ARM Limited. All rights reserved.\r
-*\r
-*  This program and the accompanying materials\r
-*  are licensed and made available under the terms and conditions of the BSD License\r
-*  which accompanies this distribution.  The full text of the license may be found at\r
-*  http://opensource.org/licenses/bsd-license.php\r
-*\r
-*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-*\r
-**/\r
-\r
-#ifndef __ARM_PLATFORM_EVENTS_H__\r
-#define __ARM_PLATFORM_EVENTS_H__\r
-\r
-#define ARM_PLATFORM_UPDATE_FDT_EVENT_GUID \\r
-  { 0xaffe115b, 0x8589, 0x456d, { 0xba, 0xb5, 0x8f, 0x2e, 0xda, 0x53, 0xae, 0xb7 } }\r
-\r
-extern EFI_GUID gArmPlatformUpdateFdtEventGuid;\r
-\r
-#endif\r