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 4EAC1C433F5 for ; Fri, 24 Dec 2021 05:49:26 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3A92083615; Fri, 24 Dec 2021 06:49:24 +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="u6m8uRhU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F0C018361E; Fri, 24 Dec 2021 06:49:22 +0100 (CET) Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) (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 DCCBD8350D for ; Fri, 24 Dec 2021 06:49:18 +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-io1-xd2a.google.com with SMTP id i14so8881927ioj.12 for ; Thu, 23 Dec 2021 21:49:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ah+V47/fCiKeSaCagss1OHnY0USIORZQKdTI3BQG6xM=; b=u6m8uRhUxmtD3anmUKLWjBP2kDK9vW7VtpVy+x8X772oNYwqeK2xf1o66wPnqWZTJG 5an7gT7cFQL8fnvlUa8x6/k0mTEpuBu/n5UpeONW3c3hp/fi5kJle2nDsXHbWwEjbeyI tn3Qy6ZPJGSCgRAkFhBdBvPF4czxWD4H1dTSWGY9Lb46t4+GDnKyVPHBXh6RKo8aGRTa h0ZA3X+nHj1CJpOxgK8T+mJqW9DIeOT4rchjS0a6qwPcHT8qpfsd+8dNAnMZmWbccHX8 UHgGGddiQeFvt65Ju3rT/YCDgST9JxwjXuFmd6UxMk/8tFMBKhvAZLTBDhxuWEinOctp iBBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ah+V47/fCiKeSaCagss1OHnY0USIORZQKdTI3BQG6xM=; b=BcvY7pwhGizMFpUs/xv67tGRkINyVUG5L0We8tPxlq+BbYirnW4nq8y4S6JZCwW0oB JLnb4Wv7TnJA4cbxbYOR+ehOUp4aBlzu/GifUGB/PK7GVLlMXx7WQwgfy4C5HFoIG5++ PycflM+mpIHMZFJyD6kbqm5MMfe7gkvfYUadcM2ChgVqauCBHoHX2UzZLVfTdPcnXDp5 /CD57R66pnEvKq0kc6W+Ihoq7PyHBuxepPI+vpPc+aA6SGKVOhEhFB1ly0TQbMdzH8ma I2xeGq8XQbscQZIKXj7mArMmT+V+N0DqrZPMRWy6zi4SgP8WjXwuAWDk4KF0n3+iumI2 ycMw== X-Gm-Message-State: AOAM533tDPsoV6eyXl0qSRCrEUO8jjq70Ta3NjMB4O4eF+TApn8D0Jbs udzj56v/4l0ZvkbYBvP30k/RVj8AvEkaXWrZ4Ehj0g== X-Google-Smtp-Source: ABdhPJxZOzudkoiTdce8cMb0+UAcMd9RVzkv3+PJArK3/4eVQ0obS0vLRq8EB7k/Hyo7m+XpUIQuMUzO6guMoPVS6CY= X-Received: by 2002:a05:6602:2c50:: with SMTP id x16mr2536465iov.114.1640324957358; Thu, 23 Dec 2021 21:49:17 -0800 (PST) MIME-Version: 1.0 References: <20211219070605.14894-1-sughosh.ganu@linaro.org> <20211219070605.14894-4-sughosh.ganu@linaro.org> In-Reply-To: <20211219070605.14894-4-sughosh.ganu@linaro.org> From: Masami Hiramatsu Date: Fri, 24 Dec 2021 14:49:05 +0900 Message-ID: Subject: Re: [RFC PATCH v2 3/8] FWU: stm32mp1: Add helper functions for accessing FWU metadata To: Sughosh Ganu Cc: u-boot@lists.denx.de, Patrick Delaunay , Patrice Chotard , Heinrich Schuchardt , Alexander Graf , AKASHI Takahiro , Simon Glass , Bin Meng , Ilias Apalodimas , Jose Marinho , Grant Likely , Jason Liu , Tom Rini , Etienne Carriere Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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.2 at phobos.denx.de X-Virus-Status: Clean () should Hi Sughosh and Ilias, I would like to confirm that what the plat_fill_gpt_partition_guids() should return. 2021=E5=B9=B412=E6=9C=8819=E6=97=A5(=E6=97=A5) 16:07 Sughosh Ganu : > +static int plat_fill_gpt_partition_guids(struct blk_desc *desc, > + efi_guid_t **part_guid_arr) > +{ > + int i, ret =3D 0; > + u32 part; > + struct dfu_entity *dfu; > + struct disk_partition info; > + efi_guid_t part_type_guid; > + int alt_num =3D dfu_get_alt_number(); > + > + dfu_init_env_entities(NULL, NULL); > + > + for (i =3D 0, part =3D 1; i < alt_num; i++) { > + dfu =3D dfu_get_entity(i); > + > + if (!dfu) > + continue; > + > + /* > + * Currently, Multi Bank update > + * feature is being supported > + * only on GPT partitioned > + * MMC/SD devices. > + */ > + if (dfu->dev_type !=3D DFU_DEV_MMC) > + continue; > + > + if (part_get_info(desc, part, &info)) { > + part++; > + continue; > + } > + > + uuid_str_to_bin(info.type_guid, part_type_guid.b, > + UUID_STR_FORMAT_GUID); > + guidcpy((*part_guid_arr + i), &part_type_guid); > + part++; > + } > + > + dfu_free_entities(); > + > + return ret; > +} So on this platform which uses GPT partition for each bank, it stores the GUID for each partition. I think this information will be shown in the ESRT, but not used for specifying capsule image_type_uuid. This is strange. Without this FWU multi-bank update, the array will only have the image_type UUID. Thus, user can use ESRT to confirm what UUID should be specified for the capsule file. (it has image-type UUID) (of course that is fixed value on one platform anyway) And when FWU multi-bank update is enabled, that changes to the partition GUIDs. But those GUIDs are NOT used when making the capsule file nor doing the update process, because we should not specify the bank index directly, right? We will set a unique image-type UUID on each image entry, and use it for making a capsule file, but the capsule file itself doesn't specify the banks. And acceptance/revert capsule file also doesn't specify it. Acceptance file will also uses image_type UUID, but not the partition UUID for the bank. Maybe I'm wrong, but I'm confusing. And this is important for the platform which doesn't use GPT. Thank you, --=20 Masami Hiramatsu