[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] efi: split out efi_init()
commit 8e3352222b45d999611da51616ae0180601dfd4b Author: Daniel Kiper <daniel.kiper@xxxxxxxxxx> AuthorDate: Thu Oct 8 11:19:28 2015 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Oct 8 11:19:28 2015 +0200 efi: split out efi_init() ..which initializes basic EFI variables. We want to re-use this code to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/common/efi/boot.c | 28 +++++++++++++++++----------- 1 files changed, 17 insertions(+), 11 deletions(-) diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c index 2bc5b25..ba285d4 100644 --- a/xen/common/efi/boot.c +++ b/xen/common/efi/boot.c @@ -597,6 +597,22 @@ static char *__init get_value(const struct file *cfg, const char *section, return NULL; } +static void __init efi_init(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) +{ + efi_ih = ImageHandle; + efi_bs = SystemTable->BootServices; + efi_bs_revision = efi_bs->Hdr.Revision; + efi_rs = SystemTable->RuntimeServices; + efi_ct = SystemTable->ConfigurationTable; + efi_num_ct = SystemTable->NumberOfTableEntries; + efi_version = SystemTable->Hdr.Revision; + efi_fw_vendor = SystemTable->FirmwareVendor; + efi_fw_revision = SystemTable->FirmwareRevision; + + StdOut = SystemTable->ConOut; + StdErr = SystemTable->StdErr ?: StdOut; +} + static void __init setup_efi_pci(void) { EFI_STATUS status; @@ -719,18 +735,8 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) char *option_str; bool_t use_cfg_file; - efi_ih = ImageHandle; - efi_bs = SystemTable->BootServices; - efi_bs_revision = efi_bs->Hdr.Revision; - efi_rs = SystemTable->RuntimeServices; - efi_ct = SystemTable->ConfigurationTable; - efi_num_ct = SystemTable->NumberOfTableEntries; - efi_version = SystemTable->Hdr.Revision; - efi_fw_vendor = SystemTable->FirmwareVendor; - efi_fw_revision = SystemTable->FirmwareRevision; + efi_init(ImageHandle, SystemTable); - StdOut = SystemTable->ConOut; - StdErr = SystemTable->StdErr ?: StdOut; use_cfg_file = efi_arch_use_config_file(SystemTable); status = efi_bs->HandleProtocol(ImageHandle, &loaded_image_guid, -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |