[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH V2 for-4.5] EFI: Always use EFI command line



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@xxxxxxxxxx>
---
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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.