
From: Simon Glass <sjg@chromium.org> This work-around dates from 2019 and grub 2.04 which is quite old. New builds of grub don't have the problem and old boards presumably use an older U-Boot, so don't need this. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> --- configs/mt7623n_bpir2_defconfig | 1 - lib/efi_loader/Kconfig | 10 ---------- lib/efi_loader/efi_boottime.c | 26 -------------------------- 3 files changed, 37 deletions(-) diff --git a/configs/mt7623n_bpir2_defconfig b/configs/mt7623n_bpir2_defconfig index 42da25ee4ca..44ebbc8e56e 100644 --- a/configs/mt7623n_bpir2_defconfig +++ b/configs/mt7623n_bpir2_defconfig @@ -13,7 +13,6 @@ CONFIG_DEFAULT_DEVICE_TREE="mt7623n-bananapi-bpi-r2" CONFIG_TARGET_MT7623=y CONFIG_SYS_BOOTM_LEN=0x4000000 CONFIG_SYS_LOAD_ADDR=0x84000000 -# CONFIG_EFI_GRUB_ARM32_WORKAROUND is not set CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_DISTRO_DEFAULTS=y diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index a10c0a819f5..80549382694 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -498,16 +498,6 @@ config EFI_LOADER_BOUNCE_BUFFER hardware we can create a bounce buffer so that payloads don't have to worry about platform details. -config EFI_GRUB_ARM32_WORKAROUND - bool "Workaround for GRUB on 32bit ARM" - default n if ARCH_BCM283X || ARCH_SUNXI || ARCH_QEMU_ARM - default y - depends on ARM && !ARM64 - help - GRUB prior to version 2.04 requires U-Boot to disable caches. This - workaround currently is also needed on systems with caches that - cannot be managed via CP15. - config EFI_ESRT bool "Enable the UEFI ESRT generation" depends on EFI_CAPSULE_FIRMWARE_MANAGEMENT diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index c1634cb0203..d90f9020ccb 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -2154,29 +2154,6 @@ error: return EFI_EXIT(ret); } -/** - * efi_exit_caches() - fix up caches for EFI payloads if necessary - */ -static void efi_exit_caches(void) -{ -#if defined(CONFIG_EFI_GRUB_ARM32_WORKAROUND) - /* - * Boooting Linux via GRUB prior to version 2.04 fails on 32bit ARM if - * caches are enabled. - * - * TODO: - * According to the UEFI spec caches that can be managed via CP15 - * operations should be enabled. Caches requiring platform information - * to manage should be disabled. This should not happen in - * ExitBootServices() but before invoking any UEFI binary is invoked. - * - * We want to keep the current workaround while GRUB prior to version - * 2.04 is still in use. - */ - cleanup_before_linux(); -#endif -} - /** * efi_exit_boot_services() - stop all boot services * @image_handle: handle of the loaded image @@ -2260,9 +2237,6 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle, /* Patch out unsupported runtime function */ efi_runtime_detach(); - /* Fix up caches for EFI payloads if necessary */ - efi_exit_caches(); - /* Disable boot time services */ systab.con_in_handle = NULL; systab.con_in = NULL; -- 2.43.0