[PATCH v9 1/9] efi: Move exit_boot_services into a function