From: "Jan Beulich" Subject: Re: [PATCH V4 05/15] Add efi_arch_cfg_file() to handle arch specific cfg file fields Date: Fri, 12 Sep 2014 08:10:44 +0100 Message-ID: <5412B89402000078000344E8@mail.emea.novell.com> References: <1410310325-4509-1-git-send-email-roy.franz@linaro.org> <1410310325-4509-6-git-send-email-roy.franz@linaro.org> <5411CAC10200007800033F49@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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 , Ian Campbell , tim , xen-devel , Stefano Stabellini , Fu Wei List-Id: xen-devel@lists.xenproject.org >>> On 11.09.14 at 20:11, wrote: > On Thu, Sep 11, 2014 at 7:16 AM, Jan Beulich wrote: >>>>> On 10.09.14 at 02:51, wrote: >>> @@ -752,6 +758,9 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE > *SystemTable) >>> } >>> if ( !name.s ) >>> blexit(L"No Dom0 kernel image specified."); >>> + >>> + efi_arch_cfg_file(dir_handle, section.s); >>> + >>> split_value(name.s); >>> read_file(dir_handle, s2w(&name), &kernel); >>> efi_bs->FreePool(name.w); >>> @@ -769,17 +778,6 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE > *SystemTable) >>> efi_bs->FreePool(name.w); >>> } >>> >>> - name.s = get_value(&cfg, section.s, "ucode"); >>> - if ( !name.s ) >>> - name.s = get_value(&cfg, "global", "ucode"); >>> - if ( name.s ) >>> - { >>> - microcode_set_module(mbi.mods_count); >>> - split_value(name.s); >>> - read_file(dir_handle, s2w(&name), &ucode); >>> - efi_bs->FreePool(name.w); >>> - } >>> - >>> name.s = get_value(&cfg, section.s, "xsm"); >>> if ( name.s ) >>> { >> >> While the ordering shouldn't matter that much, is it intentional that >> you move this up ahead of the loading of the kernel? If anything, >> I'd see this move down after the XSM loading. >> > Yes, this is intentional, as in the ARM case the configuration file > specifies > the device tree to use, and the kernel and other modules are added to this, > so we need this set up before we actually read the other module files. For > x86 > the ordering didn't seem to have any dependencies. I can add a comment > explaining this. Thing is that (not just here) I prefer allocating big chunks of memory before smaller ones (i.e. kernel+initrd before ucode+xsm). Hence maybe we'd be better of with a pre and a post arch hook here. Jan