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:
"Two fixes: a large-system fix and an earlyprintk fix with certain
resolutions"

* 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/earlyprintk/efi: Fix infinite loop on some screen widths
x86/efi: Allocate e820 buffer before calling efi_exit_boot_service

+42 -25
+41 -24
arch/x86/boot/compressed/eboot.c
··· 1 + 1 2 /* ----------------------------------------------------------------------- 2 3 * 3 4 * Copyright 2011 Intel Corporation; author Matt Fleming ··· 635 634 return status; 636 635 } 637 636 637 + static efi_status_t allocate_e820(struct boot_params *params, 638 + struct setup_data **e820ext, 639 + u32 *e820ext_size) 640 + { 641 + unsigned long map_size, desc_size, buff_size; 642 + struct efi_boot_memmap boot_map; 643 + efi_memory_desc_t *map; 644 + efi_status_t status; 645 + __u32 nr_desc; 646 + 647 + boot_map.map = ↦ 648 + boot_map.map_size = &map_size; 649 + boot_map.desc_size = &desc_size; 650 + boot_map.desc_ver = NULL; 651 + boot_map.key_ptr = NULL; 652 + boot_map.buff_size = &buff_size; 653 + 654 + status = efi_get_memory_map(sys_table, &boot_map); 655 + if (status != EFI_SUCCESS) 656 + return status; 657 + 658 + nr_desc = buff_size / desc_size; 659 + 660 + if (nr_desc > ARRAY_SIZE(params->e820_table)) { 661 + u32 nr_e820ext = nr_desc - ARRAY_SIZE(params->e820_table); 662 + 663 + status = alloc_e820ext(nr_e820ext, e820ext, e820ext_size); 664 + if (status != EFI_SUCCESS) 665 + return status; 666 + } 667 + 668 + return EFI_SUCCESS; 669 + } 670 + 638 671 struct exit_boot_struct { 639 672 struct boot_params *boot_params; 640 673 struct efi_info *efi; 641 - struct setup_data *e820ext; 642 - __u32 e820ext_size; 643 674 }; 644 675 645 676 static efi_status_t exit_boot_func(efi_system_table_t *sys_table_arg, 646 677 struct efi_boot_memmap *map, 647 678 void *priv) 648 679 { 649 - static bool first = true; 650 680 const char *signature; 651 681 __u32 nr_desc; 652 682 efi_status_t status; 653 683 struct exit_boot_struct *p = priv; 654 - 655 - if (first) { 656 - nr_desc = *map->buff_size / *map->desc_size; 657 - if (nr_desc > ARRAY_SIZE(p->boot_params->e820_table)) { 658 - u32 nr_e820ext = nr_desc - 659 - ARRAY_SIZE(p->boot_params->e820_table); 660 - 661 - status = alloc_e820ext(nr_e820ext, &p->e820ext, 662 - &p->e820ext_size); 663 - if (status != EFI_SUCCESS) 664 - return status; 665 - } 666 - first = false; 667 - } 668 684 669 685 signature = efi_is_64bit() ? EFI64_LOADER_SIGNATURE 670 686 : EFI32_LOADER_SIGNATURE; ··· 705 687 { 706 688 unsigned long map_sz, key, desc_size, buff_size; 707 689 efi_memory_desc_t *mem_map; 708 - struct setup_data *e820ext; 709 - __u32 e820ext_size; 690 + struct setup_data *e820ext = NULL; 691 + __u32 e820ext_size = 0; 710 692 efi_status_t status; 711 693 __u32 desc_version; 712 694 struct efi_boot_memmap map; ··· 720 702 map.buff_size = &buff_size; 721 703 priv.boot_params = boot_params; 722 704 priv.efi = &boot_params->efi_info; 723 - priv.e820ext = NULL; 724 - priv.e820ext_size = 0; 705 + 706 + status = allocate_e820(boot_params, &e820ext, &e820ext_size); 707 + if (status != EFI_SUCCESS) 708 + return status; 725 709 726 710 /* Might as well exit boot services now */ 727 711 status = efi_exit_boot_services(sys_table, handle, &map, &priv, 728 712 exit_boot_func); 729 713 if (status != EFI_SUCCESS) 730 714 return status; 731 - 732 - e820ext = priv.e820ext; 733 - e820ext_size = priv.e820ext_size; 734 715 735 716 /* Historic? */ 736 717 boot_params->alt_mem_k = 32 * 1024;
+1 -1
arch/x86/platform/efi/early_printk.c
··· 183 183 num--; 184 184 } 185 185 186 - if (efi_x >= si->lfb_width) { 186 + if (efi_x + font->width > si->lfb_width) { 187 187 efi_x = 0; 188 188 efi_y += font->height; 189 189 }