From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH V5 12/15] Add efi_arch_use_config_file() function to control use of config file Date: Mon, 22 Sep 2014 13:48:23 +0100 Message-ID: <542036B70200007800036EF2@mail.emea.novell.com> References: <1411080607-32365-1-git-send-email-roy.franz@linaro.org> <1411080607-32365-13-git-send-email-roy.franz@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1411080607-32365-13-git-send-email-roy.franz@linaro.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roy Franz Cc: keir@xen.org, ian.campbell@citrix.com, tim@xen.org, xen-devel@lists.xen.org, stefano.stabellini@citrix.com, fu.wei@linaro.org List-Id: xen-devel@lists.xenproject.org >>> On 19.09.14 at 00:50, wrote: > The x86 EFI build of Xen always uses a configuration file to load modules, > but > the ARM version can either use a config file to specify the modules, or be > loaded by GRUB in which case GRUB loads the modules and adds them to the DTB > that is passed to Xen. Add the efi_arch_use_config_file() to indicate if a > configuration file is required. For x86, this will always be true. ARM > will > examine the DTB passed via EFI configuration table (if any), and if it > contains > module information will use that that not use the configuration file at all. > Add Emacs footer to efi-boot.h and boot.c > > Signed-off-by: Roy Franz Acked-by: Jan Beulich with two formatting change requests: > @@ -809,109 +805,119 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) > if ( EFI_ERROR(status) ) > gop = NULL; > > - /* Read and parse the config file. */ > - if ( !cfg_file_name.w ) > + if ( efi_arch_use_config_file(SystemTable) ) > { > - CHAR16 *tail; > + EFI_FILE_HANDLE dir_handle; > + /* Get the file system interface. */ > + dir_handle = get_parent_handle(loaded_image, &file_name.w); Blank line between declarations and statements please. > --- a/xen/include/asm-x86/efi-boot.h > +++ b/xen/include/asm-x86/efi-boot.h > @@ -628,3 +628,17 @@ static void __init efi_arch_load_addr_check(EFI_LOADED_IMAGE *loaded_image) > blexit(L"Xen must be loaded at a 2Mb boundary."); > trampoline_xen_phys_start = xen_phys_start; > } > + > +static __init bool_t efi_arch_use_config_file(EFI_SYSTEM_TABLE *SystemTable) static please (i.e. __init and bool_t ought to switch places).