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 C7860C433F5 for ; Sat, 29 Jan 2022 21:28:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 15AE08169D; Sat, 29 Jan 2022 22:28:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com 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=canonical.com header.i=@canonical.com header.b="dWZ7BkpC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EBA398192A; Sat, 29 Jan 2022 22:28:16 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6033D80D1C for ; Sat, 29 Jan 2022 22:28:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heinrich.schuchardt@canonical.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 7012D3F1C6 for ; Sat, 29 Jan 2022 21:28:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1643491691; bh=Ddzqxt326tAsNQ2ZauNwZvIu9E2RJzRxkR+Ayq/aV5o=; h=Message-ID:Date:MIME-Version:From:To:Cc:Subject:Content-Type; b=dWZ7BkpCiWzsMlvx1OkXItruDjq+K32tz6kYdpAf8q7SQuA1gjXdwCIBfjNp4b67f wyy0pJP4Ig656QwMjsIp68Vrle1e2sr9jx/R4PPxrti1dVMXr+y22YAEEJwsNxqY1r qxtTAHdKlx1ZVy3+ghjE/XQTE9uQ0qbSB+Ui8XiA8pP+ElWwEOLdDQF25Csu30tCjL dTrGCC/Q/Vk6TZUsYM9KBR0pUoSnNMeuco6ractLazAOx0c7aHI4DSSDp7cAHHW4Rj XT++QP29xtANCkLhBexE+LioOLbuHG80h9SQEXxWnd/oc4dMfox3oFfDQmELIMs/Kn 7EmoL+UgUMp6A== Received: by mail-ed1-f72.google.com with SMTP id en7-20020a056402528700b00404aba0a6ffso4870788edb.5 for ; Sat, 29 Jan 2022 13:28:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:from:to:cc:subject:content-transfer-encoding; bh=Ddzqxt326tAsNQ2ZauNwZvIu9E2RJzRxkR+Ayq/aV5o=; b=5/QFFh8RQk8cZvW34i7mXNJLGpWZiKm7kv7O3fgitMzYVZ6R/eRKR7AWyFpaYduRBZ qnp0zib8TcnJWy7qFfzMH+czGSC5u+6EcEgc+sS9tj4xAjaGMZZQv81aNJWgkQg9GC7W 8mYvj/81F+PwKcQZvW33c3tOmhcZ0Ud2JVBmtsf0ofR5Zjqcku41fkBvLlFp/yisdPZM 98K5ZYMi723c9mD2AheBEDIC0INaVQ5UMbTU2ZELnvT28TaURx1a8agflxAEunB9+66x mk87v6t7/7Ahfacjde3U461SB/BChpJDiLPDcdr5gnoIGkmP3mUYYTJRmf23O10hwmy3 dNJw== X-Gm-Message-State: AOAM533Z0+telRf+q6wx8BxQy68M8PK5yNSJCSyn/z2oDAYSAv8/xR6Q OxK+WNImqFaz/ZpCIsHEKpjwrB4WnlAh138qqCXPTD1iB+Ws5d0xrdsrL9OoRBgBQ1EoXwKQCN6 X/kog+v3/nvAVsmLxexpbOS6u+ZC6xCo= X-Received: by 2002:a17:906:99c2:: with SMTP id s2mr11292925ejn.635.1643491690999; Sat, 29 Jan 2022 13:28:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJyRd0qUO2BdOkLF0W7wLr/8Nx3Q5gMTb09j75OKVIS132ktdJ+QWX9v6OJcYWN8kT/GtvYHfw== X-Received: by 2002:a17:906:99c2:: with SMTP id s2mr11292916ejn.635.1643491690797; Sat, 29 Jan 2022 13:28:10 -0800 (PST) Received: from [192.168.123.94] (ip-088-152-144-107.um26.pools.vodafone-ip.de. [88.152.144.107]) by smtp.gmail.com with ESMTPSA id fh23sm11597649ejc.176.2022.01.29.13.28.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 Jan 2022 13:28:10 -0800 (PST) Message-ID: <895061cc-734c-e17a-f693-e22f7f5fb798@canonical.com> Date: Sat, 29 Jan 2022 22:28:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Content-Language: en-US From: Heinrich Schuchardt To: U-Boot Mailing List Cc: Sughosh Ganu , Ilias Apalodimas , Jose Marinho Subject: [BUG] efi_loader: ESRT table not correctly built Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 Function efi_esrt_populate() is used to populate the ESRT table. If one of the FMP protocols malfunctions when calling GetImageInfo(), e.g because the dfu environment variables are not set, we should still add all other FMP protocols to the ESRT table, e.g the one added in the ESRT unit test. The sequence of operation in efi_esrt_populate() should be changed: 1) get the number of FMP protocols from LocateHandleBuffer 2) a) allocate an ESRT that is big enough b) set FwResourceCountMax. 3) iterate over the FMP protocols For each valid FMP protocol: a) increase FwResourceCount b) add the info block. Best regards Heinrich