More EFI changes for v5.8
Ard Biesheuvel
maintainerThe following changes since commit 4da0b2b7e67524cc206067865666899bc02e1cb0:
efi/libstub: Re-enable command line initrd loading for x86 (2020-04-25 12:26:32 +0200)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git efi-next
for you to fetch changes up to 4026229934f6ca0cb44af7b9df00e647b2f1f787:
efi/libstub: Correct comment typos (2020-05-06 11:27:55 +0200)
----------------------------------------------------------------
More EFI changes for v5.8:
- Rename pr_efi/pr_efi_err to efi_info/efi_err, and use them consistently
- Simplify and unify initrd loading
- Parse the builtin command line on x86 (if provided)
- Some fixes for issues introduced by the first batch of v5.8 changes
----------------------------------------------------------------
Ard Biesheuvel (2):
efi/libstub/x86: Work around LLVM ELF quirk build regression efi/libstub: Make efi_printk() input argument const char*
Arvind Sankar (12):
efi/x86: Use correct size for boot_params efi/libstub: Add a helper function to split 64-bit values efi/libstub: Move pr_efi/pr_efi_err into efi namespace efi/x86: Use efi_err for error messages
efi/gop: Use efi_err for error messages
efi/tpm: Use efi_err for error messages efi/libstub: Upgrade ignored dtb= argument message to error efi/x86: Move command-line initrd loading to efi_main efi/libstub: Unify initrd loading across architectures efi/x86: Support builtin command line efi/libstub: Check return value of efi_parse_options efi/libstub: Fix mixed mode boot issue after macro refactor
Joe Perches (1):
efi/libstub: Correct comment typos
arch/x86/include/asm/efi.h | 19 +++- drivers/firmware/efi/libstub/Makefile | 1 + drivers/firmware/efi/libstub/arm32-stub.c | 12 +-- drivers/firmware/efi/libstub/arm64-stub.c | 14 +-- drivers/firmware/efi/libstub/efi-stub-helper.c | 65 ++++++++++--- drivers/firmware/efi/libstub/efi-stub.c | 63 +++++++------ drivers/firmware/efi/libstub/efistub.h | 48 ++++------ drivers/firmware/efi/libstub/fdt.c | 16 ++-- drivers/firmware/efi/libstub/file.c | 12 +-- drivers/firmware/efi/libstub/gop.c | 16 ++-- drivers/firmware/efi/libstub/pci.c | 10 +- drivers/firmware/efi/libstub/relocate.c | 4 +- drivers/firmware/efi/libstub/secureboot.c | 4 +- drivers/firmware/efi/libstub/tpm.c | 2 +- drivers/firmware/efi/libstub/x86-stub.c | 122 +++++++++++-------------- 15 files changed, 216 insertions(+), 192 deletions(-)
Ard Biesheuvel
maintainerPATCH 1/15 efi/x86: Use correct size for boot_params
From: Arvind Sankar <[email protected]>
struct boot_params is only 4096 bytes, not 16384. Fix this by using sizeof(struct boot_params) instead of hardcoding the incorrect value.
--- drivers/firmware/efi/libstub/x86-stub.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/firmware/efi/libstub/x86-stub.c +4 -3
@@ -379,13 +379,14 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, image_base =efi_table_attr (image, image_base); image_offset = (void *)startup_32 - image_base; - status =efi_allocate_pages (0x4000 , (unsigned long *)&boot_params,ULONG_MAX ); + status =efi_allocate_pages (sizeof (struct boot_params ), + (unsigned long *)&boot_params,ULONG_MAX );if (status !=EFI_SUCCESS ) {efi_printk ("Failed to allocate lowmem for boot params\n" );efi_exit (handle, status); } -memset (boot_params,0x0 ,0x4000 ); +memset (boot_params,0x0 ,sizeof (struct boot_params )); hdr = &boot_params->hdr;
@@ -439,7 +440,7 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, fail2:efi_free (options_size, (unsigned long )cmdline_ptr); fail: -efi_free (0x4000 , (unsigned long )boot_params); +efi_free (sizeof (struct boot_params ), (unsigned long )boot_params);efi_exit (handle, status); }
Signature · 1 line
2.17.1
Ard Biesheuvel
maintainerPATCH 2/15 efi/libstub: Add a helper function to split 64-bit values
In reply to Ard BiesheuvelFrom: Arvind Sankar <[email protected]>
In several places 64-bit values need to be split up into two 32-bit fields, in order to be backward-compatible with the old 32-bit ABIs.
Instead of open-coding this, add a helper function to set a 64-bit value as two 32-bit fields.
--- drivers/firmware/efi/libstub/efistub.h | 7 ++++++ drivers/firmware/efi/libstub/gop.c | 6 ++--- drivers/firmware/efi/libstub/x86-stub.c | 32 +++++++++++-------------- 3 files changed, 23 insertions(+), 22 deletions(-)
drivers/firmware/efi/libstub/efistub.h +7 -0
@@ -87,6 +87,13 @@ extern const efi_system_table_t *efi_system_table; ((handle =efi_get_handle_at ((array), i)) || true); \ i++) +static inline +void efi_set_u64_split (u64 data,u32 *lo,u32 *hi) +{ + *lo =lower_32_bits (data); + *hi =upper_32_bits (data); +} +/* * Allocation types for calls to boottime->allocate_pages. */
drivers/firmware/efi/libstub/gop.c +2 -4
@@ -422,7 +422,6 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto,efi_graphics_output_protocol_t *gop;efi_graphics_output_protocol_mode_t *mode;efi_graphics_output_mode_info_t *info; -efi_physical_addr_t fb_base; gop =find_gop (proto, size, handles);
@@ -442,9 +441,8 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto, si->lfb_width = info->horizontal_resolution; si->lfb_height = info->vertical_resolution; - fb_base =efi_table_attr (mode, frame_buffer_base); - si->lfb_base =lower_32_bits (fb_base); - si->ext_lfb_base =upper_32_bits (fb_base); +efi_set_u64_split (efi_table_attr (mode, frame_buffer_base), + &si->lfb_base, &si->ext_lfb_base);if (si->ext_lfb_base) si->capabilities |=VIDEO_CAPABILITY_64BIT_BASE ;
drivers/firmware/efi/libstub/x86-stub.c +14 -18
@@ -408,9 +408,8 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,if (!cmdline_ptr) goto fail; - hdr->cmd_line_ptr = (unsigned long )cmdline_ptr; -/* Fill in upper bits of command line address, NOP on 32 bit */ - boot_params->ext_cmd_line_ptr = (u64 )(unsigned long )cmdline_ptr >>32 ; +efi_set_u64_split ((unsigned long )cmdline_ptr, + &hdr->cmd_line_ptr, &boot_params->ext_cmd_line_ptr); hdr->ramdisk_image =0 ; hdr->ramdisk_size =0 ;
@@ -427,10 +426,10 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, ULONG_MAX);if (status !=EFI_SUCCESS ) goto fail2; - hdr->ramdisk_image = ramdisk_addr &0xffffffff ; - hdr->ramdisk_size = ramdisk_size &0xffffffff ; - boot_params->ext_ramdisk_image = (u64 )ramdisk_addr >>32 ; - boot_params->ext_ramdisk_size = (u64 )ramdisk_size >>32 ; +efi_set_u64_split (ramdisk_addr, &hdr->ramdisk_image, + &boot_params->ext_ramdisk_image); +efi_set_u64_split (ramdisk_size, &hdr->ramdisk_size, + &boot_params->ext_ramdisk_size); } }
@@ -639,17 +638,14 @@ static efi_status_t exit_boot_func(struct efi_boot_memmap *map, : EFI32_LOADER_SIGNATURE;memcpy (&p->efi->efi_loader_signature, signature,sizeof (__u32)); - p->efi->efi_systab = (unsigned long )efi_system_table; +efi_set_u64_split ((unsigned long )efi_system_table, + &p->efi->efi_systab, &p->efi->efi_systab_hi); p->efi->efi_memdesc_size = *map->desc_size; p->efi->efi_memdesc_version = *map->desc_ver; - p->efi->efi_memmap = (unsigned long )*map->map; +efi_set_u64_split ((unsigned long )*map->map, + &p->efi->efi_memmap, &p->efi->efi_memmap_hi); p->efi->efi_memmap_size = *map->map_size; -#ifdef CONFIG_X86_64 - p->efi->efi_systab_hi = (unsigned long )efi_system_table >>32 ; - p->efi->efi_memmap_hi = (unsigned long )*map->map >>32 ; -#endif -return EFI_SUCCESS ; }
@@ -785,10 +781,10 @@ unsigned long efi_main(efi_handle_t handle, status =efi_load_initrd_dev_path (&addr, &size,ULONG_MAX );if (status ==EFI_SUCCESS ) { - hdr->ramdisk_image = (u32 )addr; - hdr->ramdisk_size = (u32 )size; - boot_params->ext_ramdisk_image = (u64 )addr >>32 ; - boot_params->ext_ramdisk_size = (u64 )size >>32 ; +efi_set_u64_split (addr, &hdr->ramdisk_image, + &boot_params->ext_ramdisk_image); +efi_set_u64_split (size, &hdr->ramdisk_size, + &boot_params->ext_ramdisk_size); }else if (status !=EFI_NOT_FOUND ) {efi_printk ("efi_load_initrd_dev_path() failed!\n" ); goto fail;
Signature · 1 line
2.17.1
Ard Biesheuvel
maintainerPATCH 3/15 efi/libstub: Move pr_efi/pr_efi_err into efi namespace
In reply to Ard BiesheuvelFrom: Arvind Sankar <[email protected]>
Rename pr_efi to efi_info and pr_efi_err to efi_err to make it more obvious that they are part of the EFI stub and not generic printk infra.
--- drivers/firmware/efi/libstub/arm32-stub.c | 12 ++++----- drivers/firmware/efi/libstub/arm64-stub.c | 14 +++++----- drivers/firmware/efi/libstub/efi-stub.c | 32 +++++++++++------------ drivers/firmware/efi/libstub/efistub.h | 4 +-- drivers/firmware/efi/libstub/fdt.c | 16 ++++++------ drivers/firmware/efi/libstub/file.c | 12 ++++----- drivers/firmware/efi/libstub/pci.c | 8 +++--- drivers/firmware/efi/libstub/relocate.c | 2 +- drivers/firmware/efi/libstub/secureboot.c | 4 +-- 9 files changed, 52 insertions(+), 52 deletions(-)
drivers/firmware/efi/libstub/arm32-stub.c +6 -6
@@ -18,7 +18,7 @@ efi_status_t check_platform_features(void)/* LPAE kernels need compatible hardware */ block =cpuid_feature_extract (CPUID_EXT_MMFR0 ,0 );if (block <5 ) { -pr_efi_err ("This LPAE kernel is not supported by your CPU\n" ); +efi_err ("This LPAE kernel is not supported by your CPU\n" );return EFI_UNSUPPORTED ; }return EFI_SUCCESS ;
@@ -120,7 +120,7 @@ static efi_status_t reserve_kernel_base(unsigned long dram_base,*/ status =efi_get_memory_map (&map);if (status !=EFI_SUCCESS ) { -pr_efi_err ("reserve_kernel_base(): Unable to retrieve memory map.\n" ); +efi_err ("reserve_kernel_base(): Unable to retrieve memory map.\n" );return status; }
@@ -162,7 +162,7 @@ static efi_status_t reserve_kernel_base(unsigned long dram_base, (end - start) /EFI_PAGE_SIZE , &start);if (status !=EFI_SUCCESS ) { -pr_efi_err ("reserve_kernel_base(): alloc failed.\n" ); +efi_err ("reserve_kernel_base(): alloc failed.\n" ); goto out; }break ;
@@ -219,7 +219,7 @@ efi_status_t handle_kernel_image(unsigned long *image_addr, status =reserve_kernel_base (kernel_base, reserve_addr, reserve_size);if (status !=EFI_SUCCESS ) { -pr_efi_err ("Unable to allocate memory for uncompressed kernel.\n" ); +efi_err ("Unable to allocate memory for uncompressed kernel.\n" );return status; }
@@ -232,7 +232,7 @@ efi_status_t handle_kernel_image(unsigned long *image_addr, status =efi_relocate_kernel (image_addr, *image_size, *image_size, kernel_base +MAX_UNCOMP_KERNEL_SIZE ,0 ,0 );if (status !=EFI_SUCCESS ) { -pr_efi_err ("Failed to relocate kernel.\n" ); +efi_err ("Failed to relocate kernel.\n" );efi_free (*reserve_size, *reserve_addr); *reserve_size =0 ;return status;
@@ -244,7 +244,7 @@ efi_status_t handle_kernel_image(unsigned long *image_addr,* address at which the zImage is loaded. */ if (*image_addr + *image_size > dram_base +ZIMAGE_OFFSET_LIMIT ) { -pr_efi_err ("Failed to relocate kernel, no low memory available.\n" ); +efi_err ("Failed to relocate kernel, no low memory available.\n" );efi_free (*reserve_size, *reserve_addr); *reserve_size =0 ;efi_free (*image_size, *image_addr);
drivers/firmware/efi/libstub/arm64-stub.c +7 -7
@@ -26,9 +26,9 @@ efi_status_t check_platform_features(void) tg = (read_cpuid (ID_AA64MMFR0_EL1 ) >>ID_AA64MMFR0_TGRAN_SHIFT ) &0xf ;if (tg !=ID_AA64MMFR0_TGRAN_SUPPORTED ) {if (IS_ENABLED (CONFIG_ARM64_64K_PAGES )) -pr_efi_err ("This 64 KB granular kernel is not supported by your CPU\n" ); +efi_err ("This 64 KB granular kernel is not supported by your CPU\n" );else -pr_efi_err ("This 16 KB granular kernel is not supported by your CPU\n" ); +efi_err ("This 16 KB granular kernel is not supported by your CPU\n" );return EFI_UNSUPPORTED ; }return EFI_SUCCESS ;
@@ -59,18 +59,18 @@ efi_status_t handle_kernel_image(unsigned long *image_addr, status =efi_get_random_bytes (sizeof (phys_seed), (u8 *)&phys_seed);if (status ==EFI_NOT_FOUND ) { -pr_efi ("EFI_RNG_PROTOCOL unavailable, no randomness supplied\n" ); +efi_info ("EFI_RNG_PROTOCOL unavailable, no randomness supplied\n" ); }else if (status !=EFI_SUCCESS ) { -pr_efi_err ("efi_get_random_bytes() failed\n" ); +efi_err ("efi_get_random_bytes() failed\n" );return status; } }else { -pr_efi ("KASLR disabled on kernel command line\n" ); +efi_info ("KASLR disabled on kernel command line\n" ); } }if (image->image_base != _text) -pr_efi_err ("FIRMWARE BUG: efi_loaded_image_t::image_base has bogus value\n" ); +efi_err ("FIRMWARE BUG: efi_loaded_image_t::image_base has bogus value\n" ); kernel_size = _edata - _text; kernel_memsize = kernel_size + (_end - _edata);
@@ -102,7 +102,7 @@ efi_status_t handle_kernel_image(unsigned long *image_addr, ULONG_MAX, min_kimg_align);if (status !=EFI_SUCCESS ) { -pr_efi_err ("Failed to relocate kernel\n" ); +efi_err ("Failed to relocate kernel\n" ); *reserve_size =0 ;return status; }
drivers/firmware/efi/libstub/efi-stub.c +16 -16
@@ -69,7 +69,7 @@ static void install_memreserve_table(void) status =efi_bs_call (allocate_pool,EFI_LOADER_DATA ,sizeof (*rsv), (void **)&rsv);if (status !=EFI_SUCCESS ) { -pr_efi_err ("Failed to allocate memreserve entry!\n" ); +efi_err ("Failed to allocate memreserve entry!\n" );return ; }
@@ -80,7 +80,7 @@ static void install_memreserve_table(void) status =efi_bs_call (install_configuration_table, &memreserve_table_guid, rsv);if (status !=EFI_SUCCESS ) -pr_efi_err ("Failed to install memreserve config table!\n" ); +efi_err ("Failed to install memreserve config table!\n" ); }static unsigned long get_dram_base (void )
@@ -182,13 +182,13 @@ efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg) status = efi_system_table->boottime->handle_protocol (handle, &loaded_image_proto, (void *)&image);if (status !=EFI_SUCCESS ) { -pr_efi_err ("Failed to get loaded image protocol\n" ); +efi_err ("Failed to get loaded image protocol\n" ); goto fail; } dram_base =get_dram_base ();if (dram_base ==EFI_ERROR ) { -pr_efi_err ("Failed to find DRAM base\n" ); +efi_err ("Failed to find DRAM base\n" ); status =EFI_LOAD_ERROR ; goto fail; }
@@ -200,7 +200,7 @@ efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg)*/ cmdline_ptr =efi_convert_cmdline (image, &cmdline_size,ULONG_MAX );if (!cmdline_ptr) { -pr_efi_err ("getting command line via LOADED_IMAGE_PROTOCOL\n" ); +efi_err ("getting command line via LOADED_IMAGE_PROTOCOL\n" ); status =EFI_OUT_OF_RESOURCES ; goto fail; }
@@ -213,7 +213,7 @@ efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg)if (!IS_ENABLED (CONFIG_CMDLINE_FORCE ) && cmdline_size >0 )efi_parse_options (cmdline_ptr); -pr_efi ("Booting Linux Kernel...\n" ); +efi_info ("Booting Linux Kernel...\n" ); si =setup_graphics ();
@@ -222,7 +222,7 @@ efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg) &reserve_size, dram_base, image);if (status !=EFI_SUCCESS ) { -pr_efi_err ("Failed to relocate kernel\n" ); +efi_err ("Failed to relocate kernel\n" ); goto fail_free_cmdline; }
@@ -241,42 +241,42 @@ efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg)if (!IS_ENABLED (CONFIG_EFI_ARMSTUB_DTB_LOADER ) || secure_boot != efi_secureboot_mode_disabled) {if (strstr (cmdline_ptr,"dtb=" )) -pr_efi ("Ignoring DTB from command line.\n" ); +efi_info ("Ignoring DTB from command line.\n" ); }else { status =efi_load_dtb (image, &fdt_addr, &fdt_size);if (status !=EFI_SUCCESS ) { -pr_efi_err ("Failed to load device tree!\n" ); +efi_err ("Failed to load device tree!\n" ); goto fail_free_image; } }if (fdt_addr) { -pr_efi ("Using DTB from command line\n" ); +efi_info ("Using DTB from command line\n" ); }else {/* Look for a device tree configuration table entry. */ fdt_addr = (uintptr_t )get_fdt (&fdt_size);if (fdt_addr) -pr_efi ("Using DTB from configuration table\n" ); +efi_info ("Using DTB from configuration table\n" ); }if (!fdt_addr) -pr_efi ("Generating empty DTB\n" ); +efi_info ("Generating empty DTB\n" );if (!efi_noinitrd) { max_addr =efi_get_max_initrd_addr (dram_base, image_addr); status =efi_load_initrd_dev_path (&initrd_addr, &initrd_size, max_addr);if (status ==EFI_SUCCESS ) { -pr_efi ("Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path\n" ); +efi_info ("Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path\n" ); }else if (status ==EFI_NOT_FOUND ) { status =efi_load_initrd (image, &initrd_addr, &initrd_size,ULONG_MAX , max_addr);if (status ==EFI_SUCCESS && initrd_size >0 ) -pr_efi ("Loaded initrd from command line option\n" ); +efi_info ("Loaded initrd from command line option\n" ); }if (status !=EFI_SUCCESS ) -pr_efi_err ("Failed to load initrd!\n" ); +efi_err ("Failed to load initrd!\n" ); }efi_random_get_seed ();
@@ -326,7 +326,7 @@ efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg)/* not reached */ fail_free_initrd: -pr_efi_err ("Failed to update FDT and exit boot services\n" ); +efi_err ("Failed to update FDT and exit boot services\n" );efi_free (initrd_size, initrd_addr);efi_free (fdt_size, fdt_addr);
drivers/firmware/efi/libstub/efistub.h +2 -2
@@ -49,11 +49,11 @@ extern const efi_system_table_t *efi_system_table;#define efi_call_proto (inst, func, ...) inst->func(inst, ##__VA_ARGS__)#endif -#define pr_efi (msg) do { \ +#define efi_info (msg) do { \ if (!efi_quiet) efi_printk("EFI stub: "msg); \ } while (0) -#define pr_efi_err (msg) efi_printk("EFI stub: ERROR: "msg) +#define efi_err (msg) efi_printk("EFI stub: ERROR: "msg)/* Helper macros for the usual case of using simple C variables: */ #ifndef fdt_setprop_inplace_var
drivers/firmware/efi/libstub/fdt.c +8 -8
@@ -39,7 +39,7 @@ static efi_status_t update_fdt(void *orig_fdt, unsigned long orig_fdt_size,/* Do some checks on provided FDT, if it exists: */ if (orig_fdt) {if (fdt_check_header (orig_fdt)) { -pr_efi_err ("Device Tree header not valid!\n" ); +efi_err ("Device Tree header not valid!\n" );return EFI_LOAD_ERROR ; }/*
@@ -47,7 +47,7 @@ static efi_status_t update_fdt(void *orig_fdt, unsigned long orig_fdt_size,* configuration table: */ if (orig_fdt_size &&fdt_totalsize (orig_fdt) > orig_fdt_size) { -pr_efi_err ("Truncated device tree! foo!\n" ); +efi_err ("Truncated device tree! foo!\n" );return EFI_LOAD_ERROR ; } }
@@ -270,16 +270,16 @@ efi_status_t allocate_new_fdt_and_exit_boot(void *handle,*/ status =efi_get_memory_map (&map);if (status !=EFI_SUCCESS ) { -pr_efi_err ("Unable to retrieve UEFI memory map.\n" ); +efi_err ("Unable to retrieve UEFI memory map.\n" );return status; } -pr_efi ("Exiting boot services and installing virtual address map...\n" ); +efi_info ("Exiting boot services and installing virtual address map...\n" ); map.map = &memory_map; status =efi_allocate_pages (MAX_FDT_SIZE , new_fdt_addr, max_addr);if (status !=EFI_SUCCESS ) { -pr_efi_err ("Unable to allocate memory for new device tree.\n" ); +efi_err ("Unable to allocate memory for new device tree.\n" ); goto fail; }
@@ -296,7 +296,7 @@ efi_status_t allocate_new_fdt_and_exit_boot(void *handle, initrd_addr, initrd_size);if (status !=EFI_SUCCESS ) { -pr_efi_err ("Unable to construct new device tree.\n" ); +efi_err ("Unable to construct new device tree.\n" ); goto fail_free_new_fdt; }
@@ -342,7 +342,7 @@ efi_status_t allocate_new_fdt_and_exit_boot(void *handle,return EFI_SUCCESS ; } -pr_efi_err ("Exit boot services failed.\n" ); +efi_err ("Exit boot services failed.\n" ); fail_free_new_fdt:efi_free (MAX_FDT_SIZE , *new_fdt_addr);
@@ -363,7 +363,7 @@ void *get_fdt(unsigned long *fdt_size)return NULL ;if (fdt_check_header (fdt) !=0 ) { -pr_efi_err ("Invalid header detected on UEFI supplied FDT, ignoring ...\n" ); +efi_err ("Invalid header detected on UEFI supplied FDT, ignoring ...\n" );return NULL ; } *fdt_size =fdt_totalsize (fdt);
drivers/firmware/efi/libstub/file.c +6 -6
@@ -46,7 +46,7 @@ static efi_status_t efi_open_file(efi_file_protocol_t *volume, status = volume->open (volume, &fh, fi->filename,EFI_FILE_MODE_READ ,0 );if (status !=EFI_SUCCESS ) { -pr_efi_err ("Failed to open file: " ); +efi_err ("Failed to open file: " );efi_char16_printk (fi->filename);efi_printk ("\n" );return status;
@@ -55,7 +55,7 @@ static efi_status_t efi_open_file(efi_file_protocol_t *volume, info_sz =sizeof (struct finfo ); status = fh->get_info (fh, &info_guid, &info_sz, fi);if (status !=EFI_SUCCESS ) { -pr_efi_err ("Failed to get file info\n" ); +efi_err ("Failed to get file info\n" ); fh->close (fh);return status; }
@@ -75,13 +75,13 @@ static efi_status_t efi_open_volume(efi_loaded_image_t *image, status =efi_bs_call (handle_protocol, image->device_handle, &fs_proto, (void **)&io);if (status !=EFI_SUCCESS ) { -pr_efi_err ("Failed to handle fs_proto\n" ); +efi_err ("Failed to handle fs_proto\n" );return status; } status = io->open_volume (io, fh);if (status !=EFI_SUCCESS ) -pr_efi_err ("Failed to open volume\n" ); +efi_err ("Failed to open volume\n" );return status; }
@@ -191,7 +191,7 @@ efi_status_t handle_cmdline_files(efi_loaded_image_t *image, &alloc_addr, hard_limit);if (status !=EFI_SUCCESS ) { -pr_efi_err ("Failed to allocate memory for files\n" ); +efi_err ("Failed to allocate memory for files\n" ); goto err_close_file; }
@@ -215,7 +215,7 @@ efi_status_t handle_cmdline_files(efi_loaded_image_t *image, status = file->read (file, &chunksize, addr);if (status !=EFI_SUCCESS ) { -pr_efi_err ("Failed to read file\n" ); +efi_err ("Failed to read file\n" ); goto err_close_file; } addr += chunksize;
drivers/firmware/efi/libstub/pci.c +4 -4
@@ -28,21 +28,21 @@ void efi_pci_disable_bridge_busmaster(void)if (status !=EFI_BUFFER_TOO_SMALL ) {if (status !=EFI_SUCCESS && status !=EFI_NOT_FOUND ) -pr_efi_err ("Failed to locate PCI I/O handles'\n" ); +efi_err ("Failed to locate PCI I/O handles'\n" );return ; } status =efi_bs_call (allocate_pool,EFI_LOADER_DATA , pci_handle_size, (void **)&pci_handle);if (status !=EFI_SUCCESS ) { -pr_efi_err ("Failed to allocate memory for 'pci_handle'\n" ); +efi_err ("Failed to allocate memory for 'pci_handle'\n" );return ; } status =efi_bs_call (locate_handle,EFI_LOCATE_BY_PROTOCOL , &pci_proto,NULL , &pci_handle_size, pci_handle);if (status !=EFI_SUCCESS ) { -pr_efi_err ("Failed to locate PCI I/O handles'\n" ); +efi_err ("Failed to locate PCI I/O handles'\n" ); goto free_handle; }
@@ -106,7 +106,7 @@ void efi_pci_disable_bridge_busmaster(void) status =efi_call_proto (pci, pci.write, EfiPciIoWidthUint16,PCI_COMMAND ,1 , &command);if (status !=EFI_SUCCESS ) -pr_efi_err ("Failed to disable PCI busmastering\n" ); +efi_err ("Failed to disable PCI busmastering\n" ); } free_handle:
drivers/firmware/efi/libstub/relocate.c +1 -1
@@ -157,7 +157,7 @@ efi_status_t efi_relocate_kernel(unsigned long *image_addr, min_addr); }if (status !=EFI_SUCCESS ) { -pr_efi_err ("Failed to allocate usable memory for kernel.\n" ); +efi_err ("Failed to allocate usable memory for kernel.\n" );return status; }
drivers/firmware/efi/libstub/secureboot.c +2 -2
@@ -67,10 +67,10 @@ enum efi_secureboot_mode efi_get_secureboot(void)return efi_secureboot_mode_disabled; secure_boot_enabled: -pr_efi ("UEFI Secure Boot is enabled.\n" ); +efi_info ("UEFI Secure Boot is enabled.\n" );return efi_secureboot_mode_enabled; out_efi_err: -pr_efi_err ("Could not determine UEFI Secure Boot status.\n" ); +efi_err ("Could not determine UEFI Secure Boot status.\n" );return efi_secureboot_mode_unknown; }
Signature · 1 line
2.17.1
Ard Biesheuvel
maintainerPATCH 4/15 efi/x86: Use efi_err for error messages
In reply to Ard BiesheuvelFrom: Arvind Sankar <[email protected]>
Use efi_err instead of bare efi_printk for error messages.
--- drivers/firmware/efi/libstub/x86-stub.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/firmware/efi/libstub/x86-stub.c +12 -12
@@ -49,7 +49,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom) status =efi_bs_call (allocate_pool,EFI_LOADER_DATA , size, (void **)&rom);if (status !=EFI_SUCCESS ) { -efi_printk ("Failed to allocate memory for 'rom'\n" ); +efi_err ("Failed to allocate memory for 'rom'\n" );return status; }
@@ -65,7 +65,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom) PCI_VENDOR_ID, 1, &rom->vendor);if (status !=EFI_SUCCESS ) { -efi_printk ("Failed to read rom->vendor\n" ); +efi_err ("Failed to read rom->vendor\n" ); goto free_struct; }
@@ -73,7 +73,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom) PCI_DEVICE_ID, 1, &rom->devid);if (status !=EFI_SUCCESS ) { -efi_printk ("Failed to read rom->devid\n" ); +efi_err ("Failed to read rom->devid\n" ); goto free_struct; }
@@ -118,7 +118,7 @@ static void setup_efi_pci(struct boot_params *params) (void **)&pci_handle);if (status !=EFI_SUCCESS ) { -efi_printk ("Failed to allocate memory for 'pci_handle'\n" ); +efi_err ("Failed to allocate memory for 'pci_handle'\n" );return ; }
@@ -172,7 +172,7 @@ static void retrieve_apple_device_properties(struct boot_params *boot_params)return ;if (efi_table_attr (p, version) !=0x10000 ) { -efi_printk ("Unsupported properties proto version\n" ); +efi_err ("Unsupported properties proto version\n" );return ; }
@@ -185,7 +185,7 @@ static void retrieve_apple_device_properties(struct boot_params *boot_params) size +sizeof (struct setup_data ), (void **)&new);if (status !=EFI_SUCCESS ) { -efi_printk ("Failed to allocate memory for 'properties'\n" ); +efi_err ("Failed to allocate memory for 'properties'\n" );return ; }
@@ -372,7 +372,7 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, status =efi_bs_call (handle_protocol, handle, &proto, (void **)&image);if (status !=EFI_SUCCESS ) { -efi_printk ("Failed to get handle for LOADED_IMAGE_PROTOCOL\n" ); +efi_err ("Failed to get handle for LOADED_IMAGE_PROTOCOL\n" );efi_exit (handle, status); }
@@ -382,7 +382,7 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, status =efi_allocate_pages (sizeof (struct boot_params ), (unsigned long *)&boot_params,ULONG_MAX );if (status !=EFI_SUCCESS ) { -efi_printk ("Failed to allocate lowmem for boot params\n" ); +efi_err ("Failed to allocate lowmem for boot params\n" );efi_exit (handle, status); }
@@ -749,7 +749,7 @@ unsigned long efi_main(efi_handle_t handle, hdr->kernel_alignment, LOAD_PHYSICAL_ADDR);if (status !=EFI_SUCCESS ) { -efi_printk ("efi_relocate_kernel() failed!\n" ); +efi_err ("efi_relocate_kernel() failed!\n" ); goto fail; }/*
@@ -786,7 +786,7 @@ unsigned long efi_main(efi_handle_t handle,efi_set_u64_split (size, &hdr->ramdisk_size, &boot_params->ext_ramdisk_size); }else if (status !=EFI_NOT_FOUND ) { -efi_printk ("efi_load_initrd_dev_path() failed!\n" ); +efi_err ("efi_load_initrd_dev_path() failed!\n" ); goto fail; } }
@@ -813,13 +813,13 @@ unsigned long efi_main(efi_handle_t handle, status =exit_boot (boot_params, handle);if (status !=EFI_SUCCESS ) { -efi_printk ("exit_boot() failed!\n" ); +efi_err ("exit_boot() failed!\n" ); goto fail; }return bzimage_addr; fail: -efi_printk ("efi_main() failed!\n" ); +efi_err ("efi_main() failed!\n" );efi_exit (handle, status); }
Signature · 1 line
2.17.1
Ard Biesheuvel
maintainerPATCH 5/15 efi/gop: Use efi_err for error messages
In reply to Ard BiesheuvelFrom: Arvind Sankar <[email protected]>
Use efi_err instead of bare efi_printk for error messages.
--- drivers/firmware/efi/libstub/gop.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/firmware/efi/libstub/gop.c +5 -5
@@ -134,14 +134,14 @@ static u32 choose_mode_modenum(efi_graphics_output_protocol_t *gop) max_mode =efi_table_attr (mode, max_mode);if (cmdline.mode >= max_mode) { -efi_printk ("Requested mode is invalid\n" ); +efi_err ("Requested mode is invalid\n" );return cur_mode; } status =efi_call_proto (gop, query_mode, cmdline.mode, &info_size, &info);if (status !=EFI_SUCCESS ) { -efi_printk ("Couldn't get mode information\n" ); +efi_err ("Couldn't get mode information\n" );return cur_mode; }
@@ -150,7 +150,7 @@ static u32 choose_mode_modenum(efi_graphics_output_protocol_t *gop)efi_bs_call (free_pool, info);if (pf ==PIXEL_BLT_ONLY || pf >=PIXEL_FORMAT_MAX ) { -efi_printk ("Invalid PixelFormat\n" ); +efi_err ("Invalid PixelFormat\n" );return cur_mode; }
@@ -222,7 +222,7 @@ static u32 choose_mode_res(efi_graphics_output_protocol_t *gop)return m; } -efi_printk ("Couldn't find requested mode\n" ); +efi_err ("Couldn't find requested mode\n" );return cur_mode; }
@@ -316,7 +316,7 @@ static void set_mode(efi_graphics_output_protocol_t *gop)return ;if (efi_call_proto (gop, set_mode, new_mode) !=EFI_SUCCESS ) -efi_printk ("Failed to set requested mode\n" ); +efi_err ("Failed to set requested mode\n" ); }static void find_bits (u32 mask,u8 *pos,u8 *size)
Signature · 1 line
2.17.1
Ard Biesheuvel
maintainerPATCH 6/15 efi/tpm: Use efi_err for error messages
In reply to Ard BiesheuvelFrom: Arvind Sankar <[email protected]>
Use efi_err instead of bare efi_printk for error messages.
--- drivers/firmware/efi/libstub/tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/libstub/tpm.c +1 -1
@@ -119,7 +119,7 @@ void efi_retrieve_tpm2_eventlog(void) sizeof(*log_tbl) + log_size, (void **)&log_tbl);if (status !=EFI_SUCCESS ) { -efi_printk ("Unable to allocate memory for event log\n" ); +efi_err ("Unable to allocate memory for event log\n" );return ; }
Signature · 1 line
2.17.1
Ard Biesheuvel
maintainerPATCH 7/15 efi/libstub: Upgrade ignored dtb= argument message to error
In reply to Ard BiesheuvelFrom: Arvind Sankar <[email protected]>
Use efi_err if we ignore a command-line dtb= argument, so that it shows up even on a quiet boot.
--- drivers/firmware/efi/libstub/efi-stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/libstub/efi-stub.c +1 -1
@@ -241,7 +241,7 @@ efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg)if (!IS_ENABLED (CONFIG_EFI_ARMSTUB_DTB_LOADER ) || secure_boot != efi_secureboot_mode_disabled) {if (strstr (cmdline_ptr,"dtb=" )) -efi_info ("Ignoring DTB from command line.\n" ); +efi_err ("Ignoring DTB from command line.\n" ); }else { status =efi_load_dtb (image, &fdt_addr, &fdt_size);
Signature · 1 line
2.17.1
Ard Biesheuvel
maintainerPATCH 8/15 efi/x86: Move command-line initrd loading to efi_main
In reply to Ard BiesheuvelFrom: Arvind Sankar <[email protected]>
Consolidate the initrd loading in efi_main.
The command line options now need to be parsed only once.
--- drivers/firmware/efi/libstub/x86-stub.c | 64 ++++++++++--------------- 1 file changed, 25 insertions(+), 39 deletions(-)
drivers/firmware/efi/libstub/x86-stub.c +25 -39
@@ -22,6 +22,7 @@const efi_system_table_t *efi_system_table;extern u32 image_offset; +static efi_loaded_image_t *image =NULL ;static efi_status_t preserve_pci_rom_image (efi_pci_io_protocol_t *pci,struct pci_setup_rom **__rom)
@@ -355,7 +356,6 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, {struct boot_params *boot_params;struct setup_header *hdr; -efi_loaded_image_t *image;void *image_base;efi_guid_t proto =LOADED_IMAGE_PROTOCOL_GUID ;int options_size =0 ;
@@ -414,30 +414,9 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, hdr->ramdisk_image =0 ; hdr->ramdisk_size =0 ; -if (efi_is_native ()) { - status =efi_parse_options (cmdline_ptr); -if (status !=EFI_SUCCESS ) - goto fail2; - -if (!efi_noinitrd) { - status =efi_load_initrd (image, &ramdisk_addr, - &ramdisk_size, - hdr->initrd_addr_max, -ULONG_MAX ); -if (status !=EFI_SUCCESS ) - goto fail2; -efi_set_u64_split (ramdisk_addr, &hdr->ramdisk_image, - &boot_params->ext_ramdisk_image); -efi_set_u64_split (ramdisk_size, &hdr->ramdisk_size, - &boot_params->ext_ramdisk_size); - } - } -efi_stub_entry (handle, sys_table_arg, boot_params);/* not reached */ -fail2: -efi_free (options_size, (unsigned long )cmdline_ptr); fail:efi_free (sizeof (struct boot_params ), (unsigned long )boot_params);
@@ -760,35 +739,42 @@ unsigned long efi_main(efi_handle_t handle, image_offset =0 ; } -/* -* efi_pe_entry() may have been called before efi_main(), in which -* case this is the second time we parse the cmdline. This is ok, -* parsing the cmdline multiple times does not have side-effects. -*/ cmdline_paddr = ((u64 )hdr->cmd_line_ptr | ((u64 )boot_params->ext_cmd_line_ptr <<32 ));efi_parse_options ((char *)cmdline_paddr);/* -* At this point, an initrd may already have been loaded, either by -* the bootloader and passed via bootparams, or loaded from a initrd= -* command line option by efi_pe_entry() above. In either case, we -* permit an initrd loaded from the LINUX_EFI_INITRD_MEDIA_GUID device -* path to supersede it. +* At this point, an initrd may already have been loaded by the +* bootloader and passed via bootparams. We permit an initrd loaded +* from the LINUX_EFI_INITRD_MEDIA_GUID device path to supersede it. +* +* If the device path is not present, any command-line initrd= +* arguments will be processed only if image is not NULL, which will be +* the case only if we were loaded via the PE entry point. */ if (!efi_noinitrd) {unsigned long addr, size; status =efi_load_initrd_dev_path (&addr, &size,ULONG_MAX ); -if (status ==EFI_SUCCESS ) { -efi_set_u64_split (addr, &hdr->ramdisk_image, - &boot_params->ext_ramdisk_image); -efi_set_u64_split (size, &hdr->ramdisk_size, - &boot_params->ext_ramdisk_size); - }else if (status !=EFI_NOT_FOUND ) { -efi_err ("efi_load_initrd_dev_path() failed!\n" ); +if (status ==EFI_NOT_FOUND ) { +if (efi_is_native () && image !=NULL ) { + status =efi_load_initrd (image, &addr, &size, + hdr->initrd_addr_max, +ULONG_MAX ); + }else { + addr = size =0 ; + status =EFI_SUCCESS ; + } + } + +if (status !=EFI_SUCCESS ) { +efi_err ("Failed to load initrd!\n" ); goto fail; } +efi_set_u64_split (addr, &hdr->ramdisk_image, + &boot_params->ext_ramdisk_image); +efi_set_u64_split (size, &hdr->ramdisk_size, + &boot_params->ext_ramdisk_size); }/*
Signature · 1 line
2.17.1
Re: [PATCH 08/15] efi/x86: Move command-line initrd loading to efi_main
Quoted 10 lines · Ard Biesheuvel
From: Arvind Sankar <[email protected]>
Consolidate the initrd loading in
efi_main.The command line options now need to be parsed only once.
Signed-off-by Arvind Sankar <[email protected]>Link:
https://lore.kernel.org/r/[email protected]Signed-off-by Ard Biesheuvel <[email protected]>
Hi,
This patch patch in tip/master as:
987053a30016 efi/x86: Move command-line initrd loading to efi_main
...regresses my nfs root configuration. It hangs trying to mount the nfs root filesystem "root=/dev/nfs ip=dhcp".
It does not revert cleanly.
Re: [PATCH 08/15] efi/x86: Move command-line initrd loading to efi_main
Quoted 14 lines · Dan J
Quoted 10 lines · Ard Biesheuvel
From: Arvind Sankar <[email protected]>
Consolidate the initrd loading in
efi_main.The command line options now need to be parsed only once.
Signed-off-by Arvind Sankar <[email protected]>Link:
https://lore.kernel.org/r/[email protected]Signed-off-by Ard Biesheuvel <[email protected]>Hi,
Quoted 10 lines
This patch patch in tip/master as:
987053a30016efi/x86: Move command-line initrd loading toefi_main...regresses my nfs root configuration. It hangs trying to mount the nfs root filesystem "root=/dev/nfs ip=dhcp".
It does not revert cleanly.
Does this fix it?
drivers/firmware/efi/libstub/x86-stub.c +6 -4
@@ -771,10 +771,12 @@ unsigned long efi_main(efi_handle_t handle,efi_err ("Failed to load initrd!\n" ); goto fail; } -efi_set_u64_split (addr, &hdr->ramdisk_image, - &boot_params->ext_ramdisk_image); -efi_set_u64_split (size, &hdr->ramdisk_size, - &boot_params->ext_ramdisk_size); +if (size >0 ) { +efi_set_u64_split (addr, &hdr->ramdisk_image, + &boot_params->ext_ramdisk_image); +efi_set_u64_split (size, &hdr->ramdisk_size, + &boot_params->ext_ramdisk_size); + } }/*
Re: [PATCH 08/15] efi/x86: Move command-line initrd loading to efi_main
Quoted 37 lines · Arvind Sankar
Quoted 14 lines · Dan J
Quoted 10 lines · Ard Biesheuvel
From: Arvind Sankar <[email protected]>
Consolidate the initrd loading in
efi_main.The command line options now need to be parsed only once.
Signed-off-by Arvind Sankar <[email protected]>Link:
https://lore.kernel.org/r/[email protected]Signed-off-by Ard Biesheuvel <[email protected]>Hi,
Quoted 10 lines
This patch patch in tip/master as:
987053a30016efi/x86: Move command-line initrd loading toefi_main...regresses my nfs root configuration. It hangs trying to mount the nfs root filesystem "root=/dev/nfs ip=dhcp".
It does not revert cleanly.
Does this fix it?
drivers/firmware/efi/libstub/x86-stub.c +0
-0@@ -771,10 +771,12 @@ unsigned long efi_main(efi_handle_t handle,efi_err ("Failed to load initrd!\n" ); goto fail; }
drivers/firmware/efi/libstub/x86-stub.c unsigned long efi_main(efi_handle_t handle, · line 779
Quoted 10 lines
drivers/firmware/efi/libstub/x86-stub.c +6
-4-efi_set_u64_split (addr, &hdr->ramdisk_image, - &boot_params->ext_ramdisk_image); -efi_set_u64_split (size, &hdr->ramdisk_size, - &boot_params->ext_ramdisk_size); +if (size >0 ) { +efi_set_u64_split (addr, &hdr->ramdisk_image, + &boot_params->ext_ramdisk_image); +efi_set_u64_split (size, &hdr->ramdisk_size, + &boot_params->ext_ramdisk_size); + }
I'll give it a shot, but my guess would have been something related to the fact that this patch moves the initrd loading relative to when the command line is being parsed. In this case it's a dracut initrd built by:
dracut -m "nfs network base"
...with a kernel built with:
CONFIG_IP_PNP_DHCP=y
...and a built-in network interface. The behavior seems to be that the kernel gets an IP address just fine, but there's no initrd userspace to mount nfs and the kernel eventually gives up looking for root.
Re: [PATCH 08/15] efi/x86: Move command-line initrd loading to efi_main
Quoted 56 lines · Dan Williams
Quoted 37 lines · Arvind Sankar
Quoted 14 lines · Dan J
Quoted 10 lines · Ard Biesheuvel
From: Arvind Sankar <[email protected]>
Consolidate the initrd loading in
efi_main.The command line options now need to be parsed only once.
Signed-off-by Arvind Sankar <[email protected]>Link:
https://lore.kernel.org/r/[email protected]Signed-off-by Ard Biesheuvel <[email protected]>Hi,
Quoted 10 lines
This patch patch in tip/master as:
987053a30016efi/x86: Move command-line initrd loading toefi_main...regresses my nfs root configuration. It hangs trying to mount the nfs root filesystem "root=/dev/nfs ip=dhcp".
It does not revert cleanly.
Does this fix it?
drivers/firmware/efi/libstub/x86-stub.c +0
-0@@ -771,10 +771,12 @@ unsigned long efi_main(efi_handle_t handle,efi_err ("Failed to load initrd!\n" ); goto fail; }drivers/firmware/efi/libstub/x86-stub.c unsigned long efi_main(efi_handle_t handle, · line 779
Quoted 10 lines
drivers/firmware/efi/libstub/x86-stub.c +6
-4-efi_set_u64_split (addr, &hdr->ramdisk_image, - &boot_params->ext_ramdisk_image); -efi_set_u64_split (size, &hdr->ramdisk_size, - &boot_params->ext_ramdisk_size); +if (size >0 ) { +efi_set_u64_split (addr, &hdr->ramdisk_image, + &boot_params->ext_ramdisk_image); +efi_set_u64_split (size, &hdr->ramdisk_size, + &boot_params->ext_ramdisk_size); + }I'll give it a shot, but my guess would have been something related to the fact that this patch moves the initrd loading relative to when the command line is being parsed. In this case it's a dracut initrd built by:
dracut -m "nfs network base"
Quoted 7 lines
...with a kernel built with:
CONFIG_IP_PNP_DHCP=y...and a built-in network interface. The behavior seems to be that the kernel gets an IP address just fine, but there's no initrd userspace to mount nfs and the kernel eventually gives up looking for root.
It's an oversight in this patch: I set addr/size to 0 in the case where the EFI stub is not supposed to handle the initrd loading (because a bootloader ran before it and was responsible for handling the loading), but then those 0's get written into the bootparams structure anyway, blowing away whatever the bootloader had loaded.
Dan Williams
Tested-byRe: [PATCH 08/15] efi/x86: Move command-line initrd loading to efi_main
Quoted 66 lines · Arvind Sankar
Quoted 56 lines · Dan Williams
Quoted 37 lines · Arvind Sankar
Quoted 14 lines · Dan J
Quoted 10 lines · Ard Biesheuvel
From: Arvind Sankar <[email protected]>
Consolidate the initrd loading in
efi_main.The command line options now need to be parsed only once.
Signed-off-by Arvind Sankar <[email protected]>Link:
https://lore.kernel.org/r/[email protected]Signed-off-by Ard Biesheuvel <[email protected]>Hi,
Quoted 10 lines
This patch patch in tip/master as:
987053a30016efi/x86: Move command-line initrd loading toefi_main...regresses my nfs root configuration. It hangs trying to mount the nfs root filesystem "root=/dev/nfs ip=dhcp".
It does not revert cleanly.
Does this fix it?
drivers/firmware/efi/libstub/x86-stub.c +0
-0@@ -771,10 +771,12 @@ unsigned long efi_main(efi_handle_t handle,efi_err ("Failed to load initrd!\n" ); goto fail; }drivers/firmware/efi/libstub/x86-stub.c unsigned long efi_main(efi_handle_t handle, · line 779
Quoted 10 lines
drivers/firmware/efi/libstub/x86-stub.c +6
-4-efi_set_u64_split (addr, &hdr->ramdisk_image, - &boot_params->ext_ramdisk_image); -efi_set_u64_split (size, &hdr->ramdisk_size, - &boot_params->ext_ramdisk_size); +if (size >0 ) { +efi_set_u64_split (addr, &hdr->ramdisk_image, + &boot_params->ext_ramdisk_image); +efi_set_u64_split (size, &hdr->ramdisk_size, + &boot_params->ext_ramdisk_size); + }I'll give it a shot, but my guess would have been something related to the fact that this patch moves the initrd loading relative to when the command line is being parsed. In this case it's a dracut initrd built by:
dracut -m "nfs network base"
Quoted 7 lines
...with a kernel built with:
CONFIG_IP_PNP_DHCP=y...and a built-in network interface. The behavior seems to be that the kernel gets an IP address just fine, but there's no initrd userspace to mount nfs and the kernel eventually gives up looking for root.
Quoted 5 lines
It's an oversight in this patch: I set addr/size to 0 in the case where the EFI stub is not supposed to handle the initrd loading (because a bootloader ran before it and was responsible for handling the loading), but then those 0's get written into the bootparams structure anyway, blowing away whatever the bootloader had loaded.
Ah, ok.
...and yes, it works. You can add:
Thanks for the lightning quick turnaround!
PATCH 1/1 efi/x86: Don't blow away existing initrd
Commit
987053a30016 ("efi/x86: Move command-line initrd loading to efi_main")
moved the command-line initrd loading into efi_main, with a check to ensure that it was attempted only if the EFI stub was booted via efi_pe_entry rather than the EFI handover entry.
However, in the case where it was booted via handover entry, and thus an initrd may have already been loaded by the bootloader, it then wrote 0 for the initrd address and size, removing any existing initrd.
Fix this by checking if size is positive before setting the fields in the bootparams structure.
--- drivers/firmware/efi/libstub/x86-stub.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/firmware/efi/libstub/x86-stub.c +6 -4
@@ -774,10 +774,12 @@ unsigned long efi_main(efi_handle_t handle,efi_err ("Failed to load initrd!\n" ); goto fail; } -efi_set_u64_split (addr, &hdr->ramdisk_image, - &boot_params->ext_ramdisk_image); -efi_set_u64_split (size, &hdr->ramdisk_size, - &boot_params->ext_ramdisk_size); +if (size >0 ) { +efi_set_u64_split (addr, &hdr->ramdisk_image, + &boot_params->ext_ramdisk_image); +efi_set_u64_split (size, &hdr->ramdisk_size, + &boot_params->ext_ramdisk_size); + } }/*
Signature · 1 line
2.26.2
Re: [PATCH] efi/x86: Don't blow away existing initrd
(+ Stephen, Boris)
Quoted 11 lines · Arvind Sankar
Commit
987053a30016("efi/x86: Move command-line initrd loading toefi_main")
moved the command-line initrd loading intoefi_main, with a check to ensure that it was attempted only if the EFI stub was booted viaefi_pe_entryrather than the EFI handover entry.However, in the case where it was booted via handover entry, and thus an initrd may have already been loaded by the bootloader, it then wrote 0 for the initrd address and size, removing any existing initrd.
Quoted 7 lines
Fix this by checking if size is positive before setting the fields in the bootparams structure.
Fixes 987053a30016 ("efi/x86: Move command-line initrd loading to efi_main")Reported-by Dan Williams <[email protected]>Tested-by Dan Williams <[email protected]>Signed-off-by Arvind Sankar <[email protected]>
Apologies to all for the breakage, and for not catching this in review.
Ingo, Thomas, Boris: please apply this directly to efi/core asap.
Stephen: gives that this breaks the boot for a lot of people, you might want to pull this into -next directly.
Thanks,
Ard.
Quoted 28 lines
--- drivers/firmware/efi/libstub/x86-stub.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)drivers/firmware/efi/libstub/x86-stub.c +6
-5@@ -774,10 +774,12 @@ unsigned long efi_main(efi_handle_t handle,efi_err ("Failed to load initrd!\n" ); goto fail; } -efi_set_u64_split (addr, &hdr->ramdisk_image, - &boot_params->ext_ramdisk_image); -efi_set_u64_split (size, &hdr->ramdisk_size, - &boot_params->ext_ramdisk_size); +if (size >0 ) { +efi_set_u64_split (addr, &hdr->ramdisk_image, + &boot_params->ext_ramdisk_image); +efi_set_u64_split (size, &hdr->ramdisk_size, + &boot_params->ext_ramdisk_size); + } }/* -- 2.26.2
Ard Biesheuvel
maintainerPATCH 9/15 efi/libstub: Unify initrd loading across architectures
In reply to Ard BiesheuvelFrom: Arvind Sankar <[email protected]>
Factor out the initrd loading into a common function that can be called both from the generic efi-stub.c and the x86-specific x86-stub.c.
--- .../firmware/efi/libstub/efi-stub-helper.c | 46 +++++++++++++++++-- drivers/firmware/efi/libstub/efi-stub.c | 12 +---- drivers/firmware/efi/libstub/efistub.h | 21 ++------- drivers/firmware/efi/libstub/x86-stub.c | 13 +----- 4 files changed, 52 insertions(+), 40 deletions(-)
drivers/firmware/efi/libstub/efi-stub-helper.c +43 -3
@@ -331,6 +331,7 @@ static const struct {* %EFI_OUT_OF_RESOURCES if memory allocation failed * %EFI_LOAD_ERROR in all other cases */ +static efi_status_t efi_load_initrd_dev_path (unsigned long *load_addr,unsigned long *load_size,unsigned long max)
@@ -343,9 +344,6 @@ efi_status_t efi_load_initrd_dev_path(unsigned long *load_addr,efi_handle_t handle;efi_status_t status; -if (!load_addr || !load_size) -return EFI_INVALID_PARAMETER ; - dp = (efi_device_path_protocol_t *)&initrd_dev_path; status =efi_bs_call (locate_device_path, &lf2_proto_guid, &dp, &handle);if (status !=EFI_SUCCESS )
@@ -375,3 +373,45 @@ efi_status_t efi_load_initrd_dev_path(unsigned long *load_addr, *load_size = initrd_size;return EFI_SUCCESS ; } + +static +efi_status_t efi_load_initrd_cmdline (efi_loaded_image_t *image, +unsigned long *load_addr, +unsigned long *load_size, +unsigned long soft_limit, +unsigned long hard_limit) +{ +if (!IS_ENABLED (CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER ) || + (IS_ENABLED (CONFIG_X86 ) && (!efi_is_native () || image ==NULL ))) { + *load_addr = *load_size =0 ; +return EFI_SUCCESS ; + } + +return handle_cmdline_files (image,L"initrd=" ,sizeof (L"initrd=" ) -2 , + soft_limit, hard_limit, + load_addr, load_size); +} + +efi_status_t efi_load_initrd (efi_loaded_image_t *image, +unsigned long *load_addr, +unsigned long *load_size, +unsigned long soft_limit, +unsigned long hard_limit) +{ +efi_status_t status; + +if (!load_addr || !load_size) +return EFI_INVALID_PARAMETER ; + + status =efi_load_initrd_dev_path (load_addr, load_size, hard_limit); +if (status ==EFI_SUCCESS ) { +efi_info ("Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path\n" ); + }else if (status ==EFI_NOT_FOUND ) { + status =efi_load_initrd_cmdline (image, load_addr, load_size, + soft_limit, hard_limit); +if (status ==EFI_SUCCESS && *load_size >0 ) +efi_info ("Loaded initrd from command line option\n" ); + } + +return status; +}
drivers/firmware/efi/libstub/efi-stub.c +2 -10
@@ -265,16 +265,8 @@ efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg)if (!efi_noinitrd) { max_addr =efi_get_max_initrd_addr (dram_base, image_addr); - status =efi_load_initrd_dev_path (&initrd_addr, &initrd_size, - max_addr); -if (status ==EFI_SUCCESS ) { -efi_info ("Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path\n" ); - }else if (status ==EFI_NOT_FOUND ) { - status =efi_load_initrd (image, &initrd_addr, &initrd_size, -ULONG_MAX , max_addr); -if (status ==EFI_SUCCESS && initrd_size >0 ) -efi_info ("Loaded initrd from command line option\n" ); - } + status =efi_load_initrd (image, &initrd_addr, &initrd_size, +ULONG_MAX , max_addr);if (status !=EFI_SUCCESS )efi_err ("Failed to load initrd!\n" ); }
drivers/firmware/efi/libstub/efistub.h +5 -16
@@ -677,21 +677,10 @@ static inline efi_status_t efi_load_dtb(efi_loaded_image_t *image, ULONG_MAX, ULONG_MAX, load_addr, load_size); } -static inline efi_status_t efi_load_initrd (efi_loaded_image_t *image, -unsigned long *load_addr, -unsigned long *load_size, -unsigned long soft_limit, -unsigned long hard_limit) -{ -if (!IS_ENABLED (CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER )) -return EFI_SUCCESS ; - -return handle_cmdline_files (image,L"initrd=" ,sizeof (L"initrd=" ) -2 , - soft_limit, hard_limit, load_addr, load_size); -} - -efi_status_t efi_load_initrd_dev_path (unsigned long *load_addr, -unsigned long *load_size, -unsigned long max); +efi_status_t efi_load_initrd (efi_loaded_image_t *image, +unsigned long *load_addr, +unsigned long *load_size, +unsigned long soft_limit, +unsigned long hard_limit);#endif
drivers/firmware/efi/libstub/x86-stub.c +2 -11
@@ -755,17 +755,8 @@ unsigned long efi_main(efi_handle_t handle,if (!efi_noinitrd) {unsigned long addr, size; - status =efi_load_initrd_dev_path (&addr, &size,ULONG_MAX ); -if (status ==EFI_NOT_FOUND ) { -if (efi_is_native () && image !=NULL ) { - status =efi_load_initrd (image, &addr, &size, - hdr->initrd_addr_max, -ULONG_MAX ); - }else { - addr = size =0 ; - status =EFI_SUCCESS ; - } - } + status =efi_load_initrd (image, &addr, &size, + hdr->initrd_addr_max,ULONG_MAX );if (status !=EFI_SUCCESS ) {efi_err ("Failed to load initrd!\n" );
Signature · 1 line
2.17.1
Ard Biesheuvel
maintainerPATCH 10/15 efi/x86: Support builtin command line
In reply to Ard BiesheuvelFrom: Arvind Sankar <[email protected]>
Add support for the x86 CMDLINE_BOOL and CMDLINE_OVERRIDE configuration options.
--- drivers/firmware/efi/libstub/x86-stub.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/firmware/efi/libstub/x86-stub.c +8 -4
@@ -680,7 +680,6 @@ unsigned long efi_main(efi_handle_t handle,unsigned long buffer_start, buffer_end;struct setup_header *hdr = &boot_params->hdr;efi_status_t status; -unsigned long cmdline_paddr; efi_system_table = sys_table_arg;
@@ -739,9 +738,14 @@ unsigned long efi_main(efi_handle_t handle, image_offset =0 ; } - cmdline_paddr = ((u64 )hdr->cmd_line_ptr | - ((u64 )boot_params->ext_cmd_line_ptr <<32 )); -efi_parse_options ((char *)cmdline_paddr); +#ifdef CONFIG_CMDLINE_BOOL +efi_parse_options (CONFIG_CMDLINE ); +#endif +if (!IS_ENABLED (CONFIG_CMDLINE_OVERRIDE )) { +unsigned long cmdline_paddr = ((u64 )hdr->cmd_line_ptr | + ((u64 )boot_params->ext_cmd_line_ptr <<32 )); +efi_parse_options ((char *)cmdline_paddr); + }/* * At this point, an initrd may already have been loaded by the
Signature · 1 line
2.17.1
Ard Biesheuvel
maintainerPATCH 11/15 efi/libstub: Check return value of efi_parse_options
In reply to Ard BiesheuvelFrom: Arvind Sankar <[email protected]>
efi_parse_options can fail if it is unable to allocate space for a copy of the command line. Check the return value to make sure it succeeded.
--- drivers/firmware/efi/libstub/efi-stub.c | 23 +++++++++++++++++------ drivers/firmware/efi/libstub/x86-stub.c | 12 ++++++++++-- 2 files changed, 27 insertions(+), 8 deletions(-)
drivers/firmware/efi/libstub/efi-stub.c +17 -6
@@ -207,11 +207,21 @@ efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg)if (IS_ENABLED (CONFIG_CMDLINE_EXTEND ) ||IS_ENABLED (CONFIG_CMDLINE_FORCE ) || - cmdline_size ==0 ) -efi_parse_options (CONFIG_CMDLINE ); + cmdline_size ==0 ) { + status =efi_parse_options (CONFIG_CMDLINE ); +if (status !=EFI_SUCCESS ) { +efi_err ("Failed to parse options\n" ); + goto fail_free_cmdline; + } + } -if (!IS_ENABLED (CONFIG_CMDLINE_FORCE ) && cmdline_size >0 ) -efi_parse_options (cmdline_ptr); +if (!IS_ENABLED (CONFIG_CMDLINE_FORCE ) && cmdline_size >0 ) { + status =efi_parse_options (cmdline_ptr); +if (status !=EFI_SUCCESS ) { +efi_err ("Failed to parse options\n" ); + goto fail_free_cmdline; + } + }efi_info ("Booting Linux Kernel...\n" );
@@ -223,7 +233,7 @@ efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg) dram_base, image);if (status !=EFI_SUCCESS ) {efi_err ("Failed to relocate kernel\n" ); - goto fail_free_cmdline; + goto fail_free_screeninfo; }efi_retrieve_tpm2_eventlog ();
@@ -326,8 +336,9 @@ efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg) fail_free_image:efi_free (image_size, image_addr);efi_free (reserve_size, reserve_addr); -fail_free_cmdline: +fail_free_screeninfo:free_screen_info (si); +fail_free_cmdline:efi_free (cmdline_size, (unsigned long )cmdline_ptr); fail:return status;
drivers/firmware/efi/libstub/x86-stub.c +10 -2
@@ -739,12 +739,20 @@ unsigned long efi_main(efi_handle_t handle, }#ifdef CONFIG_CMDLINE_BOOL -efi_parse_options (CONFIG_CMDLINE ); + status =efi_parse_options (CONFIG_CMDLINE ); +if (status !=EFI_SUCCESS ) { +efi_err ("Failed to parse options\n" ); + goto fail; + }#endif if (!IS_ENABLED (CONFIG_CMDLINE_OVERRIDE )) {unsigned long cmdline_paddr = ((u64 )hdr->cmd_line_ptr | ((u64 )boot_params->ext_cmd_line_ptr <<32 )); -efi_parse_options ((char *)cmdline_paddr); + status =efi_parse_options ((char *)cmdline_paddr); +if (status !=EFI_SUCCESS ) { +efi_err ("Failed to parse options\n" ); + goto fail; + } }/*
Signature · 1 line
2.17.1
Ard Biesheuvel
maintainerPATCH 12/15 efi/libstub: Fix mixed mode boot issue after macro refactor
In reply to Ard BiesheuvelFrom: Arvind Sankar <[email protected]>
Commit
22090f84bc3f ("efi/libstub: unify EFI call wrappers for non-x86")
refactored the macros that are used to provide wrappers for mixed-mode calls on x86, allowing us to boot a 64-bit kernel on 32-bit firmware.
Unfortunately, this broke mixed mode boot due to the fact that efi_is_native() is not a macro on x86.
All of these macros should go together, so rather than testing each one to see if it is defined, condition the generic macro definitions on a new ARCH_HAS_EFISTUB_WRAPPERS, and remove the wrapper definitions on x86 as well if CONFIG_EFI_MIXED is not enabled.
--- arch/x86/include/asm/efi.h | 19 +++++++++++++++---- drivers/firmware/efi/libstub/efistub.h | 14 ++++---------- 2 files changed, 19 insertions(+), 14 deletions(-)
arch/x86/include/asm/efi.h +15 -4
@@ -225,13 +225,15 @@ efi_status_t efi_set_virtual_address_map(unsigned long memory_map_size,/* arch specific definitions used by the stub code */ -extern const bool efi_is64; +#ifdef CONFIG_EFI_MIXED + +#define ARCH_HAS_EFISTUB_WRAPPERS static inline bool efi_is_64bit (void ) { -if (IS_ENABLED (CONFIG_EFI_MIXED )) -return efi_is64; -return IS_ENABLED (CONFIG_X86_64 ); +extern const bool efi_is64; + +return efi_is64; }static inline bool efi_is_native (void )
@@ -356,6 +358,15 @@ static inline u32 efi64_convert_status(efi_status_t status) runtime), \ func, __VA_ARGS__)) +#else /* CONFIG_EFI_MIXED */ + +static inline bool efi_is_64bit (void ) +{ +return IS_ENABLED (CONFIG_X86_64 ); +} + +#endif /* CONFIG_EFI_MIXED */ +extern bool efi_reboot_required (void );extern bool efi_is_table_address (unsigned long phys_addr);
drivers/firmware/efi/libstub/efistub.h +4 -10
@@ -33,20 +33,14 @@ extern bool efi_novamap;extern const efi_system_table_t *efi_system_table; -#ifndef efi_bs_call +#ifndef ARCH_HAS_EFISTUB_WRAPPERS + +#define efi_is_native () (true)#define efi_bs_call (func, ...) efi_system_table->boottime->func(__VA_ARGS__) -#endif -#ifndef efi_rt_call#define efi_rt_call (func, ...) efi_system_table->runtime->func(__VA_ARGS__) -#endif -#ifndef efi_is_native -#define efi_is_native () (true) -#endif -#ifndef efi_table_attr#define efi_table_attr (inst, attr) (inst->attr) -#endif -#ifndef efi_call_proto#define efi_call_proto (inst, func, ...) inst->func(inst, ##__VA_ARGS__) +#endif #define efi_info (msg) do { \
Signature · 1 line
2.17.1
Ard Biesheuvel
maintainerPATCH 13/15 efi/libstub/x86: Work around LLVM ELF quirk build regression
In reply to Ard BiesheuvelWhen building the x86 EFI stub with Clang, the libstub Makefile rules that manipulate the ELF object files may throw an error like:
STUBCPY drivers/firmware/efi/libstub/efi-stub-helper.stub.o
strip: drivers/firmware/efi/libstub/efi-stub-helper.stub.o: Failed to find link section for section 10
objcopy: drivers/firmware/efi/libstub/efi-stub-helper.stub.o: Failed to find link section for section 10
This is the result of a LLVM feature [0] where symbol references are stored in a LLVM specific .llvm_addrsig section in a non-transparent way, causing generic ELF tools such as strip or objcopy to choke on them.
So force the compiler not to emit these sections, by passing the appropriate command line option.
[0] https://sourceware.org/bugzilla/show_bug.cgi?id=23817
--- drivers/firmware/efi/libstub/Makefile | 1 + 1 file changed, 1 insertion(+)
drivers/firmware/efi/libstub/Makefile +1 -0
@@ -30,6 +30,7 @@ KBUILD_CFLAGS := $(cflags-y) -DDISABLE_BRANCH_PROFILING \ -D__NO_FORTIFY \ $(call cc-option,-ffreestanding) \ $(call cc-option,-fno-stack-protector) \ + $(call cc-option,-fno-addrsig) \ -D__DISABLE_EXPORTS GCOV_PROFILE := n
Signature · 1 line
2.17.1
Ard Biesheuvel
maintainerPATCH 14/15 efi/libstub: Make efi_printk() input argument const char*
In reply to Ard BiesheuvelTo help the compiler figure out that efi_printk() will not modify the string it is given, make the input argument type const char*.
While at it, simplify the implementation as well.
--- .../firmware/efi/libstub/efi-stub-helper.c | 19 +++++++------------ drivers/firmware/efi/libstub/efistub.h | 2 +- 2 files changed, 8 insertions(+), 13 deletions(-)
drivers/firmware/efi/libstub/efi-stub-helper.c +7 -12
@@ -26,20 +26,15 @@ bool __pure __efi_soft_reserve_enabled(void)return !efi_nosoftreserve; } -void efi_printk (char *str) +void efi_printk (const char *str) { -char *s8; - -for (s8 = str; *s8; s8++) { -efi_char16_t ch[2 ] = {0 }; - - ch[0 ] = *s8; -if (*s8 =='\n' ) { -efi_char16_t nl[2 ] = {'\r' ,0 }; -efi_char16_printk (nl); - } +while (*str) { +efi_char16_t ch[] = { *str++,L'\0' }; -efi_char16_printk (ch); +if (ch[0 ] ==L'\n' ) +efi_char16_printk (L"\r\n" ); +else +efi_char16_printk (ch); } }
drivers/firmware/efi/libstub/efistub.h +1 -1
@@ -625,7 +625,7 @@ efi_status_t check_platform_features(void);void *get_efi_config_table (efi_guid_t guid); -void efi_printk (char *str); +void efi_printk (const char *str);void efi_free (unsigned long size,unsigned long addr);
Signature · 1 line
2.17.1
Ard Biesheuvel
maintainerPATCH 15/15 efi/libstub: Correct comment typos
In reply to Ard BiesheuvelFrom: Joe Perches <[email protected]>
Fix a couple typos in comments.
--- drivers/firmware/efi/libstub/pci.c | 2 +- drivers/firmware/efi/libstub/relocate.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/firmware/efi/libstub/pci.c +1 -1
@@ -69,7 +69,7 @@ void efi_pci_disable_bridge_busmaster(void)* access to the framebuffer. Drivers for true PCIe graphics * controllers that are behind a PCIe root port do not use * DMA to implement the GOP framebuffer anyway [although they -* may use it in their implentation of Gop->Blt()], and so +* may use it in their implementation of Gop->Blt()], and so * disabling DMA in the PCI bridge should not interfere with * normal operation of the device. */
drivers/firmware/efi/libstub/relocate.c +1 -1
@@ -140,7 +140,7 @@ efi_status_t efi_relocate_kernel(unsigned long *image_addr,* The EFI firmware loader could have placed the kernel image * anywhere in memory, but the kernel has restrictions on the * max physical address it can run at. Some architectures -* also have a prefered address, so first try to relocate +* also have a preferred address, so first try to relocate * to the preferred address. If that fails, allocate as low * as possible while respecting the required alignment. */
Signature · 1 line
2.17.1
Ard Biesheuvel
maintainerQuoted 39 lines · Ard Biesheuvel
The following changes since commit
4da0b2b7e67524cc206067865666899bc02e1cb0:efi/libstub: Re-enable command line initrd loading for x86 (2020-04-25 12:26:32 +0200)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.gitefi-nextfor you to fetch changes up to
4026229934f6ca0cb44af7b9df00e647b2f1f787:efi/libstub: Correct comment typos (2020-05-06 11:27:55 +0200)
----------------------------------------------------------------
More EFI changes for v5.8:
- Rename pr_efi/pr_efi_err to efi_info/efi_err, and use them consistently
- Simplify and unify initrd loading
- Parse the builtin command line on x86 (if provided)
- Some fixes for issues introduced by the first batch of v5.8 changes----------------------------------------------------------------
Ard Biesheuvel (2):
efi/libstub/x86: Work around LLVM ELF quirk build regression efi/libstub: Makeefi_printk()input argument const char*Arvind Sankar (12):
efi/x86: Use correct size forboot_paramsefi/libstub: Add a helper function to split 64-bit values efi/libstub: Move pr_efi/pr_efi_err into efi namespace efi/x86: Useefi_errfor error messages
efi/gop: Useefi_errfor error messages
efi/tpm: Useefi_errfor error messages efi/libstub: Upgrade ignored dtb= argument message to error efi/x86: Move command-line initrd loading toefi_mainefi/libstub: Unify initrd loading across architectures efi/x86: Support builtin command line efi/libstub: Check return value ofefi_parse_optionsefi/libstub: Fix mixed mode boot issue after macro refactor
Quoted 3 lines
Joe Perches (1):
efi/libstub: Correct comment typos
Ping?
Ard Biesheuvel
maintainerQuoted 41 lines · Ard Biesheuvel
Quoted 39 lines · Ard Biesheuvel
The following changes since commit
4da0b2b7e67524cc206067865666899bc02e1cb0:efi/libstub: Re-enable command line initrd loading for x86 (2020-04-25 12:26:32 +0200)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.gitefi-nextfor you to fetch changes up to
4026229934f6ca0cb44af7b9df00e647b2f1f787:efi/libstub: Correct comment typos (2020-05-06 11:27:55 +0200)
----------------------------------------------------------------
More EFI changes for v5.8:
- Rename pr_efi/pr_efi_err to efi_info/efi_err, and use them consistently
- Simplify and unify initrd loading
- Parse the builtin command line on x86 (if provided)
- Some fixes for issues introduced by the first batch of v5.8 changes----------------------------------------------------------------
Ard Biesheuvel (2):
efi/libstub/x86: Work around LLVM ELF quirk build regression efi/libstub: Makeefi_printk()input argument const char*Arvind Sankar (12):
efi/x86: Use correct size forboot_paramsefi/libstub: Add a helper function to split 64-bit values efi/libstub: Move pr_efi/pr_efi_err into efi namespace efi/x86: Useefi_errfor error messages
efi/gop: Useefi_errfor error messages
efi/tpm: Useefi_errfor error messages efi/libstub: Upgrade ignored dtb= argument message to error efi/x86: Move command-line initrd loading toefi_mainefi/libstub: Unify initrd loading across architectures efi/x86: Support builtin command line efi/libstub: Check return value ofefi_parse_optionsefi/libstub: Fix mixed mode boot issue after macro refactor
Quoted 5 lines
Quoted 3 lines
Joe Perches (1):
efi/libstub: Correct comment typosPing?
Ping again?