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:
"Three EFI fixes:

- Fix a slow-boot-scrolling regression but making sure we use WC for
EFI earlycon framebuffer mappings on x86

- Fix a mixed EFI mode boot crash

- Disable paging explicitly before entering startup_32() in mixed
mode bootup"

* 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/efistub: Disable paging at mixed mode entry
efi/libstub/random: Initialize pointer variables to zero for mixed mode
efi/earlycon: Fix write-combine mapping on x86

+15 -12
+5
arch/x86/boot/compressed/head_64.S
··· 244 244 leal efi32_config(%ebp), %eax 245 245 movl %eax, efi_config(%ebp) 246 246 247 + /* Disable paging */ 248 + movl %cr0, %eax 249 + btrl $X86_CR0_PG_BIT, %eax 250 + movl %eax, %cr0 251 + 247 252 jmp startup_32 248 253 SYM_FUNC_END(efi32_stub_entry) 249 254 #endif
+7 -9
drivers/firmware/efi/earlycon.c
··· 17 17 static const struct font_desc *font; 18 18 static u32 efi_x, efi_y; 19 19 static u64 fb_base; 20 - static pgprot_t fb_prot; 20 + static bool fb_wb; 21 21 static void *efi_fb; 22 22 23 23 /* ··· 33 33 if (!earlycon_console || !(earlycon_console->flags & CON_ENABLED)) 34 34 return 0; 35 35 36 - if (pgprot_val(fb_prot) == pgprot_val(PAGE_KERNEL)) 37 - efi_fb = memremap(fb_base, screen_info.lfb_size, MEMREMAP_WB); 38 - else 39 - efi_fb = memremap(fb_base, screen_info.lfb_size, MEMREMAP_WC); 36 + efi_fb = memremap(fb_base, screen_info.lfb_size, 37 + fb_wb ? MEMREMAP_WB : MEMREMAP_WC); 40 38 41 39 return efi_fb ? 0 : -ENOMEM; 42 40 } ··· 51 53 52 54 static __ref void *efi_earlycon_map(unsigned long start, unsigned long len) 53 55 { 56 + pgprot_t fb_prot; 57 + 54 58 if (efi_fb) 55 59 return efi_fb + start; 56 60 61 + fb_prot = fb_wb ? PAGE_KERNEL : pgprot_writecombine(PAGE_KERNEL); 57 62 return early_memremap_prot(fb_base + start, len, pgprot_val(fb_prot)); 58 63 } 59 64 ··· 216 215 if (screen_info.capabilities & VIDEO_CAPABILITY_64BIT_BASE) 217 216 fb_base |= (u64)screen_info.ext_lfb_base << 32; 218 217 219 - if (opt && !strcmp(opt, "ram")) 220 - fb_prot = PAGE_KERNEL; 221 - else 222 - fb_prot = pgprot_writecombine(PAGE_KERNEL); 218 + fb_wb = opt && !strcmp(opt, "ram"); 223 219 224 220 si = &screen_info; 225 221 xres = si->lfb_width;
+3 -3
drivers/firmware/efi/libstub/random.c
··· 33 33 { 34 34 efi_guid_t rng_proto = EFI_RNG_PROTOCOL_GUID; 35 35 efi_status_t status; 36 - struct efi_rng_protocol *rng; 36 + struct efi_rng_protocol *rng = NULL; 37 37 38 38 status = efi_call_early(locate_protocol, &rng_proto, NULL, 39 39 (void **)&rng); ··· 162 162 efi_guid_t rng_proto = EFI_RNG_PROTOCOL_GUID; 163 163 efi_guid_t rng_algo_raw = EFI_RNG_ALGORITHM_RAW; 164 164 efi_guid_t rng_table_guid = LINUX_EFI_RANDOM_SEED_TABLE_GUID; 165 - struct efi_rng_protocol *rng; 166 - struct linux_efi_random_seed *seed; 165 + struct efi_rng_protocol *rng = NULL; 166 + struct linux_efi_random_seed *seed = NULL; 167 167 efi_status_t status; 168 168 169 169 status = efi_call_early(locate_protocol, &rng_proto, NULL,