From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZOshI-0001jA-O6 for mharc-grub-devel@gnu.org; Mon, 10 Aug 2015 15:25:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOshH-0001ix-0W for grub-devel@gnu.org; Mon, 10 Aug 2015 15:25:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOshC-0006tu-MH for grub-devel@gnu.org; Mon, 10 Aug 2015 15:25:22 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:29784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOshC-0006to-Eh for grub-devel@gnu.org; Mon, 10 Aug 2015 15:25:18 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t7AJP8Qd011972 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 10 Aug 2015 19:25:08 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t7AJP7vb010517 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 10 Aug 2015 19:25:07 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t7AJP78K014212; Mon, 10 Aug 2015 19:25:07 GMT Received: from l.oracle.com (/10.137.176.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 10 Aug 2015 12:25:07 -0700 Received: by l.oracle.com (Postfix, from userid 1000) id A00896A3C73; Mon, 10 Aug 2015 15:25:05 -0400 (EDT) Date: Mon, 10 Aug 2015 15:25:05 -0400 From: Konrad Rzeszutek Wilk To: Daniel Kiper Subject: Re: [Xen-devel] [PATCH v2 11/23] efi: split out efi_init() Message-ID: <20150810192505.GH13576@l.oracle.com> References: <1437402558-7313-1-git-send-email-daniel.kiper@oracle.com> <1437402558-7313-12-git-send-email-daniel.kiper@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437402558-7313-12-git-send-email-daniel.kiper@oracle.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 Cc: jgross@suse.com, grub-devel@gnu.org, keir@xen.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, gang.wei@intel.com, roy.franz@linaro.org, ning.sun@intel.com, david.vrabel@citrix.com, jbeulich@suse.com, phcoder@gmail.com, xen-devel@lists.xenproject.org, wei.liu2@citrix.com, richard.l.maliszewski@intel.com, qiaowei.ren@intel.com, fu.wei@linaro.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2015 19:25:24 -0000 On Mon, Jul 20, 2015 at 04:29:06PM +0200, Daniel Kiper wrote: > ..which initializes basic EFI variables. We want to re-use this > code to support multiboot2 protocol on EFI platforms. > > Signed-off-by: Daniel Kiper Reviewed-by: Konrad Rzeszutek Wilk > --- > v2 - suggestions/fixes: > - improve commit message > (suggested by Jan Beulich). > --- > xen/common/efi/boot.c | 28 +++++++++++++++++----------- > 1 file changed, 17 insertions(+), 11 deletions(-) > > diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c > index 1f188fe..6f327cd 100644 > --- a/xen/common/efi/boot.c > +++ b/xen/common/efi/boot.c > @@ -595,6 +595,22 @@ static char *__init get_value(const struct file *cfg, const char *section, > return NULL; > } > > +static void __init efi_init(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) > +{ > + efi_ih = ImageHandle; > + efi_bs = SystemTable->BootServices; > + efi_bs_revision = efi_bs->Hdr.Revision; > + efi_rs = SystemTable->RuntimeServices; > + efi_ct = SystemTable->ConfigurationTable; > + efi_num_ct = SystemTable->NumberOfTableEntries; > + efi_version = SystemTable->Hdr.Revision; > + efi_fw_vendor = SystemTable->FirmwareVendor; > + efi_fw_revision = SystemTable->FirmwareRevision; > + > + StdOut = SystemTable->ConOut; > + StdErr = SystemTable->StdErr ?: StdOut; > +} > + > static void __init setup_efi_pci(void) > { > EFI_STATUS status; > @@ -721,18 +737,8 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) > set_bit(EFI_PLATFORM, &efi.flags); > #endif > > - efi_ih = ImageHandle; > - efi_bs = SystemTable->BootServices; > - efi_bs_revision = efi_bs->Hdr.Revision; > - efi_rs = SystemTable->RuntimeServices; > - efi_ct = SystemTable->ConfigurationTable; > - efi_num_ct = SystemTable->NumberOfTableEntries; > - efi_version = SystemTable->Hdr.Revision; > - efi_fw_vendor = SystemTable->FirmwareVendor; > - efi_fw_revision = SystemTable->FirmwareRevision; > + efi_init(ImageHandle, SystemTable); > > - StdOut = SystemTable->ConOut; > - StdErr = SystemTable->StdErr ?: StdOut; > use_cfg_file = efi_arch_use_config_file(SystemTable); > > status = efi_bs->HandleProtocol(ImageHandle, &loaded_image_guid, > -- > 1.7.10.4 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel