From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 616FDC433F5 for ; Tue, 1 Feb 2022 08:33:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 25DC881EE7; Tue, 1 Feb 2022 09:33:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ED6mU5Io"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1896981221; Tue, 1 Feb 2022 09:33:09 +0100 (CET) Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 36E6D80F9E for ; Tue, 1 Feb 2022 09:33:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masami.hiramatsu@linaro.org Received: by mail-pf1-x434.google.com with SMTP id i186so12731134pfe.0 for ; Tue, 01 Feb 2022 00:33:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=AAtbDeyE8ikmcxoVlcn/3HRcyUbC5QLBVM246s2VLvo=; b=ED6mU5IoIfb37pIcLj1lnPZnEliR4MDR3mIp3XhvcE4PaszjZokuKMdOzFCm+2ddPX SBnFMW6irZ/13AC5KixF4btLyePi1dP+gXT7ngGVutoHEITuzM3Q+N6kL951k48+7hXm dU10rttWmVdbyD8xI05e+br/NZIvDHy+QBK6uROhhflt+aKNp8ou4vGOXmXT+DuZKEjm 32DmCkg1WOWPjfS4aZdWxjNCBTj+ROhsOsNTvZ12UAvCe/4fqg9mta/3KwsTynpH8VV4 FrS5Uz9D6xmFSPZBl2dknuxXtIrWS6WrfanPmoS3DFSmpQqk82feZhDSkn8SmKEOi/nL JC2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=AAtbDeyE8ikmcxoVlcn/3HRcyUbC5QLBVM246s2VLvo=; b=hL2ygGSqngdwBwBfIIP1VM0+9o+J5T0LlEeEpF3V0Hyu7nkVQAtI3qqa1Nh6RQSdhx 4g3/wihP1GES14odM0K3dhXa7TGzppEyrCLnRRtg0a9MwZa4W7JnU20gVJAD2l/C88TF AJBJQzzN96gLrzkXCnkWf/8JOJwZrRz4iWIvbDTSHAkdz4Qi+dQZU8ev0lw6XhtXtKfd WT+v0TZRtlIFPTHEsm+fa2XlRxSi5kNW59jzLMEyI6fIEyzyUVQd1lg90g2fT1+ZCaFG 2XFpUNdfWPpsnepR+MS+UG9YJMwCoewTbTRjdiSjL/HoCCsmtkaOnB9AoaUdzfeCCEgU 8abw== X-Gm-Message-State: AOAM532aOTBYxh+1mllip91LNl1+laVuAgKCsj9RL6NZrPJKT7xK1MlY 4I23DDwruWdYpciCNU03rLIsEvfIyrtYzw== X-Google-Smtp-Source: ABdhPJzqbpCoN8kzKI4yMFFTgG8LLSUm2UkuwbB5SThzHb7+VuRTZ35z2ICeOk3HpP5647VwdbrOCQ== X-Received: by 2002:a62:a512:: with SMTP id v18mr23709672pfm.42.1643704384318; Tue, 01 Feb 2022 00:33:04 -0800 (PST) Received: from localhost.localdomain (113x37x226x201.ap113.ftth.ucom.ne.jp. [113.37.226.201]) by smtp.gmail.com with ESMTPSA id g18sm1854287pju.7.2022.02.01.00.33.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Feb 2022 00:33:03 -0800 (PST) From: Masami Hiramatsu To: u-boot@lists.denx.de Cc: Masami Hiramatsu , Patrick Delaunay , Patrice Chotard , Heinrich Schuchardt , Alexander Graf , AKASHI Takahiro , Simon Glass , Bin Meng , Ilias Apalodimas , Jose Marinho , Grant Likely , Tom Rini , Etienne Carriere , Sughosh Ganu , Paul Liu Subject: [PATCH v2 1/2] efi_loader: Avoid using efi_update_capsule() from update capsule on disk Date: Tue, 1 Feb 2022 17:32:59 +0900 Message-Id: <164370437972.365087.4761473791973948840.stgit@localhost> X-Mailer: git-send-email 2.25.1 In-Reply-To: <164370436957.365087.15139421656192351360.stgit@localhost> References: <164370436957.365087.15139421656192351360.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean The efi_update_capsule() may have to handle the capsule flags as an UEFI runtime and boottime service, but the capsule-on-disk process doesn't. Thus, the capsule-on-disk should use the efi_capsule_update_firmware() directly instead of efi_update_capsule(). Suggested-by: AKASHI Takahiro Signed-off-by: Masami Hiramatsu --- Changes in v2: - Fix to pass correct pointer to efi_capsule_update_firmware - Remove ESRT generation, because this part anyway will be removed next patch. --- lib/efi_loader/efi_capsule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c index 4463ae00fd..1ec7ea29ff 100644 --- a/lib/efi_loader/efi_capsule.c +++ b/lib/efi_loader/efi_capsule.c @@ -1118,7 +1118,7 @@ efi_status_t efi_launch_capsules(void) index = 0; ret = efi_capsule_read_file(files[i], &capsule); if (ret == EFI_SUCCESS) { - ret = EFI_CALL(efi_update_capsule(&capsule, 1, 0)); + ret = efi_capsule_update_firmware(capsule); if (ret != EFI_SUCCESS) log_err("Applying capsule %ls failed\n", files[i]);