Pull EFI fixes from Ard Biesheuvel: - avoid UEFI v2.00+ runtime services on Apple Mac systems, as they have been reported to cause crashes, and most Macs claim to be EFI v1.10 anyway - avoid a spurious boot time warning on arm64 systems with 64k pages * tag 'efi-urgent-for-v5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi: runtime: avoid EFIv2 runtime services on Apple x86 machines efi/libstub: arm64: Fix image check alignment at entry
Unified · Split
| @@ -722,6 +722,13 @@ void __init efi_systab_report_header(const efi_table_hdr_t *systab_hdr, · 721 unmodified lines | ||
| 722 | 722 | systab_hdr->revision >> 16, |
| 723 | 723 | systab_hdr->revision & 0xffff, |
| 724 | 724 | vendor); |
| 725 | + | |
| 726 | + if (IS_ENABLED(CONFIG_X86_64) && | |
| 727 | + systab_hdr->revision > EFI_1_10_SYSTEM_TABLE_REVISION && | |
| 728 | + !strcmp(vendor, "Apple")) { | |
| 729 | + pr_info("Apple Mac detected, using EFI v1.10 runtime services only\n"); | |
| 730 | + efi.runtime_version = EFI_1_10_SYSTEM_TABLE_REVISION; | |
| 731 | + } | |
| 725 | 732 | } |
| 726 | 733 | |
| 727 | 734 | static __initdata char memory_type_name[][13] = { |
| @@ -119,9 +119,9 @@ efi_status_t handle_kernel_image(unsigned long *image_addr, · 118 unmodified lines | ||
| 119 | 119 | if (image->image_base != _text) |
| 120 | 120 | efi_err("FIRMWARE BUG: efi_loaded_image_t::image_base has bogus value\n"); |
| 121 | 121 | |
| 122 | − if (!IS_ALIGNED((u64)_text, EFI_KIMG_ALIGN)) | |
| 123 | − efi_err("FIRMWARE BUG: kernel image not aligned on %ldk boundary\n", | |
| 124 | − EFI_KIMG_ALIGN >> 10); | |
| 122 | + if (!IS_ALIGNED((u64)_text, SEGMENT_ALIGN)) | |
| 123 | + efi_err("FIRMWARE BUG: kernel image not aligned on %dk boundary\n", | |
| 124 | + SEGMENT_ALIGN >> 10); | |
| 125 | 125 | |
| 126 | 126 | kernel_size = _edata - _text; |
| 127 | 127 | kernel_memsize = kernel_size + (_end - _edata); |