efi.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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.query_variable_info = xen_efi_query_variable_info;
  33. efi.update_capsule = xen_efi_update_capsule;
  34. efi.query_capsule_caps = xen_efi_query_capsule_caps;
  35. efi.get_next_high_mono_count = xen_efi_get_next_high_mono_count;
  36. efi.reset_system = NULL; /* Functionality provided by Xen. */
  37. }
  38. EXPORT_SYMBOL_GPL(xen_efi_runtime_setup);