Re: [PATCH] kexec/x86: Unconditionally add the acpi_rsdp command line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 15, 2019 at 5:36 PM Lianbo Jiang <lijiang@xxxxxxxxxx> wrote:
>
> The Linux kernel commit 3a63f70bf4c3 introduces the early parsing
> of the RSDP. This means that boot loader must either set the
> boot_params.acpi_rsdp_addr or pass a command line 'acpi_rsdp=xxx'
> to tell the RDSP physical address.
>
> Currently, kexec neither sets the boot_params.acpi_rsdp or passes
> acpi_rsdp command line if it sees the first kernel support efi
> runtime. This is causing the second kernel boot failure.
> The EFI runtime is not available so early in the boot process so
> unconditionally pass the 'acpi_rsdp=xxx' to the second kernel.
>
> Signed-off-by: Lianbo Jiang <lijiang@xxxxxxxxxx>
> Signed-off-by: Brijesh Singh <brijesh.singh@xxxxxxx>
> ---
>  kexec/arch/i386/crashdump-x86.c | 17 +----------------
>  1 file changed, 1 insertion(+), 16 deletions(-)
>
> diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
> index 140f45b..a29b15b 100644
> --- a/kexec/arch/i386/crashdump-x86.c
> +++ b/kexec/arch/i386/crashdump-x86.c
> @@ -35,7 +35,6 @@
>  #include <sys/types.h>
>  #include <sys/stat.h>
>  #include <unistd.h>
> -#include <dirent.h>
>  #include "../../kexec.h"
>  #include "../../kexec-elf.h"
>  #include "../../kexec-syscall.h"
> @@ -772,18 +771,6 @@ static enum coretype get_core_type(struct crash_elf_info *elf_info,
>         }
>  }
>
> -static int sysfs_efi_runtime_map_exist(void)
> -{
> -       DIR *dir;
> -
> -       dir = opendir("/sys/firmware/efi/runtime-map");
> -       if (!dir)
> -               return 0;
> -
> -       closedir(dir);
> -       return 1;
> -}
> -
>  /* Appends 'acpi_rsdp=' commandline for efi boot crash dump */
>  static void cmdline_add_efi(char *cmdline)
>  {
> @@ -978,9 +965,7 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
>         dbgprintf("Created elf header segment at 0x%lx\n", elfcorehdr);
>         if (delete_memmap(memmap_p, &nr_memmap, elfcorehdr, memsz) < 0)
>                 return -1;
> -       if (!bzImage_support_efi_boot || arch_options.noefi ||
> -           !sysfs_efi_runtime_map_exist())
> -               cmdline_add_efi(mod_cmdline);
> +       cmdline_add_efi(mod_cmdline);
>         cmdline_add_elfcorehdr(mod_cmdline, elfcorehdr);
>
>         /* Inform second kernel about the presence of ACPI tables. */
> --
> 2.17.1
>
>
> _______________________________________________
> kexec mailing list
> kexec@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/kexec

Hi Lianbo,

I've sent another patch similiar to yours:
[PATCH] x86: Always try to fill acpi_rsdp_addr in boot params

I'll update V2 and your use case should also be covered in that patch,
as we have talked in IRC previously, thanks!

--
Best Regards,
Kairui Song

_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux