[U-Boot] [RFC] efi_loader: efi_exit_caches()
Heinrich Schuchardt
xypron.glpk at gmx.de
Sun Sep 23 11:35:02 UTC 2018
Hello Alex,
function efi_exit_caches() is called by efi_exit_boot_services(). It
calls cleanup_before_linux() if efi_direct_boot is set.
Comments in the code say
<cite>
If we're running on nasty systems (32bit ARM booting into non-EFI Linux)
we need to do trickery with caches. Since we don't want to break the EFI
aware boot path, only apply hacks when loading exiting directly
(breaking direct Linux EFI booting along the way - oh well).
GRUB on 32bit ARM needs to have caches disabled before jumping into
a zImage, but does not know of all cache layers. Give it a hand.
</cite>
Why should this requirement depend on whether GRUB is loaded directly or
via iPXE or the EFI Shell? And why would we want to kill loading Linux
directly via bootefi?
Why should GRUB-efi load an operating system via anything but the EFI stub?
I would like to eliminate the variable efi_is_direct_boot and let
do_bootefi() call efi_start_image() removing the current code duplication.
The current implementation of efi_start_image() is incomplete as it does
not keep track of the currently running image (see the specification of
the UnloadImage() and Exit() services for the reason why we need this).
I would hesitate to program this in multiple places.
This coding in question was introduced with one of your first EFI patches:
bee91169f5b2 ("efi_loader: Add boot time services")
Best regards
Heinrich
More information about the U-Boot
mailing list