xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 for-4.5] EFI: Always use EFI command line
@ 2014-10-24 23:41 Roy Franz
  2014-10-25  9:06 ` Ian Campbell
  0 siblings, 1 reply; 25+ messages in thread
From: Roy Franz @ 2014-10-24 23:41 UTC (permalink / raw)
  To: xen-devel, ian.campbell, stefano.stabellini, tim, jbeulich
  Cc: Roy Franz, fu.wei

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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2014-11-06  5:35 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-24 23:41 [PATCH V2 for-4.5] EFI: Always use EFI command line Roy Franz
2014-10-25  9:06 ` 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

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).