[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140326125623.GA24856@console-pimps.org>
Date: Wed, 26 Mar 2014 12:56:23 +0000
From: Matt Fleming <matt@...sole-pimps.org>
To: Daniel Kiper <daniel.kiper@...cle.com>
Cc: linux-efi@...r.kernel.org, linux-ia64@...r.kernel.org,
linux-kernel@...r.kernel.org, x86@...nel.org,
xen-devel@...ts.xenproject.org, boris.ostrovsky@...cle.com,
david.vrabel@...rix.com, eshelton@...ox.com, fenghua.yu@...el.com,
hpa@...or.com, ian.campbell@...rix.com, jbeulich@...e.com,
jeremy@...p.org, konrad.wilk@...cle.com, matt.fleming@...el.com,
mingo@...hat.com, stefano.stabellini@...citrix.com,
tglx@...utronix.de, tony.luck@...el.com,
Tang Liang <liang.tang@...cle.com>
Subject: Re: [PATCH v3 1/5] efi: Add efi_init_ops variable
On Tue, 25 Mar, at 09:57:52PM, Daniel Kiper wrote:
> Add efi_init_ops variable which allows us to replace
> EFI init functions on Xen with its specific stuff.
>
> This patch is based on Jan Beulich and Tang Liang work.
>
> Signed-off-by: Daniel Kiper <daniel.kiper@...cle.com>
> Signed-off-by: Tang Liang <liang.tang@...cle.com>
> ---
> arch/ia64/kernel/efi.c | 30 +++++++++++++++++++++---------
> arch/x86/platform/efi/efi.c | 18 +++++++++++++-----
> drivers/firmware/efi/efi.c | 26 ++++++++++++++++++++++++++
> include/linux/efi.h | 8 ++++++++
> 4 files changed, 68 insertions(+), 14 deletions(-)
[...]
> @@ -1118,6 +1118,14 @@ u64 efi_mem_attributes(unsigned long phys_addr)
> return 0;
> }
>
> +struct efi_init_ops efi_init_ops = {
> + .efi_init = efi_init_generic,
> + .efi_reserve_boot_services = efi_reserve_boot_services_generic,
> + .efi_enter_virtual_mode = efi_enter_virtual_mode_generic,
> + .efi_mem_type = efi_mem_type_generic,
> + .efi_mem_attributes = efi_mem_attributes_generic
> +};
Please don't create another struct of EFI function pointers.
After this we'll have 3 global efi structures defintions and 4 global
efi objects on x86,
- struct efi_early [in the boot stub]
- struct efi ['efi_phys' before/'efi' after SetVirtualAddressMap()]
- struct efi_init_ops [for the benefit of xen]
I have a big problem with exposing .efi_reserve_boot_services as an API.
Also, the fact that in later patches you're copying chunks of the x86
virt_*() funtions suggests to me that this has been implemented at the
wrong layer, because it actively discourages sharing code between x86
and Xen.
--
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists