Hi Heinrich, On Tue, 19 Jan 2021 at 11:43, Heinrich Schuchardt <xypron.g...@gmx.de> wrote: > > On 1/19/21 7:06 PM, Simon Glass wrote: > > Hi Heinrich, > > > > On Tue, 12 Jan 2021 at 12:58, Heinrich Schuchardt <xypron.g...@gmx.de> > > wrote: > >> > >> Up to now the bootefi command used the last file loaded to determine the > >> boot partition. This has led to errors when the fdt had been loaded from > >> another partition after the EFI binary. > >> > >> Before setting the boot device from a loaded file check if it is a PE-COFF > >> image or a FIT image. > >> > >> For a PE-COFF image remember address and size, boot device and path. > >> > >> For a FIT image remember boot device and path. > >> > >> If the PE-COFF image is overwritten by loading another file, forget it. > >> > >> Do not allow to start an image via bootefi which is not the last loaded > >> PE-COFF image. > >> > >> Signed-off-by: Heinrich Schuchardt <xypron.g...@gmx.de> > >> --- > >> cmd/bootefi.c | 136 ++++++++++++++++++++++++++----------------- > >> doc/uefi/uefi.rst | 11 ++-- > >> fs/fs.c | 3 +- > >> include/efi_loader.h | 6 +- > >> net/tftp.c | 9 ++- > >> 5 files changed, 98 insertions(+), 67 deletions(-) > >> > > > > Does this need an update to the tests? > > Our current tests still run successfully. > > The observed problematic behavior is not covered by our tests. To run > GRUB or helloworld.efi we just load one file and execute it. > > So it would make sense to extend the coverage of our tests with a future > patch.
Yes indeed. Regards, Simon