From: "Jan Beulich" Subject: Re: [PATCH V4 10/15] Add SMBIOS and runtime services setup arch functions. Date: Thu, 11 Sep 2014 15:44:14 +0100 Message-ID: <5411D15E0200007800033F93@mail.emea.novell.com> References: <1410310325-4509-1-git-send-email-roy.franz@linaro.org> <1410310325-4509-11-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: <1410310325-4509-11-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 10.09.14 at 02:52, wrote: > @@ -805,49 +801,13 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) > boot_cpu_data.x86_capability[1] = cpuid_ext_features; > } > > - /* 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; > - > - 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; > - } The only arch specific things I can see throughout this entire patch are the specific GUIDs and which fields they go into in the internal structure. The GUIDs can be put in a table, and the fields can be represented e.g. via offsetof(), paired with the respective GUID. Jan