Skip to contentSkip to conversation

Bug in distro_efi_boot()

DISCUSSION Heinrich Schuchardt 2 participants 2 messages Nov 16, 2023

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

Hi Heinrich,

Quoted 7 lines · Heinrich Schuchardt

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:

Quoted 8 lines

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