public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* soc specific fixups in dtb
@ 2017-03-03 11:30 Meenakshi Aggarwal
  0 siblings, 0 replies; only message in thread
From: Meenakshi Aggarwal @ 2017-03-03 11:30 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

Hi All,


I need to perform some soc specific fixups in dtb binary before passing it to kernel.
And also I want to perform these fixups from efi shell, so that I don't have to set any PCD for fdt device path.

I can achieve my purpose by placing a hook in 
" EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatform.c "

   if (fdt_check_header ((VOID*)(UINTN)FdtBlobBase) != 0 ||
       (UINTN)fdt_totalsize ((VOID*)(UINTN)FdtBlobBase) > FdtBlobSize) {
     DEBUG ((EFI_D_ERROR, "InstallFdt() - loaded FDT binary image seems corrupt\n"));
@@ -108,12 +107,13 @@ InstallFdt (
   }
   
+  FdtCpuSetup((VOID **)&FdtBlobBase, &FdtBlobSize);
 
   //
   // Store the FDT as Runtime Service Data to prevent the Kernel from
   // overwritting its data.
   //

 
And calling setfdt -i fs0:fdt.dtb
Command from shell.


I know this is not a correct way of performing dtb fixups.

Is there any alternative to achieve same?

Or I need to write my own driver and shell command for performing dtb fixups?


Thanks,
Meenakshi



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-03 11:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-03 11:30 soc specific fixups in dtb Meenakshi Aggarwal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox