From: Daniel Kiper <daniel.kiper@oracle.com>
To: xen-devel@lists.xenproject.org
Cc: jgross@suse.com, sstabellini@kernel.org,
andrew.cooper3@citrix.com, cardoe@cardoe.com,
pgnet.dev@gmail.com, ning.sun@intel.com, david.vrabel@citrix.com,
jbeulich@suse.com, qiaowei.ren@intel.com,
richard.l.maliszewski@intel.com, gang.wei@intel.com,
fu.wei@linaro.org
Subject: [PATCH v4 13/19] efi: EFI_RS bit in efi.flags must be controlled by efi=[no-]rs command line argument
Date: Sat, 6 Aug 2016 01:04:36 +0200 [thread overview]
Message-ID: <1470438282-4226-14-git-send-email-daniel.kiper@oracle.com> (raw)
In-Reply-To: <1470438282-4226-1-git-send-email-daniel.kiper@oracle.com>
Otherwise efi_enabled(EFI_RS) check is unreliable.
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
xen/common/efi/boot.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
index dd6b0a8..95cb25f 100644
--- a/xen/common/efi/boot.c
+++ b/xen/common/efi/boot.c
@@ -1159,7 +1159,6 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
#ifndef CONFIG_ARM /* TODO - runtime service support */
-static bool_t __initdata efi_rs_enable = 1;
static bool_t __initdata efi_map_uc;
static void __init parse_efi_param(char *s)
@@ -1177,7 +1176,10 @@ static void __init parse_efi_param(char *s)
*ss = '\0';
if ( !strcmp(s, "rs") )
- efi_rs_enable = val;
+ {
+ if ( !val )
+ __clear_bit(EFI_RS, &efi.flags);
+ }
else if ( !strcmp(s, "attr=uc") )
efi_map_uc = val;
@@ -1260,7 +1262,7 @@ void __init efi_init_memory(void)
desc->PhysicalStart, desc->PhysicalStart + len - 1,
desc->Type, desc->Attribute);
- if ( !efi_rs_enable ||
+ if ( !efi_enabled(EFI_RS) ||
(!(desc->Attribute & EFI_MEMORY_RUNTIME) &&
(!map_bs ||
(desc->Type != EfiBootServicesCode &&
@@ -1334,7 +1336,7 @@ void __init efi_init_memory(void)
}
}
- if ( !efi_rs_enable )
+ if ( !efi_enabled(EFI_RS) )
{
efi_fw_vendor = NULL;
return;
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-08-05 23:06 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-05 23:04 [PATCH v4 00/19] x86: multiboot2 protocol support Daniel Kiper
2016-08-05 23:04 ` [PATCH v4 01/19] x86: allow EFI reboot method neither on EFI platforms Daniel Kiper
2016-08-09 12:08 ` Jan Beulich
2016-08-05 23:04 ` [PATCH v4 02/19] x86/boot: remove multiboot1_header_end from symbol table Daniel Kiper
2016-08-09 13:24 ` Andrew Cooper
2016-08-09 13:52 ` Jan Beulich
2016-08-09 14:09 ` Andrew Cooper
2016-08-09 14:30 ` Jan Beulich
2016-08-05 23:04 ` [PATCH v4 03/19] x86/boot: create *.lnk files with linker script Daniel Kiper
2016-08-11 13:40 ` Jan Beulich
2016-08-05 23:04 ` [PATCH v4 04/19] x86/boot/reloc: reduce assembly usage as much as possible Daniel Kiper
2016-08-11 13:56 ` Jan Beulich
2016-08-05 23:04 ` [PATCH v4 05/19] x86/boot: call reloc() using stdcall calling convention Daniel Kiper
2016-08-11 13:59 ` Jan Beulich
2016-08-05 23:04 ` [PATCH v4 06/19] x86/boot/reloc: create generic alloc and copy functions Daniel Kiper
2016-08-11 14:12 ` Jan Beulich
2016-08-11 14:17 ` Jan Beulich
2016-08-18 8:53 ` Daniel Kiper
2016-08-18 9:41 ` Jan Beulich
2016-08-18 12:18 ` Daniel Kiper
2016-08-18 13:21 ` Jan Beulich
2016-08-05 23:04 ` [PATCH v4 07/19] x86/boot: use %ecx instead of %eax Daniel Kiper
2016-08-05 23:04 ` [PATCH v4 08/19] x86/boot/reloc: Rename some variables and rearrange code a bit Daniel Kiper
2016-08-11 14:16 ` Jan Beulich
2016-08-05 23:04 ` [PATCH v4 09/19] x86: add multiboot2 protocol support Daniel Kiper
2016-08-17 15:39 ` Jan Beulich
2016-08-18 9:23 ` Daniel Kiper
2016-08-18 9:43 ` Jan Beulich
2016-08-18 11:41 ` Daniel Kiper
2016-08-18 13:19 ` Jan Beulich
2016-08-05 23:04 ` [PATCH v4 10/19] efi: move efi struct initialization to xen/common/lib.c Daniel Kiper
2016-08-17 15:56 ` Jan Beulich
2016-08-18 10:17 ` Daniel Kiper
2016-08-18 11:17 ` Jan Beulich
2016-08-05 23:04 ` [PATCH v4 11/19] efi: create efi_enabled() Daniel Kiper
2016-08-17 16:08 ` Jan Beulich
2016-08-05 23:04 ` [PATCH v4 12/19] efi: introduce EFI_RS to ease control on runtime services usage Daniel Kiper
2016-08-17 16:12 ` Jan Beulich
2016-08-18 10:30 ` Daniel Kiper
2016-08-18 11:18 ` Jan Beulich
2016-08-18 11:49 ` Daniel Kiper
2016-08-05 23:04 ` Daniel Kiper [this message]
2016-08-05 23:04 ` [PATCH v4 14/19] efi: build xen.gz with EFI code Daniel Kiper
2016-08-19 9:24 ` Jan Beulich
2016-08-19 10:09 ` Daniel Kiper
2016-08-05 23:04 ` [PATCH v4 15/19] x86/efi: create new early memory allocator Daniel Kiper
2016-08-05 23:04 ` [PATCH v4 16/19] x86: add multiboot2 protocol support for EFI platforms Daniel Kiper
2016-08-05 23:04 ` [PATCH v4 17/19] x86/boot: implement early command line parser in C Daniel Kiper
2016-08-05 23:04 ` [PATCH v4 18/19] x86: make Xen early boot code relocatable Daniel Kiper
2016-08-05 23:04 ` [PATCH v4 19/19] x86: add multiboot2 protocol support for relocatable images Daniel Kiper
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=1470438282-4226-14-git-send-email-daniel.kiper@oracle.com \
--to=daniel.kiper@oracle.com \
--cc=andrew.cooper3@citrix.com \
--cc=cardoe@cardoe.com \
--cc=david.vrabel@citrix.com \
--cc=fu.wei@linaro.org \
--cc=gang.wei@intel.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=ning.sun@intel.com \
--cc=pgnet.dev@gmail.com \
--cc=qiaowei.ren@intel.com \
--cc=richard.l.maliszewski@intel.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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).