From patchwork Mon Jun 12 08:09:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 691622 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d91:0:0:0:0:0 with SMTP id b17csp16726wru; Mon, 12 Jun 2023 01:13:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4AAFWwSOLQgHO36jHpqeD8BzZCqOixd6pO+a2Nd8Qia49kbQmWxXwvAuC09q42ya38HwZM X-Received: by 2002:a05:6a00:1884:b0:64d:40e0:5580 with SMTP id x4-20020a056a00188400b0064d40e05580mr11607330pfh.3.1686557634495; Mon, 12 Jun 2023 01:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686557634; cv=none; d=google.com; s=arc-20160816; b=DAyq3JBBJ0GplaflgOm2IpqwMiH531WwFPS2b7GCjlGphjxCPY/qw47cMoGggKlBat rl4y/cmzeyLdPyFJqBDiA437OlvlJOPN84WeifCc9+uew0nf4P+9JMQ+SnmePMbkuzww lomYBGe9Y1MFnBC5NABjrKqr4S7xWgW3vdAMrSUwXLnzWHtxe1yUxyWC8DxLTHK5DP/0 LeMkEKFTV5RuQhJ0kDc7obP9h1sbwsHo+rBKuN4GFF6MHzt4AqKajRlfaQOxUdVxeyxf H8wZPunBAN0XrxBdoNE8fbbhCNUQhbQw+7plqNsx/SN7A/1XyplwiTyGFZ1HJhcD1iFu /L4Q== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=65FMNRHvXfBnRFwQV444VgyDPoRERLgrzU5KrsHA6mo=; b=D1yzjuO5GSFV9aKJMnKVJNET8C7THzzcsOrOye8x43tiF6a4Pv8i5AkpM7oiymXY3E WKKKbsDbrQ1KkJyr6sCQgdsNKVxNIfKeef3YxLQv4OOfZOcMzFu1eovmXCEDqHYio5N6 UB0qCgED/YbP78v62RM5kIg/DYavicv4fudVYWsxaUYRsu91WkTAGHTnn3H409v/Mw/r 0jEQsjWXctUyr383TADA5fgvimoPJDLNLPmXf1ygECwUf1WH2+s1xM6vtHOdi8F1QuUn 9QYiV++j1VGnwJyzIOTMP7jXlnSF2XXpbVnQ2p2L95kwCJaIlrthGbNByW1eMSXrWrQT EQtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OjvVq63+; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id x20-20020aa79574000000b0065a02d1d8f1si6470548pfq.379.2023.06.12.01.13.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 01:13:54 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OjvVq63+; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 1C87884780; Mon, 12 Jun 2023 10:13:34 +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="OjvVq63+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 120C2860BB; Mon, 12 Jun 2023 10:13:25 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (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 E8C6B85FD2 for ; Mon, 12 Jun 2023 10:13:21 +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=rui.silva@linaro.org Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-30fc6b513afso135993f8f.1 for ; Mon, 12 Jun 2023 01:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686557601; x=1689149601; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=65FMNRHvXfBnRFwQV444VgyDPoRERLgrzU5KrsHA6mo=; b=OjvVq63+EJh/OKLmSMlmM3Lla4uZ87mRXA9FenJOh/vLshOZUIRQIPaDbPLMFzBBtX nKmFM2izWXkTqp5B2OdDa8tA4/uxA8cHxCn6AwwYVjTmlaNSDgqg9oqkAnqkN8Bl+yhQ Y9kmarS/UXnPT2DzCbUWTrNn4LxKxUD/6/tuXleb4ujuV/igb245v5COlT1V/5oA7wtr UcPt32ZHPeBfCmqALunGGEqXXQiRdZfJVnRXQy/ICqrLTpiBPhOQXQFxp6kel9526F5o o3+AhwC8OId1d1+BIOqJ2OWIx9DFbQExSKjIPSiZI3xTpkI8461jb7b5jTf4waX+n3bF 8AlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686557601; x=1689149601; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=65FMNRHvXfBnRFwQV444VgyDPoRERLgrzU5KrsHA6mo=; b=BZwY/ZVNc46MCBvf94O4LuE/jD9O0RQQzpVDjVrTR8yucR96/0uGtL+UW9Xolr+ysa c8XlGiuwl6H7za/DjBdVEMRyH8e4udNFC+pyGfmCN1nYOMEnegN0MNGDRHeU6b+tS+aW 3vBBqiLbJRdKXa99yEwK95RRFHBkCYEBvyQ+hTlEreBKyFuVTrM88plaAojGW4d5zZmQ lSC77dHps4jjwJ9H3QaenVLnfnK0pEXo/vnNI5gJmVO6CF6FQt/XHKmBEu1kuzLV7R79 0s/iPToAN2ZsUzOEYhjPwhm6tVihoyS3VGOoVGOEXaDaNv/KVJg9BY/MsDc4sWLNC65+ 7dCw== X-Gm-Message-State: AC+VfDwkA+2YbdJAxpW5GpvNh8fPXrO8aISHxXSWaaj0T2DAuKS9vVIX 6PoMaGxqY2VBpPIeVNNpIAM+NHj0b5prQCCyiF4= X-Received: by 2002:a5d:5704:0:b0:30f:bc21:1ce4 with SMTP id a4-20020a5d5704000000b0030fbc211ce4mr2301633wrv.14.1686557601070; Mon, 12 Jun 2023 01:13:21 -0700 (PDT) Received: from arch-thunder.local (a109-49-33-111.cpe.netcabo.pt. [109.49.33.111]) by smtp.gmail.com with ESMTPSA id m9-20020a056000008900b0030ae499da59sm11637390wrx.111.2023.06.12.01.13.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 01:13:20 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH v3 1/6] fwu_metadata: make sure structures are packed Date: Mon, 12 Jun 2023 09:09:15 +0100 Message-ID: <20230612081314.723786-2-rui.silva@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230612081314.723786-1-rui.silva@linaro.org> References: <20230612081314.723786-1-rui.silva@linaro.org> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean The fwu metadata in the metadata partitions should/are packed to guarantee that the info is correct in all platforms. Also the size of them are used to calculate the crc32 and that is important to get it right. Signed-off-by: Rui Miguel Silva Reviewed-by: Ilias Apalodimas --- include/fwu_mdata.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/fwu_mdata.h b/include/fwu_mdata.h index 8fda4f4ac225..56189e2f40a9 100644 --- a/include/fwu_mdata.h +++ b/include/fwu_mdata.h @@ -6,6 +6,7 @@ #if !defined _FWU_MDATA_H_ #define _FWU_MDATA_H_ +#include #include /** @@ -22,7 +23,7 @@ struct fwu_image_bank_info { efi_guid_t image_uuid; uint32_t accepted; uint32_t reserved; -}; +} __packed; /** * struct fwu_image_entry - information for a particular type of image @@ -38,7 +39,7 @@ struct fwu_image_entry { efi_guid_t image_type_uuid; efi_guid_t location_uuid; struct fwu_image_bank_info img_bank_info[CONFIG_FWU_NUM_BANKS]; -}; +} __packed; /** * struct fwu_mdata - FWU metadata structure for multi-bank updates @@ -62,6 +63,6 @@ struct fwu_mdata { uint32_t previous_active_index; struct fwu_image_entry img_entry[CONFIG_FWU_NUM_IMAGES_PER_BANK]; -}; +} __packed; #endif /* _FWU_MDATA_H_ */ From patchwork Mon Jun 12 08:09:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 691623 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d91:0:0:0:0:0 with SMTP id b17csp16832wru; Mon, 12 Jun 2023 01:14:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4LzToAIPZURVTjuyqPD7pUn5jpqTBWSqeHUXtip0n9UujndVYTHCkaVzoWj3uOyBEQE6xq X-Received: by 2002:a05:6a20:d39a:b0:10b:2214:7ab1 with SMTP id iq26-20020a056a20d39a00b0010b22147ab1mr8215803pzb.18.1686557648500; Mon, 12 Jun 2023 01:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686557648; cv=none; d=google.com; s=arc-20160816; b=XdW+RpFK43gky6jWndGt1k/DBoHwCmggyH4mWjFTUnclCUHZ1z6b0hxHLOCG4ngjua vlVl3ccvJX0M3n0WrECS8B/HyO/Hg20xEGbZtZHdKjV09wo0i7k7CkEbXT45xQN1qBND AzD0AM4ENKcMxeKwrN5z1wYxJBx5ziel+whhhVLnzhtfz8tZkOYAcKTAw1VwMsfqZqNS o8qvICuBkmvhFpitKLNAXgaFZnS970Qa7cM2yhBuj08t5LfV7hXhPCMS/Gw/m8dX4tM/ IcIL38kbFJaXLyx2k+b+DE6mwhpGBWwuIFlAyrRXOZ788iPH5ITMDbEB453XdwvB0ziL lzvw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TwRQFVNgk5iYBZjiAyXKFcgSva9nP31u4rqCpTdVzK4=; b=C7AY0tovC6H+kVfH615NVQa2ACjT3SjuBo3g6rG+MRGS02OXnlNodn4gu2gPIKcSii OueNwBgwY/qzyD78CFF8taUoKnqGjVTFYRL4tRWA+i6BUhin//w+KZGDMMs++VYNVBSI YuQ8puFLb5rjuVQONpkWYp45j8qZ8k1s2pOMnUVZrlSheyRCVIoelTTQkJ567kOmyUcu UOcezGI1e1MmShWRuN+87Pgp7o44dFO41A1wFOjXXhfXwkfuCQ/Qnu/QKBmbvb0zsMJF DbU+224cC5vKGoZxnTvG8sc9zjNsayhpKIxWhDKMOauq/GvrTUtkHzOfbzvY4XAdU+0/ LYLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=euzavWnd; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id q27-20020a63751b000000b0053fc68bc1b6si3596320pgc.42.2023.06.12.01.14.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 01:14:08 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=euzavWnd; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 D61BA8613D; Mon, 12 Jun 2023 10:13:36 +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="euzavWnd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C953686140; Mon, 12 Jun 2023 10:13:27 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (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 B4B7084780 for ; Mon, 12 Jun 2023 10:13:23 +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=rui.silva@linaro.org Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4f642a24555so4700435e87.3 for ; Mon, 12 Jun 2023 01:13:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686557603; x=1689149603; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TwRQFVNgk5iYBZjiAyXKFcgSva9nP31u4rqCpTdVzK4=; b=euzavWndBfuo/Mwq2WJNkRy9pZom/R0L9Clm7mqIUZRPUhqpjMcKfb6KX78d72CrTC MBvhGyjc1NPdrpTuYXiRkCd8IsfTdjrGPYfgyxNwzZcR8SPXX1xwWrzJuB4py0N0flIL oi/DLjDKprLr0d8vJndp/SOc/8q84gsYpsAWgDVjRRXLhk0AtEqlbFL+XRvb1IKCtNTo llsDnI0aONEwzuoqErZ5+m4DR09xWg6XwAvz02QJtFmnZy0qadagZQc6t53iO3gAX7tp TQ76k08RxoaIFK9lW9SbDxcMVebkddPXDdDa68jUc2rCbZmc/b1VuJYDaiefw/7hi0QN 9jWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686557603; x=1689149603; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TwRQFVNgk5iYBZjiAyXKFcgSva9nP31u4rqCpTdVzK4=; b=hHVWKB9FxZwjQRCqfgnXI7I9Xc2isANOx2wv4Vm8+Xt8JoMh8C3fIoKg4kUEQLJYHL 7vz/pj9nI5FtJKtwzmTOBXu4fixECsDcLZqVreDjrJVqkgqb/yQo0S3rqMIbDX80P12i kl6WQ56dZJGjKDdCJCw8AQSHy4XnxtTuZoo4gJGoXS4izYIivkuWfHWaN5yxXO5Z2ppF hgNcTrpIkPWCU/JXP3TTYK07DOZX1d4g2FblG62VCjpyxKF1Mpj9PIW71+Ec7fn6mCuW bVSY1abgzCKJx/4AIgxi0paKMJvUwRke/qlvsA8ngrt4bRAw9QDobflCIWj6aVRQthap R8Lw== X-Gm-Message-State: AC+VfDynU0kpdgQK4QxoZzHqx8NOm8ZkOFXikZp5fSmRkbfvkHT+uXTC RQsqEDWK43DBHOfZXQX8CfR25p+95mU4UJ11xD0= X-Received: by 2002:a19:434c:0:b0:4f4:e744:2e71 with SMTP id m12-20020a19434c000000b004f4e7442e71mr3158885lfj.64.1686557602873; Mon, 12 Jun 2023 01:13:22 -0700 (PDT) Received: from arch-thunder.local (a109-49-33-111.cpe.netcabo.pt. [109.49.33.111]) by smtp.gmail.com with ESMTPSA id m9-20020a056000008900b0030ae499da59sm11637390wrx.111.2023.06.12.01.13.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 01:13:22 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH v3 2/6] nvmxip: move header to include Date: Mon, 12 Jun 2023 09:09:16 +0100 Message-ID: <20230612081314.723786-3-rui.silva@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230612081314.723786-1-rui.silva@linaro.org> References: <20230612081314.723786-1-rui.silva@linaro.org> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean Move header to include to allow external code to get the internal bdev structures to access block device operations. as at it, just add the UCLASS_NVMXIP string so we get the correct output in partitions listing. Signed-off-by: Rui Miguel Silva --- {drivers/mtd/nvmxip => include}/nvmxip.h | 0 test/dm/nvmxip.c | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename {drivers/mtd/nvmxip => include}/nvmxip.h (100%) diff --git a/drivers/mtd/nvmxip/nvmxip.h b/include/nvmxip.h similarity index 100% rename from drivers/mtd/nvmxip/nvmxip.h rename to include/nvmxip.h diff --git a/test/dm/nvmxip.c b/test/dm/nvmxip.c index e934748eb5d2..89bf481f6161 100644 --- a/test/dm/nvmxip.c +++ b/test/dm/nvmxip.c @@ -17,7 +17,7 @@ #include #include #include -#include "../../drivers/mtd/nvmxip/nvmxip.h" +#include /* NVMXIP devices described in the device tree */ #define SANDBOX_NVMXIP_DEVICES 2 From patchwork Mon Jun 12 08:09:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 691624 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d91:0:0:0:0:0 with SMTP id b17csp16908wru; Mon, 12 Jun 2023 01:14:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6W8Veqa2+pDxFrBisMwIjv/5/Yxhf67WkG1x/IfRPMgXLj5k+BYc/gHxV3O6IjwQt++nQD X-Received: by 2002:a17:903:22c9:b0:1ad:fcdc:2a9f with SMTP id y9-20020a17090322c900b001adfcdc2a9fmr5990888plg.51.1686557661749; Mon, 12 Jun 2023 01:14:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686557661; cv=none; d=google.com; s=arc-20160816; b=XLOoHOeALa5RzO5k0DmLPJL/fmJHN3rATHLSC2RmnU9rVAfanVbwZAlBuPK3pombWG KRvqFc2vppBfa3t4zJuzcyhX2y8JQoaGdlbeKg8LgmdsXjWkPOdKXP/d+W/72zQVR2x2 3Jk3fqlw9KcqpvGeunkTjpbirftPgm0EIzhEZswRxxz5HAoeWRi08YfnK7E9ri7rWLCS TkvGEVbgxpHcO91VMd+P2XeNkfzHcAHdgrxzDDP7mq2O+K7IR1NsdSraVcY0Wr0ahjfD jD3oS/FT2WpeaDpK00wq9Lsnmo55mR+2R8IHXEYnQnk43EcszsJdFPU3bc+Vn/bA7292 Eq2A== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FdIzyYY1XPhUXau8Tsr/xKuKS/q/o23vEd6unqtx3FA=; b=KJ0Vyc+VRlX7b6J5zBETDGLKmpYxGXytXIuNDY+A2plpwqAbPWa0YQVm+xSeZ8lerN txlz956qHh9c23YtDDlvuoCXVoWbfRySBKQdfr3ad9yP6GGOTg5wBHFnBjyXpV/JKuGP ToKWuM8dfeywaTLsqXeV1f6WT+j0/w342jeS3QUD5w5jgP9Nav+0xpbhfrXPqWFSoFr+ kUJ7vWYCOHqHcPYTzRUpZQLcKVfem7IsjUsYYm103U97fuINLHZQd1oZln7yMK/2cEuC Nnwslxq0x/ZlUJYsak3sS/6AVFRVtYPdNzOqxEXpCCW4+03WCBRIx+PtVDwo2SjYmu1E y3gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FSrMY6KG; 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 i14-20020a17090332ce00b001b3dc9f2a64si235786plr.69.2023.06.12.01.14.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 01:14:21 -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=FSrMY6KG; 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 273D786172; Mon, 12 Jun 2023 10:13:39 +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="FSrMY6KG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5D8AE84780; Mon, 12 Jun 2023 10:13:28 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (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 4C91D85FD2 for ; Mon, 12 Jun 2023 10:13:25 +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=rui.silva@linaro.org Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3f7368126a6so27237285e9.0 for ; Mon, 12 Jun 2023 01:13:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686557604; x=1689149604; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FdIzyYY1XPhUXau8Tsr/xKuKS/q/o23vEd6unqtx3FA=; b=FSrMY6KG4ZJ1nOYvwhvAQzQNgWXzuDjXfXaivVRu7MFYs/WlhD2yNHJxHgw1xf3qV5 ZAWUWfIGkjfzQgHHyefY/LURDn2O0KRpp7aTwd9rvB3KVoT8o6fiZ8Eh0MnNG8RPjzMM pmfWpMqVT1xpEIjRZHU/zt6b2uyU4xaQuU5RHT1e7D+BhxfmYauGS6DxLIsMPZQbJOEW l4kjqL9KJmjXuWL0l4Be0ZGOhUFNaNF/BzGvmkOdRftl9frIdUw3ik+09v+O4nM0xo1d 3GtrT7FJtGiA2G4Z1/DMRCH1ZqLwIcWOHv2FjuGJzqaOe+PShg0I7eSzkHfKpfU1hX/9 Fnmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686557604; x=1689149604; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FdIzyYY1XPhUXau8Tsr/xKuKS/q/o23vEd6unqtx3FA=; b=Xoh+n0i4lFo6XorcP9lc6EnSC8J9eavc2idDolMJba+WdCfQ30JMGz6RU3/lZLuyEf IiBgiLJEZ637SCmHVKkU5mv8OWsi5jPGBPFrT5MkHjE2CDxf+VzbuPdw/y7Lw+oSB+O0 hU2HqfUGbffWKsc7ucM+D5ZjpMyevDZyfhHe5BcOBnbUYnVcBMh9bOx7zHNwvUllqQfb ioaUUln8V+WAsWn++AaG3yLdm/Trce6Y8pSTR8TJantB/5ycw6KVMsjR69TgexMUkBuD EQri34egEHnXAw5kCxmzSHXW24uJSarw0fBF5GAMp5xaWedQJkPB6e+73rrWiC8hXTly dBjQ== X-Gm-Message-State: AC+VfDwCpSP6VwRExEOgcsmFJ65LekUaLkq0to+vnphp0hgTJdpNCiNs GOWCtYQZqmCHKUeQZnimO4lf2DOsdmLDUqH3ON8= X-Received: by 2002:a05:600c:2255:b0:3f8:11f6:69ff with SMTP id a21-20020a05600c225500b003f811f669ffmr3304420wmm.10.1686557604497; Mon, 12 Jun 2023 01:13:24 -0700 (PDT) Received: from arch-thunder.local (a109-49-33-111.cpe.netcabo.pt. [109.49.33.111]) by smtp.gmail.com with ESMTPSA id m9-20020a056000008900b0030ae499da59sm11637390wrx.111.2023.06.12.01.13.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 01:13:24 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH v3 3/6] corstone1000: add fwu-metadata store info Date: Mon, 12 Jun 2023 09:09:17 +0100 Message-ID: <20230612081314.723786-4-rui.silva@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230612081314.723786-1-rui.silva@linaro.org> References: <20230612081314.723786-1-rui.silva@linaro.org> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean Add fwu-mdata node and handle for the reference nvmxip-qspi. Signed-off-by: Rui Miguel Silva --- arch/arm/dts/corstone1000.dtsi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/dts/corstone1000.dtsi b/arch/arm/dts/corstone1000.dtsi index 533dfdf8e1ca..1e0ec075e4cd 100644 --- a/arch/arm/dts/corstone1000.dtsi +++ b/arch/arm/dts/corstone1000.dtsi @@ -38,7 +38,7 @@ reg = <0x88200000 0x77e00000>; }; - nvmxip-qspi@08000000 { + nvmxip: nvmxip-qspi@08000000 { compatible = "nvmxip,qspi"; reg = <0x08000000 0x2000000>; lba_shift = <9>; @@ -106,6 +106,11 @@ method = "smc"; }; + fwu-mdata { + compatible = "u-boot,fwu-mdata-gpt"; + fwu-mdata-store = <&nvmxip>; + }; + soc { compatible = "simple-bus"; #address-cells = <1>; From patchwork Mon Jun 12 08:09:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 691625 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d91:0:0:0:0:0 with SMTP id b17csp16994wru; Mon, 12 Jun 2023 01:14:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6kOsgk1JUN6u6UEktK8XPO9EvX1vwIq7LCziM9NJTGtwfzuQe10suubVfrqs34z+6HZq9q X-Received: by 2002:a05:6a20:3cab:b0:10b:7400:cef7 with SMTP id b43-20020a056a203cab00b0010b7400cef7mr10702691pzj.17.1686557675812; Mon, 12 Jun 2023 01:14:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686557675; cv=none; d=google.com; s=arc-20160816; b=nxkUFBHeZsSQCHS/qYfMkIX9HU/KLmdR/wZJNofXNZr1YMXmwnX3JLZRa7zlZbJUqP R9U2TUlinkt4NaM089wpQg0Jl/9uoDxdecyE91C5zryNntxrphcxkjbzKxMWrlXk09vc rUrnMbai71xCtzQdmvR29qxskKz92QUDVhsgLGa28c+IGapajvHRHb5RC4jC9Hygj2uU jAADyzfmlbHJRBfgExAkDKazINdYF3jASxl315yy7KDFSlOWjBkNg3/n6ykTx+P50sgs dficBRFZU4pjIkYVzEQKqUnSYElyxzSM2v/y6QzoTTacUobRsf0PHjpkP02V3uPw8xWQ 67fg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=k80/pMirkb2jWWuhd9T5GN+t3ZNRVU51/E4vwNeD9I8=; b=T+2BQKEiHrDbhGi9/VwWOT2TXKAkHaIQG40dCsWM0AgJWRTaw+t+H6bp86O0tDYUgE fUqzmD+14ai33aeCdCyCl2T6MGUhSorxjgzldoqbUnBWdMBKbm4psq8TyB2Dq2LniOJJ bx1GPrsrZXBtKoFm/4g9tNKOCQ0rW4iszcDAdjpOpXzoOCXCzKkLoHpubAYYVXcSLX5L Cp2LjWHAq46JaE3IjGZdvvs/PcOrJQKQO+K1HJoe/3dFimPKMwrmmCKr7Qrqyf6CA+Bo YssNm+Knjelw2Vmn6rhGjC1VSm5NgyUdFlnBnq6mwhvPrIkpQ4nD1NqhTf8xMzVGS4bv HGXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cIp5SR2d; 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 t12-20020a63954c000000b0053efcd20010si6524590pgn.423.2023.06.12.01.14.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 01:14:35 -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=cIp5SR2d; 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 2492786180; Mon, 12 Jun 2023 10:13: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=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="cIp5SR2d"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9672986068; Mon, 12 Jun 2023 10:13:32 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (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 3818D860BB for ; Mon, 12 Jun 2023 10:13:27 +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=rui.silva@linaro.org Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-30ad458f085so2857906f8f.0 for ; Mon, 12 Jun 2023 01:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686557606; x=1689149606; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=k80/pMirkb2jWWuhd9T5GN+t3ZNRVU51/E4vwNeD9I8=; b=cIp5SR2de0Z4+S7gSlYMVelqtHV6I8UtBOmIiHBgv4UlUH0AbZ11krx4iL6ywiDJ60 LDYAHVBpkKXCLZbpyB/mOimOKuIzfAKu2joW3inFzBt1+TOeXj/mx82k3ZmjxtRjQCEW 54yhfLfQiANqxrsUKtCMZhn7hbzWF6MgX1iBZIM+GjxeE1PGd5oqYTrBFuJD7A45q11G CTdwGwCYbOdWs5orUefQa8ktntF0us51kA0bIUwMQ195CuBc3zvKFV8s5hXnElF0AwPH +teLhOMZQOPW0ZE7NyAgisX6TvXruZTVFsH1eBeRAK+/qYj/NNd0pCi0xLufPmu2SIzB jenQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686557606; x=1689149606; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k80/pMirkb2jWWuhd9T5GN+t3ZNRVU51/E4vwNeD9I8=; b=V12C0GL00FYw9lETA7yuqlTSbLPM7wnUSDEZdu9SLqPySRm37WrgONAc7nPJweHr5f bkioRZies99JdX+PUCLCgtm99nLUipaeO6DGDn8oXXlOdLhA7Xb1hTal+paGyru9w+M4 2K3VARo+/nAuGjC/Ab/QMVuh8NUNDUzjXDxoEULDXY1NkBs0bhW630d8aXfTRA5fXQLa CLAcnBBqALS6/UE4UEl8Auh/UchmXinFyyzORyodOTzG3BtNOzoEQwNjlngXUae1uekD 6u0tX340qsOQ9VGoP76rA2Bj2lvaoAGbSBuv96sHsyh67evN3OrHE9pl8YnXXmwhZ7SE MCzA== X-Gm-Message-State: AC+VfDyun7GGvrphQDXS419CoQwlbYE8WgiPqmjMRZGEb9VysgQNPzL0 S/ByfPBTwhWvpb4Jw8BkEQD50TwzhVp3YH/cCIM= X-Received: by 2002:a5d:5267:0:b0:30a:f68f:9b94 with SMTP id l7-20020a5d5267000000b0030af68f9b94mr4420100wrc.21.1686557606415; Mon, 12 Jun 2023 01:13:26 -0700 (PDT) Received: from arch-thunder.local (a109-49-33-111.cpe.netcabo.pt. [109.49.33.111]) by smtp.gmail.com with ESMTPSA id m9-20020a056000008900b0030ae499da59sm11637390wrx.111.2023.06.12.01.13.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 01:13:26 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH v3 4/6] corstone1000: add boot index Date: Mon, 12 Jun 2023 09:09:18 +0100 Message-ID: <20230612081314.723786-5-rui.silva@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230612081314.723786-1-rui.silva@linaro.org> References: <20230612081314.723786-1-rui.silva@linaro.org> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean it is expected that the firmware that runs before u-boot somehow provide the information of the bank for now we will fetch the info from the metadata since the Secure enclave is the one responsible for this information. Signed-off-by: Rui Miguel Silva --- board/armltd/corstone1000/corstone1000.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/board/armltd/corstone1000/corstone1000.c b/board/armltd/corstone1000/corstone1000.c index 6ec8e6144fb4..1bead7a0a8b4 100644 --- a/board/armltd/corstone1000/corstone1000.c +++ b/board/armltd/corstone1000/corstone1000.c @@ -8,6 +8,8 @@ #include #include #include +#include +#include #include #include #include @@ -87,6 +89,20 @@ int dram_init_banksize(void) return 0; } -void reset_cpu(void) +void fwu_plat_get_bootidx(uint *boot_idx) { + int ret; + + /* + * in our platform, the Secure Enclave is the one who controls + * all the boot tries and status, so, every time we get here + * we know that the we are booting from the active index + */ + ret = fwu_get_active_index(boot_idx); + if (ret < 0) { + *boot_idx = CONFIG_FWU_NUM_BANKS; + log_err("corstone1000: failed to read active index\n"); + } + + return ret; } From patchwork Mon Jun 12 08:09:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 691626 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d91:0:0:0:0:0 with SMTP id b17csp17050wru; Mon, 12 Jun 2023 01:14:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ51qXc9GQ4kYetZ22gP7vQ8P2I5zQXsJsxYlQ9bxEUIhE6/CD7NDcyhzPt/tsHESqFZl2gE X-Received: by 2002:a05:6808:a1b:b0:39b:8121:4e35 with SMTP id n27-20020a0568080a1b00b0039b81214e35mr3244670oij.1.1686557689059; Mon, 12 Jun 2023 01:14:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686557689; cv=none; d=google.com; s=arc-20160816; b=GJQz37luoxI1kfTVQGPI7aIFmoak5lLO8Ki+P6BQRju4oO5Shq95bAwVlO1deaHL11 yX7iIWY9xwcXp9TdvTKJEnmtjRPHMnJReYhpkG4E46FC2ARj6hENIrXf2IxkJgbicZwi sQiIdido4q01r4ZWkqI3h63JAynnscDzOlsWJp0l1hDPGZBT53kJpyxfBqFeIWbYXgkY dJLMgcHFFYnZ8F+R3CixwqIqhBy1Td+A39QLi38kzIeLlqtxR6GZWlEW0JYZDs2plEN8 g4AZ3BZokHmgi5uusZSD8I8yQnCbn4MwraSOCPPK3JpugAuKTwCf5GMBfGrJo+37Bnqt oJzA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ovU0MGhzCzTnjcROWLwnyI2Ykpmd6U3TMNgjgLiSVjI=; b=TivUkzJ6wyfEB671J+Y7nO9x9pB3qGq9kwsFFUErFcI3X65r0gFw/tH/Hf30KT9yjp c570ewDoEIM9bsTy+qN/jDcWM6zMeV42EHKtnOGMyleuCBjFBhEZUit8zlNZNKjyzYZs IvvTjS2Dp5Csd8haXnws/dVnZuwSyVfXWwFhFIfZUZ18PN20+FL2zkq9WGcPoNjFdbfS r6ICvjF7hARAVeA1kRaufeBg4bJAP0dQeakN9RWUuG3Olb5aIL0aFUGm6QSmCn3/fNWv EIS/Mg523MbYvpp/jghM/Oq4KKXH1Nujj8ARvVaoyL4RBF6bNfgdwHLOT9eQ3uVBp6VL hafg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jm5xWvCa; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id d6-20020a17090ab30600b0024e1ae3fb36si8437234pjr.128.2023.06.12.01.14.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 01:14:49 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jm5xWvCa; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 E9588861A4; Mon, 12 Jun 2023 10:13: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="Jm5xWvCa"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 99F1B86020; Mon, 12 Jun 2023 10:13:34 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (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 042CF85C2B for ; Mon, 12 Jun 2023 10:13:29 +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=rui.silva@linaro.org Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-307d20548adso2669174f8f.0 for ; Mon, 12 Jun 2023 01:13:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686557608; x=1689149608; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ovU0MGhzCzTnjcROWLwnyI2Ykpmd6U3TMNgjgLiSVjI=; b=Jm5xWvCancICF8Zwz5GdICYC8De56CUefrWLmiqUm0SItDQf/AuTxP2EUanJTCv5M1 lCvXn9SBxWI6d4iTj7l4A6uStckZRNocqy2Yh+dIA6ic+uzdyPseRd2YP1pb7uhIZsDO Wa4YTwJZnbcZCudA+9lnMQT638wfMEfyvSbqI5eSG3AMjkpRmYlBR19FW7KNDL+6pznD yW5cKfw72KXc3oDxUiiNVijrTDLuhoObEadOZUPcB3J+Gsj07W4x1liJP4FKaCAp9pKk KpWvjRqXmsfSh4IbFdBeyc8Uy0p1OAEmh6WH+hKly/JfhmztrZzHbkIzOPBnnh9Ulyvh 4Dcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686557608; x=1689149608; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ovU0MGhzCzTnjcROWLwnyI2Ykpmd6U3TMNgjgLiSVjI=; b=YjACnofJN4DuswvPh4S5a4PZXkd8KGzYnQFsCcJKn2pjzICLelmARjqFmXOQxQd5gq ETmibIVIZGMDp5Rdepz9sd3iqTEGRCnl+vX9ayb03y7BZ/oI5O7SCngHdddKcv6lzHzd 14Hn6tyOQZ3XJBf+zeux1ayJ4/NjbpwEwVtil89UmtR5ZFyC0qe0gvGYKWS7sKTHg8Mn irB6SWQmbWGe8g2lIb2bRiPR8Pv9ouL2yY8UomUFCq/jsuTqhslwOK1Zvxl62veE2f8k rewSrAio+2BVsm5VT+1ZYDbUR9JXB+M6RaM8rICUDpU/hjQOV3rGR4aHkXhzXp3JmhNP mqqA== X-Gm-Message-State: AC+VfDzRrQMNbqETGNoM66PmTq2W0Zjh1N23jXHmOThRWQYfxPs+sZen oVx//zCAm0jlwC3M+NDtHeCPGewZVQqFb1fG0Hw= X-Received: by 2002:a5d:4ac7:0:b0:307:88ba:c999 with SMTP id y7-20020a5d4ac7000000b0030788bac999mr4163329wrs.62.1686557608134; Mon, 12 Jun 2023 01:13:28 -0700 (PDT) Received: from arch-thunder.local (a109-49-33-111.cpe.netcabo.pt. [109.49.33.111]) by smtp.gmail.com with ESMTPSA id m9-20020a056000008900b0030ae499da59sm11637390wrx.111.2023.06.12.01.13.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 01:13:27 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH v3 5/6] corstone1000: set kernel_addr based on boot_idx Date: Mon, 12 Jun 2023 09:09:19 +0100 Message-ID: <20230612081314.723786-6-rui.silva@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230612081314.723786-1-rui.silva@linaro.org> References: <20230612081314.723786-1-rui.silva@linaro.org> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean We need to distinguish between boot banks and from which partition to load the kernel+initramfs to memory. For that, fetch the boot index, fetch the correspondent partition, calculate the correct kernel address and then set the env variable kernel_addr with that value. Signed-off-by: Rui Miguel Silva --- board/armltd/corstone1000/corstone1000.c | 56 +++++++++++++++++++++++- configs/corstone1000_defconfig | 1 + 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/board/armltd/corstone1000/corstone1000.c b/board/armltd/corstone1000/corstone1000.c index 1bead7a0a8b4..a4567449f1be 100644 --- a/board/armltd/corstone1000/corstone1000.c +++ b/board/armltd/corstone1000/corstone1000.c @@ -5,16 +5,24 @@ * Rui Miguel Silva */ +#include #include #include #include #include -#include #include +#include +#include #include #include #include +#define CORSTONE1000_KERNEL_PARTS 2 +#define CORSTONE1000_KERNEL_PRIMARY "kernel_primary" +#define CORSTONE1000_KERNEL_SECONDARY "kernel_secondary" + +static int corstone1000_boot_idx; + static struct mm_region corstone1000_mem_map[] = { { /* CVM */ @@ -103,6 +111,52 @@ void fwu_plat_get_bootidx(uint *boot_idx) *boot_idx = CONFIG_FWU_NUM_BANKS; log_err("corstone1000: failed to read active index\n"); } +} + +int board_late_init(void) +{ + struct disk_partition part_info; + struct udevice *dev, *bdev; + struct nvmxip_plat *plat; + struct blk_desc *desc; + int ret; + + ret = uclass_first_device_err(UCLASS_NVMXIP, &dev); + if (ret < 0) { + log_err("Cannot find kernel device\n"); + return ret; + } + + plat = dev_get_plat(dev); + device_find_first_child(dev, &bdev); + desc = dev_get_uclass_plat(bdev); + ret = fwu_get_active_index(&corstone1000_boot_idx); + if (ret < 0) { + log_err("corstone1000: failed to read boot index\n"); + return ret; + } + + if (!corstone1000_boot_idx) + ret = part_get_info_by_name(desc, CORSTONE1000_KERNEL_PRIMARY, + &part_info); + else + ret = part_get_info_by_name(desc, CORSTONE1000_KERNEL_SECONDARY, + &part_info); + + if (ret < 0) { + log_err("failed to fetch kernel partition index: %d\n", + corstone1000_boot_idx); + return ret; + } + + ret = 0; + + ret |= env_set_hex("kernel_addr", plat->phys_base + + (part_info.start * part_info.blksz)); + ret |= env_set_hex("kernel_size", part_info.size * part_info.blksz); + + if (ret < 0) + log_err("failed to setup kernel addr and size\n"); return ret; } diff --git a/configs/corstone1000_defconfig b/configs/corstone1000_defconfig index 2d391048cd67..5be5335bdfc1 100644 --- a/configs/corstone1000_defconfig +++ b/configs/corstone1000_defconfig @@ -20,6 +20,7 @@ CONFIG_CONSOLE_RECORD=y CONFIG_LOGLEVEL=7 # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_BOARD_LATE_INIT=y CONFIG_SYS_MAXARGS=64 CONFIG_SYS_CBSIZE=512 # CONFIG_CMD_CONSOLE is not set From patchwork Mon Jun 12 08:09:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 691627 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d91:0:0:0:0:0 with SMTP id b17csp17132wru; Mon, 12 Jun 2023 01:15:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6V1V8qvQRlm0O48w/rqGmNB9OoA8ptzPGNfCM4nlmaWcLxBOmigey8VBOVKT95fKHASYC1 X-Received: by 2002:a05:6a20:43ac:b0:10c:6dbc:2806 with SMTP id i44-20020a056a2043ac00b0010c6dbc2806mr8505224pzl.46.1686557703573; Mon, 12 Jun 2023 01:15:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686557703; cv=none; d=google.com; s=arc-20160816; b=1BrIgU8W2TbdiwxEs/mb4Brl7R+7CRCxjjQUakgGh8TIWsgbhhlVVryE6LdOu8mmdz sIG5WmGjYjAyppKtg4beszVFqbUlwpCfFAEzMwMd7r7veqjrCgi0HuAwwVj9ejnFqVR0 0UH05GrIk0yM1A727HaNO1lnKMfBjVGG1Q4TmYg3X8rc92gbcCPmTriV34Bbm9YF0rv6 36VWI5EIpaK8aGLpCzfgmcEyrbm9/OKFIL7LOcGAKi+xy4MiPb4OjkvTnBgrtew7od0K zltXsa1Sw3FkI3dwokB3C4XrLtudL5SX4WaOm7hcCjpbFMz2FpdeiFO2JuJzUkggKHKl LbsA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bumfp8O7XAdHeMTkY7Md+UNfLCPBaWNtgU9uikTvGtk=; b=k5zuGZYWtx4dmn9uDz8qnb796/e84AU6HfWILR21XoR3sWUoqtePg1FfpQBoY1WirH OQ+CW6Epz/YFfmAHrQnbc3KJEhoJqhxKvnWYX7dTaUq+heBh7Z+Zs+zKKMyXFXLdiJrP iS0kexvqT1AXP+SFp32DGSOiACnr2eGtrspN7/6gW81ynnB0TUWRI5IIN5QMdT7wpWNv 6YbMfmkhC12TPo7208xO6IYIiCYG8U6PndWqdmUECyacP8p8AUGCGGXkbVLykTwJuwNP oHyeKQE3hHTEtx+b5U4qGOGnzBRVGTF5yoQM3cYztMkM9VwGpGikv3vjRPodONqEIAgP iOvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xZTSgAwA; 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 w30-20020a63935e000000b005401008809bsi3862121pgm.752.2023.06.12.01.15.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 01:15:03 -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=xZTSgAwA; 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 EC95686199; Mon, 12 Jun 2023 10:13:54 +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="xZTSgAwA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A76D885FD2; Mon, 12 Jun 2023 10:13:35 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (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 C04F186172 for ; Mon, 12 Jun 2023 10:13:30 +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=rui.silva@linaro.org Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-30e56fc9fd2so3841755f8f.0 for ; Mon, 12 Jun 2023 01:13:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686557610; x=1689149610; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bumfp8O7XAdHeMTkY7Md+UNfLCPBaWNtgU9uikTvGtk=; b=xZTSgAwAbU6FE63/0+w87AeMtnMW/DubNf2wQinYAN/OLLlP9ih/d3rmlPfmGBfk8I cGo9nWShKsvBmbp7gnoCU0Hr2Wvc9O67nOumqcRCSE+5uCdLGLCY449RfFFtAH4fA7+m 2nD0Wk7hEpxA7HWBRGSW8V1NLnSApail2IY830ol+94ejQrDRXqH1YiaiuobTVpWtk5P fEdeFB3fCRz+fCOvEnt5CGjDp9lj2ptlUqkDXUwNS2g7KvoQ3t2Q8SR+VHsyoYkiUcn5 XRhSVHlQ2r6dNT2ZVIDIovF0tVgkEmU2CJZGa+A75d/gp0LNv4EdvAhLimAUsyKF+hZV O06Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686557610; x=1689149610; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bumfp8O7XAdHeMTkY7Md+UNfLCPBaWNtgU9uikTvGtk=; b=KS4eNDv4bNhh2L0jxXGe4xTDTA+hna1xFUXUz0sUWQjkJxHltk27YCbn6gb9QhyIKy XRS3pwiBczdYsWFR2HI7rUbpNYAKtk0+1EtChzLkhUTupvFTQiQGXkmKWchQEZUkT4No Ne9HQQ8T1HLsl9oEhdvoxsP+RRlk4HPjsS2BSLSOsa+dHw9FKuCmcKEgoLAGvbD8+ntP 0mJDoOfs2GjQWuMsXF5hD2We1vmiH88Sy3/8b0MCi5LncZaimrGPuqYCl0749vKfezOY 7mDDw3W7j46EiF3i4obEibvzHDxO9glvrq2roE0Br4FlPhnVJLg9acsaDS9lKTAGyT6m 3uig== X-Gm-Message-State: AC+VfDxC2IX1QdzmWSXxV4ZWH8nS6OYchBd2XQazUrFo6hy4FV8pQYlX cZdL1W3e6c9MUJ4D1UB/h4PZCPhdk+r5H0OS1Iw= X-Received: by 2002:a5d:44d2:0:b0:30f:c012:b529 with SMTP id z18-20020a5d44d2000000b0030fc012b529mr2147510wrr.56.1686557610053; Mon, 12 Jun 2023 01:13:30 -0700 (PDT) Received: from arch-thunder.local (a109-49-33-111.cpe.netcabo.pt. [109.49.33.111]) by smtp.gmail.com with ESMTPSA id m9-20020a056000008900b0030ae499da59sm11637390wrx.111.2023.06.12.01.13.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 01:13:29 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH v3 6/6] corstone1000: add nvmxip, fwu-mdata and gpt options Date: Mon, 12 Jun 2023 09:09:20 +0100 Message-ID: <20230612081314.723786-7-rui.silva@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230612081314.723786-1-rui.silva@linaro.org> References: <20230612081314.723786-1-rui.silva@linaro.org> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean Enable the newest features: nvmxip, fwu-metadata and gpt. Commands to print the partition info, gpt info and fwu metadata will be available. Adjust also env boot script the address of the bootbank with the new gpt layout, and also remove the not needed kernel address bank0 and bank1 and retrieve function that would test the bank flag before and now we are getting the info from the fwu metadata. Signed-off-by: Rui Miguel Silva --- board/armltd/corstone1000/corstone1000.c | 1 + board/armltd/corstone1000/corstone1000.env | 10 +--------- configs/corstone1000_defconfig | 13 ++++++++++++- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/board/armltd/corstone1000/corstone1000.c b/board/armltd/corstone1000/corstone1000.c index a4567449f1be..01c80aaf9d77 100644 --- a/board/armltd/corstone1000/corstone1000.c +++ b/board/armltd/corstone1000/corstone1000.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/armltd/corstone1000/corstone1000.env b/board/armltd/corstone1000/corstone1000.env index b24ff07fc6bd..ee318b1b1c30 100644 --- a/board/armltd/corstone1000/corstone1000.env +++ b/board/armltd/corstone1000/corstone1000.env @@ -1,13 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0+ */ usb_pgood_delay=250 -boot_bank_flag=0x08002000 -kernel_addr_bank_0=0x083EE000 -kernel_addr_bank_1=0x0936E000 -retrieve_kernel_load_addr= - if itest.l *${boot_bank_flag} == 0; then - setenv kernel_addr $kernel_addr_bank_0; - else - setenv kernel_addr $kernel_addr_bank_1; - fi; +boot_bank_flag=0x08005006 kernel_addr_r=0x88200000 diff --git a/configs/corstone1000_defconfig b/configs/corstone1000_defconfig index 5be5335bdfc1..a8a79fd10568 100644 --- a/configs/corstone1000_defconfig +++ b/configs/corstone1000_defconfig @@ -15,7 +15,7 @@ CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyAMA0 loglevel=9 ip=dhcp earlyprintk" -CONFIG_BOOTCOMMAND="run retrieve_kernel_load_addr; echo Loading kernel from $kernel_addr to memory ... ; loadm $kernel_addr $kernel_addr_r 0xc00000; usb start; usb reset; run distro_bootcmd; bootefi $kernel_addr_r $fdtcontroladdr;" +CONFIG_BOOTCOMMAND="echo Loading kernel from $kernel_addr to memory ... ; loadm $kernel_addr $kernel_addr_r 0xc00000; usb start; usb reset; run distro_bootcmd; bootefi $kernel_addr_r $fdtcontroladdr;" CONFIG_CONSOLE_RECORD=y CONFIG_LOGLEVEL=7 # CONFIG_DISPLAY_CPUINFO is not set @@ -24,11 +24,16 @@ CONFIG_BOARD_LATE_INIT=y CONFIG_SYS_MAXARGS=64 CONFIG_SYS_CBSIZE=512 # CONFIG_CMD_CONSOLE is not set +CONFIG_CMD_FWU_METADATA=y CONFIG_CMD_BOOTZ=y CONFIG_SYS_BOOTM_LEN=0x800000 # CONFIG_CMD_XIMG is not set +CONFIG_CMD_NVMXIP=y +CONFIG_CMD_GPT=y +# CONFIG_RANDOM_UUID is not set CONFIG_CMD_LOADM=y # CONFIG_CMD_LOADS is not set +CONFIG_CMD_MMC=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set # CONFIG_CMD_NFS is not set @@ -40,6 +45,8 @@ CONFIG_OF_CONTROL=y CONFIG_VERSION_VARIABLE=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_REGMAP=y +CONFIG_FWU_MDATA=y +CONFIG_FWU_MDATA_GPT_BLK=y CONFIG_MISC=y # CONFIG_MMC is not set CONFIG_NVMXIP_QSPI=y @@ -51,6 +58,10 @@ CONFIG_RAM=y CONFIG_DM_RTC=y CONFIG_RTC_EMULATION=y CONFIG_DM_SERIAL=y +CONFIG_SYSRESET=y CONFIG_USB=y CONFIG_USB_ISP1760=y +CONFIG_EFI_CAPSULE_ON_DISK=y +CONFIG_EFI_IGNORE_OSINDICATIONS=y +CONFIG_FWU_MULTI_BANK_UPDATE=y CONFIG_ERRNO_STR=y