diff mbox

acpi: introduce "acpi_addr=" parameter for kdump

Message ID 1299766243-494-1-git-send-email-amwang@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Amerigo Wang March 10, 2011, 2:10 p.m. UTC
None
diff mbox

Patch

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index f4a04c0..0fbbdc6 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -163,6 +163,11 @@  bytes respectively. Such letter suffixes can also be entirely omitted.
 
 			See also Documentation/power/pm.txt, pci=noacpi
 
+	acpi_addr=	[ACPI,EFI]
+			Pass the RSDP address to the kernel, mostly used
+			on machines running EFI runtime service to boot the
+			second kernel for kdump.
+
 	acpi_apic_instance=	[ACPI, IOAPIC]
 			Format: <int>
 			2: use 2nd APIC table, if available
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index c90c76a..06dfec0 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -238,8 +238,19 @@  void acpi_os_vprintf(const char *fmt, va_list args)
 #endif
 }
 
+static unsigned long acpi_addr;
+static int __init setup_acpi_addr(char *arg)
+{
+	acpi_addr = simple_strtoul(arg, NULL, 16);
+	return 0;
+}
+early_param("acpi_addr", setup_acpi_addr);
+
 acpi_physical_address __init acpi_os_get_root_pointer(void)
 {
+	if (acpi_addr)
+		return acpi_addr;
+
 	if (efi_enabled) {
 		if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
 			return efi.acpi20;