1*c7341d6aSDaniel Kiper /* 2*c7341d6aSDaniel Kiper * Copyright (c) 2014 Oracle Co., Daniel Kiper 3*c7341d6aSDaniel Kiper * 4*c7341d6aSDaniel Kiper * This program is free software; you can redistribute it and/or modify 5*c7341d6aSDaniel Kiper * it under the terms of the GNU General Public License as published by 6*c7341d6aSDaniel Kiper * the Free Software Foundation; either version 2 of the License, or 7*c7341d6aSDaniel Kiper * (at your option) any later version. 8*c7341d6aSDaniel Kiper * 9*c7341d6aSDaniel Kiper * This program is distributed in the hope that it will be useful, 10*c7341d6aSDaniel Kiper * but WITHOUT ANY WARRANTY; without even the implied warranty of 11*c7341d6aSDaniel Kiper * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12*c7341d6aSDaniel Kiper * GNU General Public License for more details. 13*c7341d6aSDaniel Kiper * 14*c7341d6aSDaniel Kiper * You should have received a copy of the GNU General Public License along 15*c7341d6aSDaniel Kiper * with this program. If not, see <http://www.gnu.org/licenses/>. 16*c7341d6aSDaniel Kiper */ 17*c7341d6aSDaniel Kiper 18*c7341d6aSDaniel Kiper #include <linux/efi.h> 19*c7341d6aSDaniel Kiper #include <linux/init.h> 20*c7341d6aSDaniel Kiper #include <linux/string.h> 21*c7341d6aSDaniel Kiper 22*c7341d6aSDaniel Kiper #include <xen/xen-ops.h> 23*c7341d6aSDaniel Kiper 24*c7341d6aSDaniel Kiper #include <asm/setup.h> 25*c7341d6aSDaniel Kiper 26*c7341d6aSDaniel Kiper void __init xen_efi_init(void) 27*c7341d6aSDaniel Kiper { 28*c7341d6aSDaniel Kiper efi_system_table_t *efi_systab_xen; 29*c7341d6aSDaniel Kiper 30*c7341d6aSDaniel Kiper efi_systab_xen = xen_efi_probe(); 31*c7341d6aSDaniel Kiper 32*c7341d6aSDaniel Kiper if (efi_systab_xen == NULL) 33*c7341d6aSDaniel Kiper return; 34*c7341d6aSDaniel Kiper 35*c7341d6aSDaniel Kiper strncpy((char *)&boot_params.efi_info.efi_loader_signature, "Xen", 36*c7341d6aSDaniel Kiper sizeof(boot_params.efi_info.efi_loader_signature)); 37*c7341d6aSDaniel Kiper boot_params.efi_info.efi_systab = (__u32)__pa(efi_systab_xen); 38*c7341d6aSDaniel Kiper boot_params.efi_info.efi_systab_hi = (__u32)(__pa(efi_systab_xen) >> 32); 39*c7341d6aSDaniel Kiper 40*c7341d6aSDaniel Kiper set_bit(EFI_BOOT, &efi.flags); 41*c7341d6aSDaniel Kiper set_bit(EFI_PARAVIRT, &efi.flags); 42*c7341d6aSDaniel Kiper set_bit(EFI_64BIT, &efi.flags); 43*c7341d6aSDaniel Kiper } 44