[PATCH v7 11/24] efi: Move exit_boot_services into a function