All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] acpi: introduce "acpi_rsdp=" parameter for kdump
@ 2011-07-11 15:14 Takao Indoh
  2011-07-11 17:23 ` Konrad Rzeszutek Wilk
  2011-07-12 10:30   ` Cong Wang
  0 siblings, 2 replies; 9+ messages in thread
From: Takao Indoh @ 2011-07-11 15:14 UTC (permalink / raw)
  To: linux-kernel
  Cc: amwang, ebiederm, vgoyal, rdunlap, lenb, linux-doc, linux-acpi, mjg

Revised version of the patch which was posted by Cong WANG

v1:
https://lkml.org/lkml/2011/3/10/206

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.

Changes in v2:
* Change parameter name from "acpi_addr" to "acpi_rsdp"
* Add CONFIG_KEXEC

Signed-off-by: Takao Indoh <indou.takao@jp.fujitsu.com>
[amwang@redhat.com: Add documentation.]
---
 Documentation/kernel-parameters.txt |    5 +++++
 drivers/acpi/osl.c                  |   15 +++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index fd248a3..b88b8f1 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_rsdp=	[ACPI,EFI,KEXEC]
+			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 52ca964..27cd140 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -237,8 +237,23 @@ void acpi_os_vprintf(const char *fmt, va_list args)
 #endif
 }
 
+#ifdef CONFIG_KEXEC
+static unsigned long acpi_rsdp;
+static int __init setup_acpi_rsdp(char *arg)
+{
+	acpi_rsdp = simple_strtoul(arg, NULL, 16);
+	return 0;
+}
+early_param("acpi_rsdp", setup_acpi_rsdp);
+#endif
+
 acpi_physical_address __init acpi_os_get_root_pointer(void)
 {
+#ifdef CONFIG_KEXEC
+	if (acpi_rsdp)
+		return acpi_rsdp;
+#endif
+
 	if (efi_enabled) {
 		if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
 			return efi.acpi20;

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] acpi: introduce "acpi_rsdp=" parameter for kdump
  2011-07-11 15:14 [PATCH v2] acpi: introduce "acpi_rsdp=" parameter for kdump Takao Indoh
@ 2011-07-11 17:23 ` Konrad Rzeszutek Wilk
  2011-07-11 17:27   ` Matthew Garrett
  2011-07-12 10:30   ` Cong Wang
  1 sibling, 1 reply; 9+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-07-11 17:23 UTC (permalink / raw)
  To: Takao Indoh
  Cc: linux-kernel, amwang, ebiederm, vgoyal, rdunlap, lenb, linux-doc,
	linux-acpi, mjg

On Mon, Jul 11, 2011 at 11:14:41AM -0400, Takao Indoh wrote:
> Revised version of the patch which was posted by Cong WANG
> 
> v1:
> https://lkml.org/lkml/2011/3/10/206
> 
> 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.
> 
> Changes in v2:
> * Change parameter name from "acpi_addr" to "acpi_rsdp"
> * Add CONFIG_KEXEC

How will the tools get the physical address of the RSDP?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] acpi: introduce "acpi_rsdp=" parameter for kdump
  2011-07-11 17:23 ` Konrad Rzeszutek Wilk
@ 2011-07-11 17:27   ` Matthew Garrett
  0 siblings, 0 replies; 9+ messages in thread
From: Matthew Garrett @ 2011-07-11 17:27 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: Takao Indoh, linux-kernel, amwang, ebiederm, vgoyal, rdunlap,
	lenb, linux-doc, linux-acpi

On Mon, Jul 11, 2011 at 01:23:18PM -0400, Konrad Rzeszutek Wilk wrote:

> How will the tools get the physical address of the RSDP?

It's exposed in sysfs.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] acpi: introduce "acpi_rsdp=" parameter for kdump
  2011-07-11 15:14 [PATCH v2] acpi: introduce "acpi_rsdp=" parameter for kdump Takao Indoh
@ 2011-07-12 10:30   ` Cong Wang
  2011-07-12 10:30   ` Cong Wang
  1 sibling, 0 replies; 9+ messages in thread
From: Cong Wang @ 2011-07-12 10:30 UTC (permalink / raw)
  To: Takao Indoh
  Cc: linux-kernel, ebiederm, vgoyal, rdunlap, lenb, linux-doc,
	linux-acpi, mjg

于 2011年07月11日 23:14, Takao Indoh 写道:
> Revised version of the patch which was posted by Cong WANG
>
> Changes in v2:
> * Change parameter name from "acpi_addr" to "acpi_rsdp"
> * Add CONFIG_KEXEC

Thanks for updating it! Definitely looks good to me,

Reviewed-by: WANG Cong <amwang@redhat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] acpi: introduce "acpi_rsdp=" parameter for kdump
@ 2011-07-12 10:30   ` Cong Wang
  0 siblings, 0 replies; 9+ messages in thread
From: Cong Wang @ 2011-07-12 10:30 UTC (permalink / raw)
  To: Takao Indoh
  Cc: linux-kernel, ebiederm, vgoyal, rdunlap, lenb, linux-doc,
	linux-acpi, mjg

于 2011年07月11日 23:14, Takao Indoh 写道:
> Revised version of the patch which was posted by Cong WANG
>
> Changes in v2:
> * Change parameter name from "acpi_addr" to "acpi_rsdp"
> * Add CONFIG_KEXEC

Thanks for updating it! Definitely looks good to me,

Reviewed-by: WANG Cong <amwang@redhat.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] acpi: introduce "acpi_rsdp=" parameter for kdump
  2011-07-12 10:30   ` Cong Wang
@ 2011-07-12 13:31     ` Konrad Rzeszutek Wilk
  -1 siblings, 0 replies; 9+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-07-12 13:31 UTC (permalink / raw)
  To: Cong Wang
  Cc: Takao Indoh, linux-kernel, ebiederm, vgoyal, rdunlap, lenb,
	linux-doc, linux-acpi, mjg

