Bug in distro_efi_boot()

Hello Simon,
In function distro_efi_boot() the bootefi command is called. The second argument should only be passed if a device-tree has actually been loaded. But this is not what the code does:
For network boot methods the value of $fdt_addr_r is passed as second parameter though possibly no file has been loaded there. We should not pass a second parameter to bootefi in this case if no device-tree was loaded. The bootefi command will fall back to the U-Boot device-tree in this case.
For other boot methods gd->fdt_blob is passed as second parameter. We should not pass a second parameter in this case either.
Best regards
Heinrich

Hi Heinrich,
On Wed, 15 Nov 2023 at 17:54, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
Hello Simon,
In function distro_efi_boot() the bootefi command is called. The second argument should only be passed if a device-tree has actually been loaded. But this is not what the code does:
For network boot methods the value of $fdt_addr_r is passed as second parameter though possibly no file has been loaded there. We should not pass a second parameter to bootefi in this case if no device-tree was loaded. The bootefi command will fall back to the U-Boot device-tree in this case.
For other boot methods gd->fdt_blob is passed as second parameter. We should not pass a second parameter in this case either.
OK, thanks for the bug report. Can you send a patch?
Regards, Simon
participants (2)
-
Heinrich Schuchardt
-
Simon Glass