[PATCH v6 14/27] efi: Move exit_boot_services into a function