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

Re: [Xen-devel] [PATCH 05/18] efi: split efi_enabled to efi_platform and efi_loader

On Fri, Feb 20, 2015 at 04:17:35PM +0000, Jan Beulich wrote:
> >>> On 30.01.15 at 18:54, <daniel.kiper@xxxxxxxxxx> wrote:
> > We need more fine grained knowledge about EFI environment and check
> > for EFI platform and EFI loader separately to properly support
> > multiboot2 protocol.
> ... because of ... (i.e. I can't see from the description what the
> separation is good for). Looking at the comments you placed
> aside the variables doesn't help me either.
> > In general Xen loaded by this protocol uses
> > memory mappings and loaded modules in simliar way to Xen loaded
> > by multiboot (v1) protocol. Hence, split efi_enabled to efi_platform
> > and efi_loader.
> And if I'm guessing things right, then introducing efi_loader but
> leaving efi_enabled alone (only converting where needed) would

efi_enabled is not fortunate name for new usage. Currently it means
that Xen binary have or does not have EFI support build in. However,
if we build in multiboot2 protocol into xen.gz then it means that
it can ran on legacy BIOS or EFI platform. So, I think that we
should rename efi_enabled to efi_platform because it will mean
that Xen runs on EFI platform or not.

efi_loader is used to differentiate between EFI native loader
and multiboot2 protocol.

> seem the right approach.


> > --- a/xen/include/xen/efi.h
> > +++ b/xen/include/xen/efi.h
> > @@ -5,7 +5,11 @@
> >  #include <xen/types.h>
> >  #endif
> >
> > -extern const bool_t efi_enabled;
> > +/* If true then Xen runs on EFI platform. */
> > +extern bool_t efi_platform;
> > +
> > +/* If true then Xen was loaded by native EFI loader as PE application. */
> > +extern bool_t efi_loader;
> I don't see why you're losing the constness.

Both of them could be set during runtime. Please look above
for more details.


Xen-devel mailing list



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