public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
To: "edk2-devel@lists.01.org" <edk2-devel@ml01.01.org>
Subject: soc specific fixups in dtb
Date: Fri, 3 Mar 2017 11:30:10 +0000	[thread overview]
Message-ID: <DB5PR04MB0998D00B43E4E11E53B36D0D8E2B0@DB5PR04MB0998.eurprd04.prod.outlook.com> (raw)

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



                 reply	other threads:[~2017-03-03 11:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB5PR04MB0998D00B43E4E11E53B36D0D8E2B0@DB5PR04MB0998.eurprd04.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox