[PATCH v3 28/35] efi: Move exit_boot_services into a function