From: Roy Franz <roy.franz@linaro.org>
To: xen-devel@lists.xen.org, ian.campbell@citrix.com,
stefano.stabellini@citrix.com, tim@xen.org, jbeulich@suse.com
Cc: Roy Franz <roy.franz@linaro.org>, fu.wei@linaro.org
Subject: [PATCH V2 for-4.5] EFI: Always use EFI command line
Date: Fri, 24 Oct 2014 16:41:09 -0700 [thread overview]
Message-ID: <1414194069-24690-1-git-send-email-roy.franz@linaro.org> (raw)
This patch changes the ARM EFI boot code to always use the EFI commandline,
even when loaded by GRUB, which makes it consistent with Linux EFI booting.
The code previously incorrectly skipped processing of the EFI command line when
modules are present in the loader supplied FDT and the config file is not used.
There is no change in behavior for x86 since it unconditionally uses the config
file.
Update documentation to clarify command line handling for EFI Xen.
Signed-off-by: Roy Franz <roy.franz@linaro.org>
---
Changes since V1:
* Fix use of data after free.
* Update documentation.
(I'm not sure how I'm supposed to refer to to docs/misc/efi.markdown in
the booting.txt. Should I assume that it will be processed to html
and refrence it that way?)
docs/misc/arm/booting.txt | 3 +++
docs/misc/efi.markdown | 8 ++++++--
xen/common/efi/boot.c | 4 +++-
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/docs/misc/arm/booting.txt b/docs/misc/arm/booting.txt
index 9802e5e..1193ae0 100644
--- a/docs/misc/arm/booting.txt
+++ b/docs/misc/arm/booting.txt
@@ -23,6 +23,9 @@ The exceptions to this on 32-bit ARM are as follows:
There are no exception on 64-bit ARM.
+For 64-bit ARM, EFI booting is also supported. See docs/misc/efi.markdown for
+a description of EFI boot.
+
[1] linux/Documentation/arm/Booting
Latest version: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm/Booting
diff --git a/docs/misc/efi.markdown b/docs/misc/efi.markdown
index 5e48aa3..5a783b1 100644
--- a/docs/misc/efi.markdown
+++ b/docs/misc/efi.markdown
@@ -13,7 +13,9 @@ configuration file as described below unless a bootloader, such as GRUB, has
loaded the modules and describes them in the device tree provided to Xen. If a
bootloader provides a device tree containing modules then any configuration
files are ignored, and the bootloader is responsible for populating all
-relevant device tree nodes.
+relevant module device tree nodes, and doing any required video mode setting.
+The EFI command line is always used for Xen arguments.
+
Once built, `make install-xen` will place the resulting binary directly into
the EFI boot partition, provided `EFI_VENDOR` is set in the environment (and
@@ -104,4 +106,6 @@ and really not meant to be used together with the `-cfg=` command line option.
Filenames must be specified relative to the location of the EFI binary.
Extra options to be passed to Xen can also be specified on the command line,
-following a `--` separator option.
+following a `--` separator option. These options from the EFI command line are
+appended to the options contained in the configuration file "options" value,
+if any, before being passed to Xen by the EFI boot code.
diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
index 4257341..ad9dd3a 100644
--- a/xen/common/efi/boot.c
+++ b/xen/common/efi/boot.c
@@ -930,8 +930,10 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
cfg.addr = 0;
dir_handle->Close(dir_handle);
-
}
+ else
+ efi_arch_handle_cmdline(argc ? *argv : NULL, options, NULL);
+
if ( gop && !base_video )
{
--
2.1.0
next reply other threads:[~2014-10-24 23:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 23:41 Roy Franz [this message]
2014-10-25 9:06 ` [PATCH V2 for-4.5] EFI: Always use EFI command line Ian Campbell
2014-10-25 9:27 ` Fu Wei
2014-10-25 10:22 ` Fu Wei
2014-10-25 19:18 ` Roy Franz
2014-10-27 10:55 ` Jan Beulich
2014-10-27 22:29 ` Roy Franz
2014-10-28 1:15 ` Konrad Rzeszutek Wilk
2014-10-28 7:48 ` Jan Beulich
2014-10-29 3:23 ` Roy Franz
2014-10-29 8:40 ` Jan Beulich
2014-10-29 12:44 ` Daniel Kiper
2014-10-29 15:26 ` Ian Campbell
2014-10-29 16:55 ` Daniel Kiper
2014-10-30 2:21 ` Roy Franz
2014-10-30 9:49 ` Jan Beulich
2014-10-30 10:24 ` Ian Campbell
2014-10-30 17:57 ` Daniel Kiper
2014-10-30 19:29 ` Roy Franz
2014-10-30 22:18 ` Daniel Kiper
2014-10-30 23:54 ` Roy Franz
2014-11-04 21:49 ` Daniel Kiper
2014-11-04 22:48 ` Roy Franz
2014-11-05 14:30 ` Daniel Kiper
2014-11-06 5:35 ` Roy Franz
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=1414194069-24690-1-git-send-email-roy.franz@linaro.org \
--to=roy.franz@linaro.org \
--cc=fu.wei@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=jbeulich@suse.com \
--cc=stefano.stabellini@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.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).