Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758267AbcLPCja (ORCPT ); Thu, 15 Dec 2016 21:39:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39826 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752067AbcLPCjY (ORCPT ); Thu, 15 Dec 2016 21:39:24 -0500 Date: Fri, 16 Dec 2016 10:32:13 +0800 From: Dave Young To: Jean Delvare Cc: Andy Shevchenko , kexec@lists.infradead.org, Mika Westerberg , Eric Biederman , linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 2/2] firmware: dmi_scan: Pass dmi_entry_point to kexec'ed kernel Message-ID: <20161216023213.GA4505@dhcp-128-65.nay.redhat.com> References: <20161202195416.58953-1-andriy.shevchenko@linux.intel.com> <20161202195416.58953-3-andriy.shevchenko@linux.intel.com> <20161215122856.7d24b7a8@endymion> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161215122856.7d24b7a8@endymion> User-Agent: Mutt/1.7.1 (2016-10-04) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 16 Dec 2016 02:32:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2904 Lines: 83 On 12/15/16 at 12:28pm, Jean Delvare wrote: > Hi Andy, > > On Fri, 2 Dec 2016 21:54:16 +0200, Andy Shevchenko wrote: > > 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. > > I am no kexec expert but this confuses me. Shouldn't the second kernel > have access to the EFI systab as the first kernel does? It includes > many more pointers than just ACPI and DMI tables, and it would seem > inconvenient to have to pass all these addresses individually > explicitly. Yes, in modern linux kernel, kexec has the support for EFI, I think it should work naturally at least in x86_64. Is there any test log with latest mainline kernel about this? > > Adding Eric to Cc for his opinion. > > > > > Signed-off-by: Andy Shevchenko > > --- > > 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=[:][,[:]] > > 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 > > > -- > Jean Delvare > SUSE L3 Support > > _______________________________________________ > kexec mailing list > kexec@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/kexec