From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZOsoq-00047M-D4 for mharc-grub-devel@gnu.org; Mon, 10 Aug 2015 15:33:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOson-00045S-KR for grub-devel@gnu.org; Mon, 10 Aug 2015 15:33:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOsok-00015d-Cp for grub-devel@gnu.org; Mon, 10 Aug 2015 15:33:09 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:35374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOsok-00014I-59 for grub-devel@gnu.org; Mon, 10 Aug 2015 15:33:06 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t7AJWu2t023297 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 10 Aug 2015 19:32:56 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t7AJWu5m014213 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 10 Aug 2015 19:32:56 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t7AJWsQ6000680; Mon, 10 Aug 2015 19:32:54 GMT Received: from l.oracle.com (/10.137.176.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 10 Aug 2015 12:32:54 -0700 Received: by l.oracle.com (Postfix, from userid 1000) id 6FD296A3C73; Mon, 10 Aug 2015 15:32:52 -0400 (EDT) Date: Mon, 10 Aug 2015 15:32:52 -0400 From: Konrad Rzeszutek Wilk To: Daniel Kiper Subject: Re: [Xen-devel] [PATCH v2 15/23] efi: split out efi_tables() Message-ID: <20150810193252.GL13576@l.oracle.com> References: <1437402558-7313-1-git-send-email-daniel.kiper@oracle.com> <1437402558-7313-16-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-16-git-send-email-daniel.kiper@oracle.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Source-IP: userv0021.oracle.com [156.151.31.71] 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:33:11 -0000 On Mon, Jul 20, 2015 at 04:29:10PM +0200, Daniel Kiper wrote: > ..which collects system tables data. 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 | 61 +++++++++++++++++++++++++++---------------------- > 1 file changed, 34 insertions(+), 27 deletions(-) > > diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c > index 8d16470..fd62125 100644 > --- a/xen/common/efi/boot.c > +++ b/xen/common/efi/boot.c > @@ -717,6 +717,39 @@ static UINTN __init efi_find_gop_mode(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop, > return gop_mode; > } > > +static void __init efi_tables(void) > +{ > + unsigned int i; > + > + /* Obtain basic table pointers. */ > + for ( i = 0; i < efi_num_ct; ++i ) > + { > + static EFI_GUID __initdata acpi2_guid = ACPI_20_TABLE_GUID; > + static EFI_GUID __initdata acpi_guid = ACPI_TABLE_GUID; > + static EFI_GUID __initdata mps_guid = MPS_TABLE_GUID; > + static EFI_GUID __initdata smbios_guid = SMBIOS_TABLE_GUID; > + static EFI_GUID __initdata smbios3_guid = SMBIOS3_TABLE_GUID; > + > + if ( match_guid(&acpi2_guid, &efi_ct[i].VendorGuid) ) > + efi.acpi20 = (long)efi_ct[i].VendorTable; > + if ( match_guid(&acpi_guid, &efi_ct[i].VendorGuid) ) > + efi.acpi = (long)efi_ct[i].VendorTable; > + if ( match_guid(&mps_guid, &efi_ct[i].VendorGuid) ) > + efi.mps = (long)efi_ct[i].VendorTable; > + if ( match_guid(&smbios_guid, &efi_ct[i].VendorGuid) ) > + efi.smbios = (long)efi_ct[i].VendorTable; > + if ( match_guid(&smbios3_guid, &efi_ct[i].VendorGuid) ) > + efi.smbios3 = (long)efi_ct[i].VendorTable; > + } > + > +#ifndef CONFIG_ARM /* TODO - disabled until implemented on ARM */ > + dmi_efi_get_table(efi.smbios != EFI_INVALID_TABLE_ADDR > + ? (void *)(long)efi.smbios : NULL, > + efi.smbios3 != EFI_INVALID_TABLE_ADDR > + ? (void *)(long)efi.smbios3 : NULL); > +#endif > +} > + > static void __init setup_efi_pci(void) > { > EFI_STATUS status; > @@ -1039,33 +1072,7 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) > /* XXX Collect EDID info. */ > efi_arch_cpu(); > > - /* Obtain basic table pointers. */ > - for ( i = 0; i < efi_num_ct; ++i ) > - { > - static EFI_GUID __initdata acpi2_guid = ACPI_20_TABLE_GUID; > - static EFI_GUID __initdata acpi_guid = ACPI_TABLE_GUID; > - static EFI_GUID __initdata mps_guid = MPS_TABLE_GUID; > - static EFI_GUID __initdata smbios_guid = SMBIOS_TABLE_GUID; > - static EFI_GUID __initdata smbios3_guid = SMBIOS3_TABLE_GUID; > - > - if ( match_guid(&acpi2_guid, &efi_ct[i].VendorGuid) ) > - efi.acpi20 = (long)efi_ct[i].VendorTable; > - if ( match_guid(&acpi_guid, &efi_ct[i].VendorGuid) ) > - efi.acpi = (long)efi_ct[i].VendorTable; > - if ( match_guid(&mps_guid, &efi_ct[i].VendorGuid) ) > - efi.mps = (long)efi_ct[i].VendorTable; > - if ( match_guid(&smbios_guid, &efi_ct[i].VendorGuid) ) > - efi.smbios = (long)efi_ct[i].VendorTable; > - if ( match_guid(&smbios3_guid, &efi_ct[i].VendorGuid) ) > - efi.smbios3 = (long)efi_ct[i].VendorTable; > - } > - > -#ifndef CONFIG_ARM /* TODO - disabled until implemented on ARM */ > - dmi_efi_get_table(efi.smbios != EFI_INVALID_TABLE_ADDR > - ? (void *)(long)efi.smbios : NULL, > - efi.smbios3 != EFI_INVALID_TABLE_ADDR > - ? (void *)(long)efi.smbios3 : NULL); > -#endif > + efi_tables(); > > /* Collect PCI ROM contents. */ > setup_efi_pci(); > -- > 1.7.10.4 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel