From: Dave Young <dyoung@redhat.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Jean Delvare" <jdelvare@suse.com>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Mika Westerberg" <mika.westerberg@linux.intel.com>,
"Javier Tiá" <javier.tia@gmail.com>,
kexec@lists.infradead.org,
"Eric Biederman" <ebiederm@xmission.com>,
linux-efi <linux-efi@vger.kernel.org>,
"Matt Fleming" <matt@codeblueprint.co.uk>,
"Ard Biesheuvel" <ardb@kernel.org>
Subject: Re: [PATCH v1 0/2] firmware: dmi_scan: Make it work in kexec'ed kernel
Date: Sat, 12 Jun 2021 12:40:57 +0800 [thread overview]
Message-ID: <YMQ62d1EFFjRcv6w@dhcp-128-65.nay.redhat.com> (raw)
In-Reply-To: <YMCsSqzmG4jb1Ojo@dhcp-128-65.nay.redhat.com>
> Probably it is doable to have kexec on 32bit efi working
> without runtime service support, that means no need the trick of fixed
> mapping.
>
> If I can restore my vm to boot 32bit efi on this weekend then I may provide some draft
> patches for test.
Unfortunately I failed to setup a 32bit efi guest, here are some
untested draft patches, please have a try.
========= kernel draft patch ==============
---
arch/x86/boot/header.S | 2 +-
arch/x86/platform/efi/efi.c | 6 +++---
arch/x86/platform/efi/quirks.c | 3 ---
3 files changed, 4 insertions(+), 7 deletions(-)
--- linux-x86.orig/arch/x86/boot/header.S
+++ linux-x86/arch/x86/boot/header.S
@@ -416,7 +416,7 @@ xloadflags:
# define XLF23 0
#endif
-#if defined(CONFIG_X86_64) && defined(CONFIG_EFI) && defined(CONFIG_KEXEC_CORE)
+#if defined(CONFIG_EFI) && defined(CONFIG_KEXEC_CORE)
# define XLF4 XLF_EFI_KEXEC
#else
# define XLF4 0
--- linux-x86.orig/arch/x86/platform/efi/efi.c
+++ linux-x86/arch/x86/platform/efi/efi.c
@@ -710,10 +710,10 @@ static void __init kexec_enter_virtual_m
unsigned int num_pages;
/*
- * We don't do virtual mode, since we don't do runtime services, on
- * non-native EFI.
+ * We don't do virtual mode, since we don't do runtime services
+ * on non-native or IA32 EFI.
*/
- if (efi_is_mixed()) {
+ if (!efi_enabled(EFI_64BIT)) {
efi_memmap_unmap();
clear_bit(EFI_RUNTIME_SERVICES, &efi.flags);
return;
--- linux-x86.orig/arch/x86/platform/efi/quirks.c
+++ linux-x86/arch/x86/platform/efi/quirks.c
@@ -524,9 +524,6 @@ int __init efi_reuse_config(u64 tables,
if (!efi_setup)
return 0;
- if (!efi_enabled(EFI_64BIT))
- return 0;
-
data = early_memremap(efi_setup, sizeof(*data));
if (!data) {
ret = -ENOMEM;
========= kexec-tools draft patch =========
---
kexec/arch/i386/kexec-bzImage.c | 5 +++++
1 file changed, 5 insertions(+)
--- kexec-tools.orig/kexec/arch/i386/kexec-bzImage.c
+++ kexec-tools/kexec/arch/i386/kexec-bzImage.c
@@ -83,6 +83,11 @@ int bzImage_probe(const char *buf, off_t
if (probe_debug) {
fprintf(stderr, "It's a bzImage\n");
}
+
+#define XLF_EFI_KEXEC (1 << 4)
+ if ((header->xloadflags & XLF_EFI_KEXEC) == XLF_EFI_KEXEC)
+ bzImage_support_efi_boot = 1;
+
return 0;
}
next prev parent reply other threads:[~2021-06-12 4:41 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 ` [PATCH v1 2/2] firmware: dmi_scan: Pass dmi_entry_point to kexec'ed kernel Andy Shevchenko
2016-12-15 11:28 ` 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 [this message]
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=YMQ62d1EFFjRcv6w@dhcp-128-65.nay.redhat.com \
--to=dyoung@redhat.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=ardb@kernel.org \
--cc=ebiederm@xmission.com \
--cc=javier.tia@gmail.com \
--cc=jdelvare@suse.com \
--cc=kexec@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeblueprint.co.uk \
--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).