linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jean Delvare <jdelvare@suse.com>,
	linux-kernel@vger.kernel.org,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 2/2] firmware: dmi_scan: Pass dmi_entry_point to kexec'ed kernel
Date: Fri,  2 Dec 2016 21:54:16 +0200	[thread overview]
Message-ID: <20161202195416.58953-3-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20161202195416.58953-1-andriy.shevchenko@linux.intel.com>

Until now kexec'ed kernel has no clue where to look for DMI entry point.

Pass it via kernel command line parameter in the same way as it's done for ACPI
RSDP.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 Documentation/admin-guide/kernel-parameters.txt |  5 +++++
 drivers/firmware/dmi_scan.c                     | 14 ++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index be2d6d0..94f219f 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -843,6 +843,11 @@
 			The filter can be disabled or changed to another
 			driver later using sysfs.
 
+	dmi_entry_point=	[DMI,EFI,KEXEC]
+			Pass the DMI entry point to the kernel, mostly used
+			on machines running EFI runtime service to boot the
+			second kernel for kdump.
+
 	drm_kms_helper.edid_firmware=[<connector>:]<file>[,[<connector>:]<file>]
 			Broken monitors, graphic adapters, KVMs and EDIDless
 			panels may send no or incorrect EDID data sets.
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index b88def6..215843f 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -595,8 +595,22 @@ static int __init dmi_smbios3_present(const u8 *buf)
 	return 1;
 }
 
+#ifdef CONFIG_KEXEC
+static unsigned long dmi_entry_point;
+static int __init setup_dmi_entry_point(char *arg)
+{
+	return kstrtoul(arg, 16, &dmi_entry_point);
+}
+early_param("dmi_entry_point", setup_dmi_entry_point);
+#endif
+
 static resource_size_t __init dmi_get_entry_point(void)
 {
+#ifdef CONFIG_KEXEC
+	if (dmi_entry_point)
+		return dmi_entry_point;
+#endif
+
 	if (efi_enabled(EFI_CONFIG_TABLES)) {
 		/*
 		 * According to the DMTF SMBIOS reference spec v3.0.0, it is
-- 
2.10.2

  parent reply	other threads:[~2016-12-02 19:54 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-02 19:54 [PATCH v1 0/2] firmware: dmi_scan: Make it work in kexec'ed kernel Andy Shevchenko
2016-12-02 19:54 ` [PATCH v1 1/2] firmware: dmi_scan: Split out dmi_get_entry_point() helper Andy Shevchenko
2016-12-15 11:13   ` Jean Delvare
2016-12-02 19:54 ` Andy Shevchenko [this message]
2016-12-15 11:28   ` [PATCH v1 2/2] firmware: dmi_scan: Pass dmi_entry_point to kexec'ed kernel Jean Delvare
2016-12-16  2:32     ` Dave Young
2016-12-16 12:18       ` Andy Shevchenko
2016-12-16 13:33         ` Jean Delvare
2016-12-17 10:57           ` Dave Young
2019-09-06 19:00             ` Andy Shevchenko
2020-01-20 12:19             ` Andy Shevchenko
2020-01-20 16:04               ` Eric W. Biederman
2020-01-20 21:42                 ` Jean Delvare
2020-01-20 21:55                   ` Andy Shevchenko
2020-01-21  9:03                     ` Jean Delvare
2020-01-21 16:29                       ` Eric W. Biederman
2020-01-21 17:24                         ` Andy Shevchenko
2020-01-20 22:31                 ` Andy Shevchenko
2020-01-20 23:18                   ` Ard Biesheuvel
2020-01-21 15:37                     ` Andy Shevchenko
2020-01-21 17:17                       ` Eric W. Biederman
2020-05-21 17:39                         ` Andy Shevchenko
2021-06-02  8:37                     ` Andy Shevchenko
2021-06-02  8:53                       ` Andy Shevchenko
2016-12-17 10:50         ` Dave Young
2020-01-20 12:16 ` [PATCH v1 0/2] firmware: dmi_scan: Make it work in " Andy Shevchenko
2020-05-21 15:53   ` Andy Shevchenko
2020-05-21 15:59     ` Andy Shevchenko
2021-06-02  8:42 ` Andy Shevchenko
2021-06-02  8:53   ` Andy Shevchenko
2021-06-05  7:51     ` Dave Young
2021-06-07 16:22       ` Andy Shevchenko
2021-06-07 17:18         ` Andy Shevchenko
2021-06-08 12:25           ` Dave Young
2021-06-08 12:38             ` Andy Shevchenko
2021-06-09 11:55               ` Dave Young
2021-06-12  4:40                 ` Dave Young
2021-06-14 15:38                   ` Andy Shevchenko
2021-06-14 17:07                     ` Andy Shevchenko
2021-06-14 17:27                       ` Andy Shevchenko
2021-07-19  7:53                         ` Ard Biesheuvel
2021-07-19  8:25                           ` Andy Shevchenko
2021-10-06 16:28                         ` Andy Shevchenko
2021-10-07  7:20                           ` Ard Biesheuvel
2021-10-07  7:23                             ` Andy Shevchenko
2021-10-17 13:31                               ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161202195416.58953-3-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=jdelvare@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).