From patchwork Mon May 29 14:02:24 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: 686704 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp250339wru; Mon, 29 May 2023 07:03:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5F7yekUG7F/EHUB0uTULvxS/cmxFAnx6UUoQ251cEJIRk2bNI0wkavF6p+T6T7p2Yyrkzf X-Received: by 2002:a17:903:1250:b0:1ab:723:1acc with SMTP id u16-20020a170903125000b001ab07231accmr13141760plh.35.1685368979931; Mon, 29 May 2023 07:02:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685368979; cv=none; d=google.com; s=arc-20160816; b=HMbMiobjCFPfUipqrFWGV4GhcypsaIZikTZtFmuN5rB9kHtieGGOMMz5ybshLgrlT4 y7HbSUFGnNZMhoP2PQZYeqH5EKdnZ7BGVqXqsP6F+r6YbGnK8op8zpU97sBwy+2zIu67 HjWWU0tWB38V1I5hBDDMWEXTe5m7tuDkrtxUj+sbQ4ND/iTCeksazMGUu8RX6wfDSp5J McVbyaK7SMeqhoOAhteNoyzK8aglgeSNvA3Hy7+5fPdMGMzFYwRET1/xAHe8jXGr5kjp 0zOCrTAxF4ReMrq2P0BdOJEjx7fhPP1kRT7e+H8c84FY+zx8KXOFDxRWfK1uZgAmhbRF 5Ykw== 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=nbh7PmhEYBIwOQyUkpV/fcwlIjJ1wiXnFCun1L3U3Mk=; b=qmWbW5PIGFxQ+rLZiR6eiKZqexzE2zzQ5Z4HDxZJ741jLzpNIisbyckOlutdf7zWFp OvogLavwhFICM45VXLgw9Zm1xcJPVUQW5Op7a9Iv6j6pUQ9rNy8LhmVm9hxyUtnPFfxJ a/A3vO5IrE+pGEyz4tQDFJUQ71fySso/mGZigUaJydT8Lz19X03IMvjIRMDNxp4w/dXE J5Yp1weJ+aB0qc8TMS9AjQZfwgJMfKeQ0ucP/02x3fjUuZ4HvIzzDsKis/ppw9+A47iq OnbltBhLM3tSv1IKsAmA2Cit1h1nkxu094T9i76f8nhOwq7IE4H1VQYL4TsZ34hdxulL bB4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dIufOCoz; 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 o21-20020a170902779500b001a197aa18fesi9274831pll.121.2023.05.29.07.02.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 07:02:59 -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=dIufOCoz; 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 9A25885BFB; Mon, 29 May 2023 16:02:41 +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="dIufOCoz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3ADA985B8A; Mon, 29 May 2023 16:02:38 +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 DEE4784791 for ; Mon, 29 May 2023 16:02:35 +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-3f6e68cc738so21970315e9.1 for ; Mon, 29 May 2023 07:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685368955; x=1687960955; 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=nbh7PmhEYBIwOQyUkpV/fcwlIjJ1wiXnFCun1L3U3Mk=; b=dIufOCoz4efpdLLtDS0cdG22OlU/H4eKga8gZ9SkkZsH6iDap0NAzModJoBOIDhYgb aDCGhwMVDKDChFAosn/Cos1lLXtMvBAZOTPK0ljC7TAWZmd2bnlsgkJfzQ6tWRijp/qP lD7aaowA0Q6LNJ/5Lv9WC3dynCwk+RQiqfY887G3io+Qs8CTG3eq8K0hPYD4RXEvBHtQ KGRN9p23XES0pCad6s9LNS/UHlypOmoS856JvLKkGaEMZ/SeqJcsjNdi1cuiFLxfoA29 uBkfFnqHECwvq1R83rZFkyQzKQsrgGV3eQd4SK0wTI5b/+g9vw2Lr6i/5pqszC4cIwFk fzAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685368955; x=1687960955; 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=nbh7PmhEYBIwOQyUkpV/fcwlIjJ1wiXnFCun1L3U3Mk=; b=aizP9cdzZhN9ByKo/2MRFSi6iv9OErTSqp9HAIDLP9KCRMIG9SLkXSfnLGcuQQHmpA 7w+0WtIz+VrdNUbuA+01P68JagUcrtLrYV7YbMspeAxl9ajGVlG4RyyYZFVEn2i8zqtY h2Tkd4e7nhCsp87zPQFcB1/SDHeaQuxsJHwkFiGhaaNlNE663TezJn6uxmj9om40YEo0 N00h2KAhkEKIyISC61oa4fn/wJo09rPa4+lW951uHMihOo66j1RkmemHW6geWR86IwlQ bIa+JIeFGvOpE6cwLTV9/vPDufPL8mAU3+f/jhhYwt0H+o1ZWPh2F2081ORzqeNjrWaB 3iWA== X-Gm-Message-State: AC+VfDwAsjaCaW7eeViNUZqYOcT2P1d/s3XR3+lK1DcWXvGNco3otC36 8dAN/xawBeBu2k74dH4iF9ediifnsNCJ8IIAEAY= X-Received: by 2002:adf:e8cc:0:b0:309:419b:925d with SMTP id k12-20020adfe8cc000000b00309419b925dmr9233074wrn.70.1685368955150; Mon, 29 May 2023 07:02:35 -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 w12-20020a5d544c000000b002fed865c55esm54123wrv.56.2023.05.29.07.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 07:02:34 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH v2 1/6] fwu_metadata: make sure structures are packed Date: Mon, 29 May 2023 15:02:24 +0100 Message-Id: <20230529140229.3225090-2-rui.silva@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230529140229.3225090-1-rui.silva@linaro.org> References: <20230529140229.3225090-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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/fwu_mdata.h b/include/fwu_mdata.h index 8fda4f4ac225..c61221a91735 100644 --- a/include/fwu_mdata.h +++ b/include/fwu_mdata.h @@ -22,7 +22,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 +38,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 +62,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 May 29 14:02:25 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: 686705 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp250521wru; Mon, 29 May 2023 07:03:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ52Jb9EJL7DREvHJpwckUjwKAureIzhHJoqFrwefyDVNeQ46wi5VBW69SNwa8GpkaOO4Ocf X-Received: by 2002:a05:6a00:1253:b0:644:8172:3ea9 with SMTP id u19-20020a056a00125300b0064481723ea9mr13882445pfi.15.1685368992841; Mon, 29 May 2023 07:03:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685368992; cv=none; d=google.com; s=arc-20160816; b=EffCT8oIAfNFANOpPv4Y/REK+hEME+Pe/6ImLm3F6d9NTbOoY5ty/9puJt//K4yt0Q 6XeCFNkg3jQF2cba47mdxW8GwY341XhS1J5b8AivtuKDq6M8Do3gmtLDofT3x0kDio0Y CHtnf0ptBJcZGOyZFyT0tWNFfBw2nFt0XykkWfCgAi+WQhW67oOalP9W/lKiwlcvknfL 7+qxcNo7Q6FrM4rhX6cVbkCtxaGTzAYPUaeqkuVNvoVkkbEQhudPX86rBcasquAuvOKk 8juupg6wi8xJWGdbugSPt9qNpStPQXBB2m2CW/ELPHNKli5yS+FRicwpt7se7q4ckah7 kspQ== 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=FPOQGHiCz3OOpAUkkuFUZeBt42qUzIfdRX0FJPhLxfo=; b=wa2FnHJ35hMfZcXNDrmartXxTIp/UvPSIQkVRYqC+HwEn43BpWz8MZkOquS6AuGkSI SjPSPBr0cUKi83nj40Zwv4wCmemUgxQ+MMIxBvzjIHcu+rJq+PqpJQ8KB1NnLpcqVq8b ZyeVPt9nLxhGvaEdF7TEIIGyJHzdyOQ2kasusR7QFENVmyQj20Ty9qym08yV0UiCJIEE 2Lg3FjRzNEi7fBzKMZOBjpJRTw1uwE1qeUktHSXbmO0MwYCCQQlOWSrmR/r8Naf2W12D nAFhjK18ieyMRRIJrZG3XCj1ScCR9w0yZekhjE6a33MXFu8S9B0yEH+2adkq9+/oCVo4 4NqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OmOrLhuc; 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 w4-20020a656944000000b0053f287c32besi9391661pgq.206.2023.05.29.07.03.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 07:03:12 -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=OmOrLhuc; 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 B896D85C77; Mon, 29 May 2023 16:02:44 +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="OmOrLhuc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 135A085BFB; Mon, 29 May 2023 16:02:40 +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-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) (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 A7B2C8215F for ; Mon, 29 May 2023 16:02:37 +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-x42c.google.com with SMTP id ffacd0b85a97d-307d20548adso1962060f8f.0 for ; Mon, 29 May 2023 07:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685368957; x=1687960957; 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=FPOQGHiCz3OOpAUkkuFUZeBt42qUzIfdRX0FJPhLxfo=; b=OmOrLhucw/MlWBnQlk1PdKHtvBP+JHWJi6zr2uXhsFf2zAXsCZ93y2DSkUyGSU7zTg Ap3AnQB/T6SfL1eUDyYPYgvebl4GiOrTtC9whOEdOBGVlrj4U7Znb0MXUico2+jdfXw1 do6bvXivHWej2YxlOnI3zAPpKKYlCCzaxuPKAEUuLtZz1uJNTckI1K5uZ7VPAIYd/fxE tht89vHab5KlBeHQJUzJl9UWSmc1v19of48gngKMr58VNmUHWYxl9BlnaUrsboLxkWFh xUS0hA7Tcu09hdiURE9qWhPiV9bfHwMTY1lAyyDH4z6dvNe9Rye4IjmpeoPm6bopyrlT 53OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685368957; x=1687960957; 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=FPOQGHiCz3OOpAUkkuFUZeBt42qUzIfdRX0FJPhLxfo=; b=Gd93vcCpfQJsxAnyU7IzbxOcMOYZjGltQWkX3P53KqXm6PBJdupYEKxt2+FK+F0imm KhvbFR/3+XmW7hXwcsBMzEsoFoyQfv5e0O07Pmpwc6pM/pIJbc1EFZ2WttlR3GeFH3MA xYyKPUqFD79Vg4bsG8G5/kmpYI2Yy0m4sAaJJuN8EibepDn1keUoI4NBGze3sjw/haxi xwzPUEwmTonKNG51yGLSh+2l6umA/OlOEKRjwBgY6N2xvBxoN8ZbXL9/2fNJXQ1jLAmG GjMIbK7+Vh5dwT2Zfjll2rLx/E2IRg9ipNWB5SjKT+2GK4mkK8HOaYSf17fLjJvSoYdp Obwg== X-Gm-Message-State: AC+VfDx7qsp8e3I6Fv1/DTQ5TPFdr8ekCCYWqJU7kHX0oOONRgbzItjA vQYB8qAAZzifvj4Hy8u9vbC4kur8gaC+PZXChFc= X-Received: by 2002:a5d:6589:0:b0:30a:f0fd:dca4 with SMTP id q9-20020a5d6589000000b0030af0fddca4mr741699wru.3.1685368956943; Mon, 29 May 2023 07:02:36 -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 w12-20020a5d544c000000b002fed865c55esm54123wrv.56.2023.05.29.07.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 07:02:36 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH v2 2/6] nvmxip: move header to include Date: Mon, 29 May 2023 15:02:25 +0100 Message-Id: <20230529140229.3225090-3-rui.silva@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230529140229.3225090-1-rui.silva@linaro.org> References: <20230529140229.3225090-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 May 29 14:02:26 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: 686706 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp250688wru; Mon, 29 May 2023 07:03:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7P/Jsh1vjOvacIj/blF+Wj3cCB0411xvPfzkzWLasDZu4vm6TRaKuqlIW6jzeF8uw06LHz X-Received: by 2002:a05:6a20:101a:b0:101:4c8c:d1ee with SMTP id gs26-20020a056a20101a00b001014c8cd1eemr7168182pzc.50.1685369007367; Mon, 29 May 2023 07:03:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685369007; cv=none; d=google.com; s=arc-20160816; b=DD9eeqjdD6UOm3qtRZ5NNXcbWgkz48wFfkJctjVDjJV+c+cbc9DRdBCexnuMOkqGL3 Jwpmc+D3GknULP94e9sSthPQJxA6runHs0QVlfjo6Tm1H1vGZnnLKFcqPu6Nicd4aKvS F8S7J6B4jeZC/7p/inovKE5188qOhxfuY3vNXDeCQY2d/jRjKErNvqz/RA9ZoyFxhbaZ oa1u0RzpG0h8UTrhNIa6LbBPqBcCX+apq+e6TaoAPY9hGRXBGBYFitgzTm/nCI1uCfLr ecn1/7CteKfhENp6W+gcHTSceZy/bifbnCjJBgbAU/VV1YeeyuUPE3FuizT8aR8AciUE Z1oA== 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=10GBeP9NfHFQ3qO6EId3O5eQ5mmUOg15koNm/2DNp8A=; b=rcl4TgbicRXIh/Jz+Tl2FN3TvzEH6QOfod6QaNrUDLtgYOxjxVufjIi+3a0U78BWcF aPUwiFbJ2kmmqH7hdj137AXJDvk6Ee2o7VLlnpunXzNsw5iW2kX57iewd7q4wBmAF/9l yPFI/BQTZiAr2K2cxdkhZwrB49EtbEl4+qST06/39yXJ/63wPa6t7YhfvPoRdpWGS5kJ YfpU5mQYQ68oMGG80EAMX9mD2GXgVETi2c9ZmVQPb97zhwR41KzLPQt99N3InKigQfKh 9Y1hUOblYxjdeUVqsGMoafwIxi73NzPFuge0cPjEjo/LwqZ/1NDfw0O2UpGfpJ+It6mR mJYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HWk6xSjl; 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 p10-20020aa79e8a000000b0064672de37cesi5849pfq.192.2023.05.29.07.03.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 07:03:27 -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=HWk6xSjl; 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 5D6BF8267E; Mon, 29 May 2023 16:02:46 +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="HWk6xSjl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1EF2A85C54; Mon, 29 May 2023 16:02:42 +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-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 54CD484662 for ; Mon, 29 May 2023 16:02: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=rui.silva@linaro.org Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-30aa76048fbso2031528f8f.2 for ; Mon, 29 May 2023 07:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685368958; x=1687960958; 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=10GBeP9NfHFQ3qO6EId3O5eQ5mmUOg15koNm/2DNp8A=; b=HWk6xSjlz8wZfnhWaiGMT8UMfwei1kuTdmFtlEWWw6TWTLG5pOH5brhmfyyInzLcMg LVz8o62mdhzw2tB7792NUq7loA8eGL4Wb1/7Qiln3omIYf05CB2PGBL+gR73WnBdMmN5 tohveoENl5dtTmEg77a0PiR4FHok8BH/gAFeAxRX4GkeQCqkrLO4QdU57N166tSpKFXx COf2KpErTm4AphFESD5MKRcVAVdJUxM6+Kw+VntbvAW4gCwd3xuvt0d+oJU3PzEuOhTE yj2xEtULx6BEKnjjJAOsn8NEWMh7FGxAPFA4TjoASjAirWSp519NsNR14hCo2RVKojIM 1L3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685368958; x=1687960958; 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=10GBeP9NfHFQ3qO6EId3O5eQ5mmUOg15koNm/2DNp8A=; b=hLLw+u8dHp63E1D88wZKD+Dua6/lESqPf4PtB44Igs1FBqVDfgRRhH4jGgpf0COicQ BGBQgWJ3sm7rM1cLFqzK0wufwZobcn0lKwuUzsbQ8/FKCcaCTiTP+hrRE0yQFvlc3K6S 7dOXvXlZPt+d8RizRwOqFcCndMmOZH1BfDAQzuUQCUNeNogC1VqPUd1lVEXK5WqRNdWt Ha86kiPYxGFxdUEvWVc+Hx53ha2wVHl5Y+2OtKDy0G8Anoh4O06CqSOzB4pxa8miU2tG BdRXIoBSoCgpz7FogrvvmGBfoOBhSM08pGzd0JXvA7lzGNl5KtDimKyz0QaSpriXqf+n e+kg== X-Gm-Message-State: AC+VfDyKL4jAxbkkCVrDs1+NHq66Yui3mZX4pJ39M54XL5EGh6f9eWx1 jNDS6le1kvq7Ex1Ub+2+CiJq16nBrCONfvoGTWY= X-Received: by 2002:adf:ee0d:0:b0:30a:9cb2:badd with SMTP id y13-20020adfee0d000000b0030a9cb2baddmr9043354wrn.46.1685368958623; Mon, 29 May 2023 07:02:38 -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 w12-20020a5d544c000000b002fed865c55esm54123wrv.56.2023.05.29.07.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 07:02:38 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH v2 3/6] corstone1000: add fwu-metadata store info Date: Mon, 29 May 2023 15:02:26 +0100 Message-Id: <20230529140229.3225090-4-rui.silva@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230529140229.3225090-1-rui.silva@linaro.org> References: <20230529140229.3225090-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 May 29 14:02:27 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: 686707 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp250843wru; Mon, 29 May 2023 07:03:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4GCULFyfHLB8hXtebfqBoHs9om+sQYqUJZPIKdCsV4dCg1EeAyVN0Ci0Esgr8PiS4DHqLj X-Received: by 2002:a17:902:f687:b0:1b0:1d7b:ed33 with SMTP id l7-20020a170902f68700b001b01d7bed33mr10350519plg.69.1685369021837; Mon, 29 May 2023 07:03:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685369021; cv=none; d=google.com; s=arc-20160816; b=0OTa2ZIoIxgMKSc6n4s9QvdQBqaPJflbY8Q5pF9kjns7PiaQMe7UNAuykVovvWFiir h1avlFuRYEKrJqxMQLYo5zkloeY6yIX3r+wGWTOxB7Y9RrlqZ+2NEejQQtMLeKC+RjA4 +0jp/hInXe7FF8yrCAGueKPd+/msdKcQt93QkK+4Qy3Lec0V2TF216XtAzSGy96FGz0V i1ui2x+6eazdtqamz7LjGN1si7nyXEVOMIpT9H/UMAm3dBR0qxeTA8rgIoqPsLMkds6z /ab0n47UTz8whFN7nV9ui1b1pJcnmHMcdMMCnEdirsa4CnPKPLao2iylyJQfOambTZu3 09cg== 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=yjkLRaPZqzDFHaFgw6FQYvK9VVhCe9s110mFsuZZ3OU=; b=Z0xTdKm0JJJHFEWoDz/STOi5ZOzdExG1LuqqnnL8GbRLIrgREIusYXnjyNB5r9+iTK ldM7NF922XL4V7Nn71Oe7RrbcXJCL6cfYqhgZ28TCujeIdTZweTjwcltQELhO2G+AM3D TdNPNLdpBTLmvNJlbsJb5E4BW7e6MwEsp1+dZQx6rCmHSTcT+hyKVvelTvBH8cTGIXOR Z5G7r6VJ2JJOpNTmvvJRF9So2MIxmFH3PHBsFwG2mmH0TgnhkOYLzq/luIspYdanFCJx 7i1VveatT9uviV9qGBR/PJlwnpy6hzOMpwfFqdj+b4P70oZn3COEtdre2t93N/uLi8GU RokA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sPKKjNyq; 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 x21-20020a170902821500b001aafe3f409asi9118510pln.205.2023.05.29.07.03.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 07:03:41 -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=sPKKjNyq; 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 C4A6985D4E; Mon, 29 May 2023 16:02:48 +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="sPKKjNyq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5203985C77; Mon, 29 May 2023 16:02:43 +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-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) (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 C9F7B8267E for ; Mon, 29 May 2023 16:02:40 +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-x32b.google.com with SMTP id 5b1f17b1804b1-3f6a6b9c079so21742385e9.1 for ; Mon, 29 May 2023 07:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685368960; x=1687960960; 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=yjkLRaPZqzDFHaFgw6FQYvK9VVhCe9s110mFsuZZ3OU=; b=sPKKjNyqB6a4ro3ZpZ4V8voHwxPkS2xW7TMJ0BQgRl4URh25lpyICFygaIkYsajCfe mFaIIyK8+4j3wyoVIbT1A7Q4tdhfk5CDzj63lBnIU6e/O5+oDNql/WoR9YEcJWZLD9ck 7JAIbks+mcD4F29GttI2ciHPr3JflrAIfzHsA2VyDb7CWgcNP8tLW9Sfxoc0TkX+QTSV JQb6YJBqm7B7g6072VXMK6xuSdbpgT/J9F6/CCwAFSLhvN0CkjfxUdFwMLP6Q9ltuPDs ACcuVrJmHuNZSMjMZUA0ri7uMd4U4kDGVaw1aXnIofGovAGVETLMNUR+dpIPEsI+PVnh Ikdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685368960; x=1687960960; 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=yjkLRaPZqzDFHaFgw6FQYvK9VVhCe9s110mFsuZZ3OU=; b=YPpMvmzMiY1DrIzCM2FDE/GsBcvck7rTtudsDf3+TPabNVYtar117OkOLk83MMyDFH p7h5Uu7AM63gCojsNWAjQv5sxW8trnerDSfhSEFULMY4IB6U7fLM/5XB/UcsBJ1QQPhh 6bpQE4SZhPPWvF+09wa0yBo7+5lKba89lT0rCKrfFT9kNh2ER/bcK0yeTdgB8hwfIPEl CW8gVhktmvMpcvfSi6IL4NbzJppBPDTTjpK6JxPk6h68CRdk7ZL/HmU9QQyitoxuP1w2 SIofdDTPZOmpGzno6EM0oa6KR3FzZNjoNIc42ezBYfBEpCTPwgX07YSSyPNfbHrrDolG VlnQ== X-Gm-Message-State: AC+VfDw6Dzv5B9TABYBfBUSZyO4dzLdfJgJfiS58CSFvlbP+SbNOgBdA L/8ttjs7YQu3tGB0EqGh6lC3NNycJhwqaVWCB1s= X-Received: by 2002:adf:fe12:0:b0:30a:782a:7f97 with SMTP id n18-20020adffe12000000b0030a782a7f97mr8791767wrr.12.1685368960101; Mon, 29 May 2023 07:02:40 -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 w12-20020a5d544c000000b002fed865c55esm54123wrv.56.2023.05.29.07.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 07:02:39 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH v2 4/6] corstone1000: add boot index Date: Mon, 29 May 2023 15:02:27 +0100 Message-Id: <20230529140229.3225090-5-rui.silva@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230529140229.3225090-1-rui.silva@linaro.org> References: <20230529140229.3225090-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 May 29 14:02:28 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: 686708 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp250987wru; Mon, 29 May 2023 07:03:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4M4RfjOlTkXuxlbOwNxWapfB6piKjrA0m6mQ/SM+ZcgGT6CsNOiP+eQWrcNh8xH9VH9ydE X-Received: by 2002:a05:6a00:2394:b0:643:b263:404 with SMTP id f20-20020a056a00239400b00643b2630404mr15531566pfc.33.1685369036225; Mon, 29 May 2023 07:03:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685369036; cv=none; d=google.com; s=arc-20160816; b=lnu9Fn2Jm2u/ccVl6OCjk1xuruxwwXU98JnxE7D/cf4u3EUyb6/VlvLqM2YnP82stJ Qn6Dri28VOCGinc/c1zhl+TQckwSAHptrs4SBHP8mJPu/z3RPbyISpfiLc1iaT1SQW4I 5xLbZpnQSyeLowuJXEc4ReKdbWcnfAxdxINRTJh78RC2F4aCXG7w9S3IaC86hxnDTrtX rOB22NzZi3MJ86O8xE1EXwlJDmXUbqe8Xn2BQ41vREpBAF6g2RNCG8qpFKbM30vbvDm+ KK01Ei1pXjgHMl0LRoSue1WnP7e2q1ioWOq8RzK9K/VQH72fDpKFcFWyo9EZhm/MpOp7 uaog== 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=dPPipuhC4MEkABwHH3XrQ+CI4LHoXl7Tgfus6E59A1Y=; b=05i0PaZtRsNi/NmSQVrrkJEhQ8ILzAR7aTxRT9we4f6KSHrPe+sA0T3oVNLxNg2XvG L4CEYkvqcJ2yhOOy9VLV6azq8Xiu4EbReLDQI4I3uJ1+LWCv+NIwJegOifHKjxRX39n2 g7ZrgazIPR5nV5RAAHwkj6xs4dJXcGCNrtmLXDLAhGmbU5cwu6M43/wxa//u+sqGHh21 qOEKe6xNlo3N/lbNBMv22dTJ79hL3X7HkLCv4dHtLJhydMKXqtP5aqybnmjA/A/KFqrM gaO3h+M0afYRfOVdi8/rp2JRzsUq0DwKUjjomlQXXQhY6jDfu2DO759uoMW9b26NSU1N y17g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="UVr/jhBa"; 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 v6-20020aa799c6000000b006489d6fa83fsi10689pfi.142.2023.05.29.07.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 07:03:56 -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="UVr/jhBa"; 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 4E65285CC7; Mon, 29 May 2023 16:02:55 +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="UVr/jhBa"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 246C885CC7; Mon, 29 May 2023 16:02:45 +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-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (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 9B14385A42 for ; Mon, 29 May 2023 16:02:42 +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-x432.google.com with SMTP id ffacd0b85a97d-30adc51b65cso2804813f8f.0 for ; Mon, 29 May 2023 07:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685368962; x=1687960962; 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=dPPipuhC4MEkABwHH3XrQ+CI4LHoXl7Tgfus6E59A1Y=; b=UVr/jhBaTuLnd4nL20sO+jSuiSdFtNHXjBhSpOC0tL8uW68iQwkCPYT2zr95cDcDk8 6uaOAUVKiMsq6lgySP+fHoP/plu2CfpGs80GR/uOlXCK3JpKDHRqeDldh2nXF5G/3ulS /GL4UrWjMde9un6WDleG3OqyT/lE6XHdyIN1W9VWVrudEC1svsPg4gf2cghnR49fa9yU sDHtHGmwpEWwa2wKJAdkbuappgJs0Bzvx+iy9jSd+syxrOKzAmFfLVXGD4dfPpNAEwyI FRfmkAwBy39lYUwTuU5EGG6TGQfWxxn6QZabIy3kwQ0qqqrkeO5H0hRSqug8G6E4Ion5 FcDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685368962; x=1687960962; 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=dPPipuhC4MEkABwHH3XrQ+CI4LHoXl7Tgfus6E59A1Y=; b=NwEu1dVU9PSSDAzOrk7rjjCrzGtea02KfPArYDm74yp/S+ULjwHLlWr/cWkDV/W2Tv 83/zfFLGKp5eOxVzl/2Cx5ITJNVE2tTMGMVWdFWnf5BL/raDJk6xYWLlN0yxhNKegE2W ySPG45ZSLhxkQTYC9gARZ6Z7VIu7ReIWFqgAUdfsG34mwXbzsjJERt4Ct74P6A7SKf6C Z+Pv4lmfBGJ//KitgPQTfdasHavjLhkmAi01F0Ab+qHMbKt874N+hp00GgSijIlZQKeW ZEqAGOHR/wp8WmzjI7c4XnaSafxK4Zy5Ou0ngcxKQ7D5wR8NIq56NfpsgojRnYMFMfz4 pHBg== X-Gm-Message-State: AC+VfDzIuWzKGhMg6NnVppk61DzkDeqYT1xnjx4T20z3i1053Wr7Qtj1 CWDjg5z4u0/4bH8CImErSj4mu4teeQ0lEjIlsGY= X-Received: by 2002:a5d:4d02:0:b0:307:8718:7891 with SMTP id z2-20020a5d4d02000000b0030787187891mr10042505wrt.54.1685368961744; Mon, 29 May 2023 07:02:41 -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 w12-20020a5d544c000000b002fed865c55esm54123wrv.56.2023.05.29.07.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 07:02:41 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH v2 5/6] corstone1000: set kernel_addr based on boot_idx Date: Mon, 29 May 2023 15:02:28 +0100 Message-Id: <20230529140229.3225090-6-rui.silva@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230529140229.3225090-1-rui.silva@linaro.org> References: <20230529140229.3225090-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 May 29 14:02:29 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: 686709 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp251167wru; Mon, 29 May 2023 07:04:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Rbv5h7prU/g9mwE0QLUS2PED2ka78PQDtYt46WCoiK0ULn6nmetYYeW6/uU8W6EGc6rV/ X-Received: by 2002:a05:6a00:150e:b0:64d:22db:1023 with SMTP id q14-20020a056a00150e00b0064d22db1023mr16018011pfu.22.1685369051018; Mon, 29 May 2023 07:04:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685369050; cv=none; d=google.com; s=arc-20160816; b=VswtMmOeVcs5/tRoik608NZZu+NjCg5c6deM7tnZkuGSoPVukhfaLgm79WyP5E0CzS k2TECAvHJBMP96RvDzym9zjATzPmFHvzJ77kG3b2jWaUqd/cAi+LRrBhIGVV5a4fbATQ fLhr9465TvoP6lXgouo5R+6fbxS58vyk/BMUfkQ/9mo2H/+Zqj0rbjwDO2go9X1Qu5hm TUlxWdrSVmgwDrbivkmCLCFK3uRIqyZkGbhjA538BZnvKxU0bluKxLDjT2eXylr/L72w 7SQtgbg2t++WG+NAtoxwoYigiB5ODa/zLm+L14fbPMbr5F0Hx9ORh+w52xe2cHX+mojo h1NA== 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=FSEYhmor4ZwcGjeR1eh1eKiSz4JU7osriWh5ow/TABY=; b=o37014zxiYtJ6qz44b8Z15Dtvgvc//WxnsB1EppDYqABNE1rCvrW+Pa8DuJ7yxj3a3 WiCsSyblBrafCaJVObw8sPW/e0CY5tBKhak4RFlOk7FY5T1bUU6FS1iI6yYsQk5MYt9E RircuBEna3gj24WBBSpkpyRQiwJR22KKC+/XkWbZhqtyc846gQ/bD8XkS+N/oUfDIBgk t0LoY+dginTCDHxbQguApIoKVoHBWzL2zzN8xgbTMZkNtEkE3wPQFWERdBEiRKCX57fZ Pz8+W5KzidGkPniZRSg7tWoBRgqKGe1rN8w8osdUfPaznxbfxeySVobdWnhcHDZQfhdi bSPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h03JzuOg; 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 z124-20020a633382000000b00517f7c24652si8122331pgz.890.2023.05.29.07.04.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 07:04:10 -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=h03JzuOg; 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 3545385DEA; Mon, 29 May 2023 16:02:57 +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="h03JzuOg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 588538215F; Mon, 29 May 2023 16:02:46 +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-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (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 E96188267E for ; Mon, 29 May 2023 16:02: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=rui.silva@linaro.org Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f6ef9a928fso19082015e9.3 for ; Mon, 29 May 2023 07:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685368963; x=1687960963; 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=FSEYhmor4ZwcGjeR1eh1eKiSz4JU7osriWh5ow/TABY=; b=h03JzuOgKNfvBdfuU+mD9uPPposU0phsbuXSE37y1b0fB1V+T67RHBuxC3FpQvIVAJ jpVEozv0YqJ4e/Z3dsFZ7kJRs5hN5T/2k8l8fPQiIhQhORKt1VrdA4aUhJYt22fUZni8 p/Kl7puJC04iCCEyaaqj5aki6EKxHI/nECNEf2AeQimqh3n+sdvZplV3BpoBPDes60JD 8WdGmOy9OOfVGQgWDA9NUoDGd0s+/vpGMxk7JFuozqkGr+zkiolDclMZrdZmTI8s7Pc4 FBVxbIjWpYBFXwlY+l1aUnl10MrU4aFK+1g3TWP2WqQA/qWPOIRo5aYQpVPwZT6dw6J+ 5D/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685368963; x=1687960963; 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=FSEYhmor4ZwcGjeR1eh1eKiSz4JU7osriWh5ow/TABY=; b=VOjZMNGYjeTIAJ4rDM4BiZob/d+/5q70Im/wOzs2OqsVL7YpKgacXZ5+rT4fvG9ofc lo5HNGrFmS/f31Ag73h6o8Ji1tztvvxiWyArYTZO4zf/6A/d8xH+0kPg3QfHZe2YJKo4 wUPn+MM/wRpFMNq1gZTlV3dEs0Yzo5245SaMnrTaQBiHh5mEZ75w81oQjlKeX3y6b+C2 Yi1n27+jH1DmWK0P4el2Tjk4wfU3izYN+IcAFqJAFFJyQtQmasyELZg/ufDEgZhD6Ov7 5rLgy7ilhtg87dlVXGee/cFh/D6LIz122IqGjFJHX5P0N+LXjaR8zvcO4Uyzg7b4bad5 kVCw== X-Gm-Message-State: AC+VfDyoKFY0U3FYlWxtl8JGiBselV3G2xHPIQZ08cxaXLiwzQ/BnYvh yY+6ia0a5kZgclN4lv19p7QQsRZ2v7ZN1fjG5ww= X-Received: by 2002:a1c:7205:0:b0:3f6:1063:e4fc with SMTP id n5-20020a1c7205000000b003f61063e4fcmr8829020wmc.40.1685368963258; Mon, 29 May 2023 07:02:43 -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 w12-20020a5d544c000000b002fed865c55esm54123wrv.56.2023.05.29.07.02.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 07:02:43 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH v2 6/6] corstone1000: add nvmxip, fwu-mdata and gpt options Date: Mon, 29 May 2023 15:02:29 +0100 Message-Id: <20230529140229.3225090-7-rui.silva@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230529140229.3225090-1-rui.silva@linaro.org> References: <20230529140229.3225090-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