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 branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull EFI fixes from Ingo Molnar:
"A fix for EFI capsules and an SGI UV platform fix"

* 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
efi/capsule: Allocate whole capsule into virtual memory
x86/platform/uv: Skip UV runtime services mapping in the efi_runtime_disabled case

+10 -7
+2 -1
arch/x86/platform/uv/bios_uv.c
··· 187 187 void uv_bios_init(void) 188 188 { 189 189 uv_systab = NULL; 190 - if ((efi.uv_systab == EFI_INVALID_TABLE_ADDR) || !efi.uv_systab) { 190 + if ((efi.uv_systab == EFI_INVALID_TABLE_ADDR) || 191 + !efi.uv_systab || efi_runtime_disabled()) { 191 192 pr_crit("UV: UVsystab: missing\n"); 192 193 return; 193 194 }
+5 -3
drivers/firmware/efi/capsule-loader.c
··· 16 16 #include <linux/slab.h> 17 17 #include <linux/mutex.h> 18 18 #include <linux/efi.h> 19 + #include <linux/vmalloc.h> 19 20 20 21 #define NO_FURTHER_WRITE_ACTION -1 21 22 ··· 109 108 int ret; 110 109 void *cap_hdr_temp; 111 110 112 - cap_hdr_temp = kmap(cap_info->pages[0]); 111 + cap_hdr_temp = vmap(cap_info->pages, cap_info->index, 112 + VM_MAP, PAGE_KERNEL); 113 113 if (!cap_hdr_temp) { 114 - pr_debug("%s: kmap() failed\n", __func__); 114 + pr_debug("%s: vmap() failed\n", __func__); 115 115 return -EFAULT; 116 116 } 117 117 118 118 ret = efi_capsule_update(cap_hdr_temp, cap_info->pages); 119 - kunmap(cap_info->pages[0]); 119 + vunmap(cap_hdr_temp); 120 120 if (ret) { 121 121 pr_err("%s: efi_capsule_update() failed\n", __func__); 122 122 return ret;
+3 -3
drivers/firmware/efi/capsule.c
··· 190 190 * map the capsule described by @capsule with its data in @pages and 191 191 * send it to the firmware via the UpdateCapsule() runtime service. 192 192 * 193 - * @capsule must be a virtual mapping of the first page in @pages 194 - * (@pages[0]) in the kernel address space. That is, a 195 - * capsule_header_t that describes the entire contents of the capsule 193 + * @capsule must be a virtual mapping of the complete capsule update in the 194 + * kernel address space, as the capsule can be consumed immediately. 195 + * A capsule_header_t that describes the entire contents of the capsule 196 196 * must be at the start of the first data page. 197 197 * 198 198 * Even though this function will validate that the firmware supports