From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Thu, 14 Apr 2016 11:55:46 -0600 Subject: [U-Boot] [PATCH v2 1/2] efi_loader: Pass fdt address directly to bootefi cmd In-Reply-To: <570FB8BC.3020602@suse.de> References: <1460642874-241464-1-git-send-email-agraf@suse.de> <570FB8BC.3020602@suse.de> Message-ID: <570FD9A2.3070005@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 04/14/2016 09:35 AM, Andreas F?rber wrote: > Am 14.04.2016 um 16:07 schrieb Alexander Graf: >> The bootefi cmd today fetches its device tree pointer from either the >> location appointed by "fdt addr" with a fallback to the U-Boot control >> fdt. >> >> This integration is unusual for U-Boot and diverges from the way we >> usually handle parameters to boot commands. So let's pass the fdt >> directly into the bootefi command instead and move the control fdt >> logic into the distro boot script. >> diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h >> index ad9045e..dddebc3 100644 >> --- a/include/config_distro_bootcmd.h >> +++ b/include/config_distro_bootcmd.h >> @@ -103,12 +103,15 @@ >> "boot_efi_binary=" \ >> "load ${devtype} ${devnum}:${distro_bootpart} " \ >> "${kernel_addr_r} efi/boot/"BOOTEFI_NAME"; " \ >> - "bootefi ${kernel_addr_r}\0" \ >> + "if fdt addr ${fdt_addr_r}; then " \ >> + "bootefi ${kernel_addr_r} ${fdt_addr_r};" \ >> + "else" \ >> + "bootefi ${kernel_addr_r} ${fdtcontroladdr};" \ > > Stephen, didn't you say you had problems with this? Might've been nice > to put this behavioral change into a separate patch as before, but well: > > Reviewed-by: Andreas F?rber The issue was with bootefi assuming that the control FDT was what gets passed to the EFI binary. With the above, the command takes an explicit parameter and hence makes no such assumption. It would be nice if there was an "fdt validate its a device tree" rather than "fdt addr" command to use here, but there isn't right now.