efi.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (c) 2015, Linaro Limited, Shannon Zhao
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along
  15. * with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #include <linux/efi.h>
  18. #include <xen/xen-ops.h>
  19. #include <asm/xen/xen-ops.h>
  20. /* Set XEN EFI runtime services function pointers. Other fields of struct efi,
  21. * e.g. efi.systab, will be set like normal EFI.
  22. */
  23. void __init xen_efi_runtime_setup(void)
  24. {
  25. efi.get_time = xen_efi_get_time;
  26. efi.set_time = xen_efi_set_time;
  27. efi.get_wakeup_time = xen_efi_get_wakeup_time;
  28. efi.set_wakeup_time = xen_efi_set_wakeup_time;
  29. efi.get_variable = xen_efi_get_variable;
  30. efi.get_next_variable = xen_efi_get_next_variable;
  31. efi.set_variable = xen_efi_set_variable;
  32. efi.set_variable_nonblocking = xen_efi_set_variable;
  33. efi.query_variable_info = xen_efi_query_variable_info;
  34. efi.query_variable_info_nonblocking = xen_efi_query_variable_info;
  35. efi.update_capsule = xen_efi_update_capsule;
  36. efi.query_capsule_caps = xen_efi_query_capsule_caps;
  37. efi.get_next_high_mono_count = xen_efi_get_next_high_mono_count;
  38. efi.reset_system = xen_efi_reset_system;
  39. }
  40. EXPORT_SYMBOL_GPL(xen_efi_runtime_setup);