--- zzzz-none-000/linux-5.15.111/arch/x86/platform/efi/quirks.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-atom-6670-761/linux-5.15.111/arch/x86/platform/efi/quirks.c 2024-02-07 10:22:36.000000000 +0000 @@ -1,4 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-only + /* + * Includes Maxlinear's changes/modifications dated: 2022. + * Changed/modified portions - Copyright (c) 2022 Maxlinear, Inc. + */ #define pr_fmt(fmt) "efi: " fmt #include @@ -370,6 +374,7 @@ } } +#ifndef CONFIG_X86_PUMA7 /* * Apart from having VA mappings for EFI boot services code/data regions, * (duplicate) 1:1 mappings were also created as a quirk for buggy firmware. So, @@ -395,6 +400,7 @@ if (kernel_unmap_pages_in_pgd(pgd, va, md->num_pages)) pr_err("Failed to unmap VA mapping for 0x%llx\n", va); } +#endif void __init efi_free_boot_services(void) { @@ -425,11 +431,19 @@ } /* + * Maxlinear: + * Since the memory reserved for efi is used (see efi.c). + * This function clears the memory that is no longer used in efi. + * Disable this function for puma7 to avoid a panic. + */ +#ifndef CONFIG_X86_PUMA7 + /* * Before calling set_virtual_address_map(), EFI boot services * code/data regions were mapped as a quirk for buggy firmware. * Unmap them from efi_pgd before freeing them up. */ efi_unmap_pages(md); +#endif /* * Nasty quirk: if all sub-1MB memory is used for boot