On Tue, Jul 12, 2011 at 06:30:18PM +0800, Cong Wang wrote:
> 于 2011年07月11日 23:14, Takao Indoh 写道:
> >Revised version of the patch which was posted by Cong WANG
> >
> >Changes in v2:
> >* Change parameter name from "acpi_addr" to "acpi_rsdp"
> >* Add CONFIG_KEXEC
> 
> Thanks for updating it! Definitely looks good to me,

The only comment I've is that it would be good to include in the
patch description which sysfs attribute is used by the kexec tools
to read in the physical address to be passed in.

Otherwise it looks good to me too.
> 
> Reviewed-by: WANG Cong <amwang@redhat.com>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] acpi: introduce "acpi_rsdp=" parameter for kdump
@ 2011-07-12 13:31     ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 9+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-07-12 13:31 UTC (permalink / raw)
  To: Cong Wang
  Cc: Takao Indoh, linux-kernel, ebiederm, vgoyal, rdunlap, lenb,
	linux-doc, linux-acpi, mjg

On Tue, Jul 12, 2011 at 06:30:18PM +0800, Cong Wang wrote:
> 于 2011年07月11日 23:14, Takao Indoh 写道:
> >Revised version of the patch which was posted by Cong WANG
> >
> >Changes in v2:
> >* Change parameter name from "acpi_addr" to "acpi_rsdp"
> >* Add CONFIG_KEXEC
> 
> Thanks for updating it! Definitely looks good to me,

The only comment I've is that it would be good to include in the
patch description which sysfs attribute is used by the kexec tools
to read in the physical address to be passed in.

Otherwise it looks good to me too.
> 
> Reviewed-by: WANG Cong <amwang@redhat.com>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] acpi: introduce "acpi_rsdp=" parameter for kdump
  2011-07-12 13:31     ` Konrad Rzeszutek Wilk
  (?)
@ 2011-07-14 22:05     ` Takao Indoh
  2011-07-16 22:41       ` Len Brown
  -1 siblings, 1 reply; 9+ messages in thread
From: Takao Indoh @ 2011-07-14 22:05 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, linux-kernel
  Cc: Cong Wang, ebiederm, vgoyal, rdunlap, lenb, linux-doc, linux-acpi, mjg

>The only comment I've is that it would be good to include in the
>patch description which sysfs attribute is used by the kexec tools
>to read in the physical address to be passed in.
>
>Otherwise it looks good to me too.

Thanks for your review. I added it.

---
From: Takao Indoh <indou.takao@jp.fujitsu.com>
Subject: [PATCH v2] 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>
---
 Documentation/kernel-parameters.txt |    5 +++++
 drivers/acpi/osl.c                  |   15 +++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index fd248a3..b88b8f1 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_rsdp=	[ACPI,EFI,KEXEC]
+			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 52ca964..27cd140 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -237,8 +237,23 @@ void acpi_os_vprintf(const char *fmt, va_list args)
 #endif
 }
 
+#ifdef CONFIG_KEXEC
+static unsigned long acpi_rsdp;
+static int __init setup_acpi_rsdp(char *arg)
+{
+	acpi_rsdp = simple_strtoul(arg, NULL, 16);
+	return 0;
+}
+early_param("acpi_rsdp", setup_acpi_rsdp);
+#endif
+
 acpi_physical_address __init acpi_os_get_root_pointer(void)
 {
+#ifdef CONFIG_KEXEC
+	if (acpi_rsdp)
+		return acpi_rsdp;
+#endif
+
 	if (efi_enabled) {
 		if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
 			return efi.acpi20;

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] acpi: introduce "acpi_rsdp=" parameter for kdump
  2011-07-14 22:05     ` Takao Indoh
@ 2011-07-16 22:41       ` Len Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Len Brown @ 2011-07-16 22:41 UTC (permalink / raw)
  To: Takao Indoh
  Cc: Konrad Rzeszutek Wilk, linux-kernel, Cong Wang, ebiederm, vgoyal,
	rdunlap, linux-doc, linux-acpi, mjg

applied.

for future reference, the check-in comments go _before_ the "---"
in an e-mail message, note after.

Also acpi is an acronym, and thus spelled ACPI.

thanks,
Len Brown, Intel Open Source Technology Center


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-07-16 22:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-11 15:14 [PATCH v2] acpi: introduce "acpi_rsdp=" parameter for kdump Takao Indoh
2011-07-11 17:23 ` Konrad Rzeszutek Wilk
2011-07-11 17:27   ` Matthew Garrett
2011-07-12 10:30 ` Cong Wang
2011-07-12 10:30   ` Cong Wang
2011-07-12 13:31   ` Konrad Rzeszutek Wilk
2011-07-12 13:31     ` Konrad Rzeszutek Wilk
2011-07-14 22:05     ` Takao Indoh
2011-07-16 22:41       ` Len Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.