[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH V4 10/15] Add SMBIOS and runtime services setup arch functions.

On Fri, Sep 12, 2014 at 12:14 AM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>> On 12.09.14 at 00:03, <roy.franz@xxxxxxxxxx> wrote:
> On Thu, Sep 11, 2014 at 7:44 AM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>>>> On 10.09.14 at 02:52, <roy.franz@xxxxxxxxxx> 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.
> The efi structure is defined in runtime.c for runtime use, which is
> why I moved it,
> as I am not addressing runtime services in this patchset. This is an
> (ab)use of
> the architecture specific head file, using it for features that are
> currently only implemented
> on that architecture, rather than fundamental architectural differences.

So how about you enable building runtime.c on ARM right away and
for now simply #ifdef out everything but the variable definitions there?


I think this will work pretty well. ÂI have maybe been overly avoiding #ifdefs..
I'll move the runtime.c/compat.c files to common/efi as well.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.