Commit 4996c02306a25def1d352ec8e8f48895bbc7dea9

Authored by Takao Indoh
Committed by Len Brown
1 parent 1765a367a3

ACPI: introduce "acpi_rsdp=" parameter for kdump

There is a problem with putting the first kernel in EFI virtual mode,
it is that when the second kernel comes up it tries to initialize the
EFI again and once we have put EFI in virtual mode we can not really
do that.

Actually, EFI is not necessary for kdump, we can boot the second kernel
with "noefi" parameter, but the boot will mostly fail because 2nd kernel
cannot find RSDP.

In this situation, we introduced "acpi_rsdp=" kernel parameter, so that
kexec-tools can pass the "noefi acpi_rsdp=X" to the second kernel to
make kdump works. The physical address of the RSDP can be got from
sysfs(/sys/firmware/efi/systab).

Signed-off-by: Takao Indoh <indou.takao@jp.fujitsu.com>
Reviewed-by: WANG Cong <amwang@redhat.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Len Brown <len.brown@intel.com>

Showing 2 changed files with 20 additions and 0 deletions Side-by-side Diff

Documentation/kernel-parameters.txt
... ... @@ -163,6 +163,11 @@
163 163  
164 164 See also Documentation/power/pm.txt, pci=noacpi
165 165  
  166 + acpi_rsdp= [ACPI,EFI,KEXEC]
  167 + Pass the RSDP address to the kernel, mostly used
  168 + on machines running EFI runtime service to boot the
  169 + second kernel for kdump.
  170 +
166 171 acpi_apic_instance= [ACPI, IOAPIC]
167 172 Format: <int>
168 173 2: use 2nd APIC table, if available
... ... @@ -237,8 +237,23 @@
237 237 #endif
238 238 }
239 239  
  240 +#ifdef CONFIG_KEXEC
  241 +static unsigned long acpi_rsdp;
  242 +static int __init setup_acpi_rsdp(char *arg)
  243 +{
  244 + acpi_rsdp = simple_strtoul(arg, NULL, 16);
  245 + return 0;
  246 +}
  247 +early_param("acpi_rsdp", setup_acpi_rsdp);
  248 +#endif
  249 +
240 250 acpi_physical_address __init acpi_os_get_root_pointer(void)
241 251 {
  252 +#ifdef CONFIG_KEXEC
  253 + if (acpi_rsdp)
  254 + return acpi_rsdp;
  255 +#endif
  256 +
242 257 if (efi_enabled) {
243 258 if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
244 259 return efi.acpi20;