Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'efi-fixes-for-v7.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi

Pull EFI fixes from Ard Biesheuvel:
"Mixed bag of EFI tweaks and bug fixes:

- Add a missing symbol export spotted by Arnd's randconfig testing

- Fix kexec from a kernel booted with 'noefi'

- Fix memblock handling of the unaccepted memory table

- Constify an occurrence of struct efivar_operations

- Add Ilias as EFI reviewer"

* tag 'efi-fixes-for-v7.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
efi: Align unaccepted memory range to page boundary
efi: Fix reservation of unaccepted memory table
MAINTAINERS: Add a reviewer entry for EFI
efi: stmm: Constify struct efivar_operations
x86/kexec: Copy ACPI root pointer address from config table
efi: export sysfb_primary_display for EDID

+30 -15
+1
MAINTAINERS
··· 9638 9638 9639 9639 EXTENSIBLE FIRMWARE INTERFACE (EFI) 9640 9640 M: Ard Biesheuvel <ardb@kernel.org> 9641 + R: Ilias Apalodimas <ilias.apalodimas@linaro.org> 9641 9642 L: linux-efi@vger.kernel.org 9642 9643 S: Maintained 9643 9644 T: git git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
+7
arch/x86/kernel/kexec-bzimage64.c
··· 193 193 struct efi_info *current_ei = &boot_params.efi_info; 194 194 struct efi_info *ei = &params->efi_info; 195 195 196 + if (!params->acpi_rsdp_addr) { 197 + if (efi.acpi20 != EFI_INVALID_TABLE_ADDR) 198 + params->acpi_rsdp_addr = efi.acpi20; 199 + else if (efi.acpi != EFI_INVALID_TABLE_ADDR) 200 + params->acpi_rsdp_addr = efi.acpi; 201 + } 202 + 196 203 if (!efi_enabled(EFI_RUNTIME_SERVICES)) 197 204 return 0; 198 205
+1 -1
drivers/firmware/efi/efi-init.c
··· 60 60 * x86 defines its own instance of sysfb_primary_display and uses 61 61 * it even without EFI, everything else can get them from here. 62 62 */ 63 - #if !defined(CONFIG_X86) && (defined(CONFIG_SYSFB) || defined(CONFIG_EFI_EARLYCON)) 63 + #if !defined(CONFIG_X86) && (defined(CONFIG_SYSFB) || defined(CONFIG_EFI_EARLYCON)) || defined(CONFIG_FIRMWARE_EDID) 64 64 struct sysfb_display_info sysfb_primary_display __section(".data"); 65 65 EXPORT_SYMBOL_GPL(sysfb_primary_display); 66 66 #endif
+4 -4
drivers/firmware/efi/efi.c
··· 692 692 693 693 static __init void reserve_unaccepted(struct efi_unaccepted_memory *unaccepted) 694 694 { 695 - phys_addr_t start, size; 695 + phys_addr_t start, end; 696 696 697 697 start = PAGE_ALIGN_DOWN(efi.unaccepted); 698 - size = PAGE_ALIGN(sizeof(*unaccepted) + unaccepted->size); 698 + end = PAGE_ALIGN(efi.unaccepted + sizeof(*unaccepted) + unaccepted->size); 699 699 700 - memblock_add(start, size); 701 - memblock_reserve(start, size); 700 + memblock_add(start, end - start); 701 + memblock_reserve(start, end - start); 702 702 } 703 703 704 704 int __init efi_config_parse_tables(const efi_config_table_t *config_tables,
+9 -8
drivers/firmware/efi/stmm/tee_stmm_efi.c
··· 14 14 #include "mm_communication.h" 15 15 16 16 static struct efivars tee_efivars; 17 - static struct efivar_operations tee_efivar_ops; 18 17 19 18 static size_t max_buffer_size; /* comm + var + func + data */ 20 19 static size_t max_payload_size; /* func + data */ ··· 519 520 efivars_generic_ops_register(); 520 521 } 521 522 523 + static const struct efivar_operations tee_efivar_ops = { 524 + .get_variable = tee_get_variable, 525 + .get_next_variable = tee_get_next_variable, 526 + .set_variable = tee_set_variable, 527 + .set_variable_nonblocking = tee_set_variable_nonblocking, 528 + .query_variable_store = efi_query_variable_store, 529 + .query_variable_info = tee_query_variable_info, 530 + }; 531 + 522 532 static int tee_stmm_efi_probe(struct tee_client_device *tee_dev) 523 533 { 524 534 struct device *dev = &tee_dev->dev; ··· 565 557 max_buffer_size = MM_COMMUNICATE_HEADER_SIZE + 566 558 MM_VARIABLE_COMMUNICATE_SIZE + 567 559 max_payload_size; 568 - 569 - tee_efivar_ops.get_variable = tee_get_variable; 570 - tee_efivar_ops.get_next_variable = tee_get_next_variable; 571 - tee_efivar_ops.set_variable = tee_set_variable; 572 - tee_efivar_ops.set_variable_nonblocking = tee_set_variable_nonblocking; 573 - tee_efivar_ops.query_variable_store = efi_query_variable_store; 574 - tee_efivar_ops.query_variable_info = tee_query_variable_info; 575 560 576 561 efivars_generic_ops_unregister(); 577 562 pr_info("Using TEE-based EFI runtime variable services\n");
+8 -2
drivers/firmware/efi/unaccepted_memory.c
··· 35 35 struct efi_unaccepted_memory *unaccepted; 36 36 unsigned long range_start, range_end; 37 37 struct accept_range range, *entry; 38 - phys_addr_t end = start + size; 39 38 unsigned long flags; 39 + phys_addr_t end; 40 40 u64 unit_size; 41 41 42 42 unaccepted = efi_get_unaccepted_table(); 43 43 if (!unaccepted) 44 44 return; 45 + 46 + end = PAGE_ALIGN(start + size); 47 + start = PAGE_ALIGN_DOWN(start); 45 48 46 49 unit_size = unaccepted->unit_size; 47 50 ··· 163 160 bool range_contains_unaccepted_memory(phys_addr_t start, unsigned long size) 164 161 { 165 162 struct efi_unaccepted_memory *unaccepted; 166 - phys_addr_t end = start + size; 167 163 unsigned long flags; 168 164 bool ret = false; 165 + phys_addr_t end; 169 166 u64 unit_size; 170 167 171 168 unaccepted = efi_get_unaccepted_table(); 172 169 if (!unaccepted) 173 170 return false; 171 + 172 + end = PAGE_ALIGN(start + size); 173 + start = PAGE_ALIGN_DOWN(start); 174 174 175 175 unit_size = unaccepted->unit_size; 176 176