From patchwork Mon May 10 06:31:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 433034 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2564730jao; Sun, 9 May 2021 23:31:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1ukSGq2Q+UGJGUjCL9PjpJTS5L702zU+i7mBvwvoX/Q0NOwntDyVml0wDnmOOeJ7FRWM5 X-Received: by 2002:aa7:cf12:: with SMTP id a18mr27547059edy.160.1620628310400; Sun, 09 May 2021 23:31:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620628310; cv=none; d=google.com; s=arc-20160816; b=lvo3KRUfN77QBnnCrl1O0Xfet47ZFlAprQhFIyMBcZaYzQSXM2z2LRLbBmD5dZ5fdU jgKe9KaW5sZ8+c7qkhfjwQZfWUZYAEQ8MF5tgXT3h9hLSUdUJzTlRtyzkWf/f6GUmkFQ wBPI19DfDj2olKlGKo+QVu3CNBUkpZbG9Gv82ijcLxaHwVV1eJbc5rXFhjbjAIMRfk5G 7JlFon5jL5kLdbsB2frMf9FpPIjDUeR6W37q/8W/WyG+hJZ7MYAk+0TlQw6wO8cmPc2j wUlI3jR6Zx7gLrdP7uqldbDYsuMVjdBRRpoqWK/a/7shwcistPKvvwdI9JZQHvbwZQkE SmUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=PMLjaHX0yNu4Vt2+2+BRUy44Cz7XPGdIquySHnGbOJY=; b=M1uMhG1Txkr2ogaugxIoXuWJrVaQVKgri+3vsjtXyj5DRKWveVbfecDco7/SzT5QaH 1dED6xJWaqn0AT1yA3KBA+t6iAP2rhbVXHSGUud0qcSP1VRv95uNRszjMW6fxBi78k6L it5xAoy9aVcKDY/4JWUM7HzukI6n3hUGRd2lJ4VC46V0gMT24VPasXlNFP0iiCx0eDMx v8PINUS551L1+E8UEpHawXRCLwV87BV2lYCHC4yK7XEcBxWD/8r4tAJWl+7pCApxBJCv eGy9LolZnkZ8QvD6A6nYG5WTspx5sbFbjaCgPJmJHBVh0aJo9JBh/e8kqJwCS4e1DYI7 xSPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k5ZjMniA; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id n9si12479282edy.573.2021.05.09.23.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 May 2021 23:31:50 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k5ZjMniA; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 29BA982D34; Mon, 10 May 2021 08:31:49 +0200 (CEST) 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="k5ZjMniA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CADAA82EB8; Mon, 10 May 2021 08:31:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) (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 967CC82EC3 for ; Mon, 10 May 2021 08:31:43 +0200 (CEST) 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-pl1-x632.google.com with SMTP id h7so8635469plt.1 for ; Sun, 09 May 2021 23:31:43 -0700 (PDT) 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=PMLjaHX0yNu4Vt2+2+BRUy44Cz7XPGdIquySHnGbOJY=; b=k5ZjMniAhMyCAyeg8lSCaaN/qmOE8dAoLbC6WS4Iuy4cictsB+QrRpjCAnyMFXysTb O89zl+4CZZS379vp/qQSDtlaSiiZqCPjss/SDEZlbhDe2EP2yStIC/LVzRNQZ78b88K3 vbnTv6bxLxsvk/GJdQ6XjsD5yvHDEjx92qi3E7LO6xr2dSWbhbYBmQAjGLJMlsHjlTUh r//qFYkWcYEvg1W5z2mb6L1okT7aSrtypnFhdbwO8dnRj8tCvc4adRBC3c7xMCP6thSb SbJXaHwgEMo24A6Ud53DMT4vJT9HW/1N3xvp13OhSrG/3yO7EI5wQUDQXGe574pYaBcd 2Q1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=PMLjaHX0yNu4Vt2+2+BRUy44Cz7XPGdIquySHnGbOJY=; b=nRkvY5RD2BEa7R0FtzMsTCZhgGJvLExRRp2PhCPMEkTmpu7i26TAKgjBdWIbVYqku7 y0Z64yyqkGS5GwUOYsgSTOPIqeH5mrkLvKPu6d/yqOkGbt4dTLbzQahSbrTdki3/dzeA 6mRgiFKJgdyvgt7l9otmJuvMCTd/7qSvbpdxS7b8UPiEgYbmN2aaTLIzkCW9Ef8KjdLA URNNPDd0h1NzlVBPLyU7b+KFGdWBg1vAgOQZQCMZnWpS4D0F51GUAAo+hgJ+/BGMS/BV 8+Sc4GWHQPP9LP2+3ME6DTY/taJtR4jYFYEEBfayhd/7jfXezYV53pesUxagQGI6wdY2 +VGQ== X-Gm-Message-State: AOAM533BKqgcm+h/fwr+q5BGKd6HGiLqyNjp/oXZyekyxulVkFGikM+Y Ttc8112LINP5VzaXwrHxH5qtSQ== X-Received: by 2002:a17:90b:1d8f:: with SMTP id pf15mr25802114pjb.36.1620628302025; Sun, 09 May 2021 23:31:42 -0700 (PDT) Received: from localhost.localdomain (NE2965lan1.rev.em-net.ne.jp. [210.141.244.193]) by smtp.gmail.com with ESMTPSA id o140sm10219688pfd.65.2021.05.09.23.31.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 May 2021 23:31:41 -0700 (PDT) From: Masami Hiramatsu To: Peng Fan , Simon Glass , Tom Rini , Heinrich Schuchardt , Alexander Graf , Jagan Teki , Vignesh R , Joe Hershberger , Ramon Fried , Sughosh Ganu Cc: Masami Hiramatsu , Jassi Brar , Ilias Apalodimas , Masahisa Kojima , Takahiro Akashi , Tim Harvey , Bin Meng , u-boot@lists.denx.de Subject: [PATCH v3 04/14] efi: Fix to use null handle to create new handle for efi_fmp_raw Date: Mon, 10 May 2021 15:31:37 +0900 Message-Id: <162062829690.501222.2649388175245001703.stgit@localhost> X-Mailer: git-send-email 2.25.1 In-Reply-To: <162062825393.501222.13616174511857694530.stgit@localhost> References: <162062825393.501222.13616174511857694530.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.4 at phobos.denx.de X-Virus-Status: Clean When running the efidebug capsule disk-update command, the efi_fmp_raw protocol installation is failed with 2 (EFI_INVALID_PARAMETER) as below. This is because the code passes efi_root instaed of handle. => efidebug capsule disk-update EFI: Call: efi_install_multiple_protocol_interfaces( &handle, &efi_guid_firmware_management_protocol, &efi_fmp_fit, NULL) EFI: Entry efi_install_multiple_protocol_interfaces(00000000fbaf5988) EFI: Call: efi_install_protocol_interface( handle, protocol, EFI_NATIVE_INTERFACE, protocol_interface) EFI: Entry efi_install_protocol_interface(00000000fbaf5988, 86c77a67-0b97-4633-a187-49104d0685c7, 0, 00000000fbfa6ee8) EFI: new handle 00000000fbb37520 EFI: Exit: efi_install_protocol_interface: 0 EFI: 0 returned by efi_install_protocol_interface( handle, protocol, EFI_NATIVE_INTERFACE, protocol_interface) EFI: Exit: efi_install_multiple_protocol_interfaces: 0 EFI: 0 returned by efi_install_multiple_protocol_interfaces( &handle, &efi_guid_firmware_management_protocol, &efi_fmp_fit, NULL) EFI: Call: efi_install_multiple_protocol_interfaces( &efi_root, &efi_guid_firmware_management_protocol, &efi_fmp_raw, NULL) EFI: Entry efi_install_multiple_protocol_interfaces(00000000fbfec648) EFI: Call: efi_install_protocol_interface( handle, protocol, EFI_NATIVE_INTERFACE, protocol_interface) EFI: Entry efi_install_protocol_interface(00000000fbfec648, 86c77a67-0b97-4633-a187-49104d0685c7, 0, 00000000fbfa6f18) EFI: handle 00000000fbaf8520 EFI: Exit: efi_install_protocol_interface: 2 EFI: 2 returned by efi_install_protocol_interface( handle, protocol, EFI_NATIVE_INTERFACE, protocol_interface) EFI: Exit: efi_install_multiple_protocol_interfaces: 2 EFI: 2 returned by efi_install_multiple_protocol_interfaces( &efi_root, &efi_guid_firmware_management_protocol, &efi_fmp_raw, NULL) Command failed, result=1 To fix this issue, pass the handle variable as same as the efi_fmp_fit installation. Signed-off-by: Masami Hiramatsu --- 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 6ee883d5b1..f038245c93 100644 --- a/lib/efi_loader/efi_capsule.c +++ b/lib/efi_loader/efi_capsule.c @@ -949,7 +949,7 @@ efi_status_t __weak arch_efi_load_capsule_drivers(void) if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_RAW)) { handle = NULL; ret = EFI_CALL(efi_install_multiple_protocol_interfaces( - &efi_root, + &handle, &efi_guid_firmware_management_protocol, &efi_fmp_raw, NULL)); }