]> xenbits.xensource.com Git - xen.git/commit
efi: create efi_enabled()
authorDaniel Kiper <daniel.kiper@oracle.com>
Wed, 7 Dec 2016 13:36:11 +0000 (14:36 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 7 Dec 2016 13:36:11 +0000 (14:36 +0100)
commit146786b922ea4eeb9643029af3939244aea009c1
tree8963dd58d4390fcddd27769b9297baf173a02b4f
parentf343852c5e930ba099a635909878afc66f0dce1b
efi: create efi_enabled()

First of all we need to differentiate between legacy BIOS
and EFI platforms during runtime, not during build, because
one image will have legacy and EFI code and can be executed
on both platforms. Additionally, we need more fine grained
knowledge about EFI environment and check for EFI platform
and EFI loader separately to properly support multiboot2
protocol. In general Xen loaded by this protocol uses memory
mappings and loaded modules in similar way to Xen loaded by
multiboot (v1) protocol. Hence, create efi_enabled() which
checks available features in efi_flags. This patch defines
EFI_BOOT, EFI_LOADER and EFI_RS features. EFI_BOOT is equal
to old efi_enabled == 1. EFI_RS ease control on runtime
services usage. EFI_LOADER tells that Xen was loaded
directly from EFI as PE executable.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
12 files changed:
xen/arch/x86/dmi_scan.c
xen/arch/x86/domain_page.c
xen/arch/x86/efi/stub.c
xen/arch/x86/mpparse.c
xen/arch/x86/setup.c
xen/arch/x86/shutdown.c
xen/arch/x86/time.c
xen/common/efi/boot.c
xen/common/efi/runtime.c
xen/common/version.c
xen/drivers/acpi/osl.c
xen/include/xen/efi.h