From patchwork Tue May 2 13:11:55 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: 678395 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp499375wrs; Tue, 2 May 2023 06:12:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5oz+3cZOLY6HTicKyvL0lgKYfxP5hVR88en3uAYbKO/DewGXXoMZe2tYcDjRV2kRIkoSod X-Received: by 2002:a05:6a20:8e23:b0:ee:bac2:c6e0 with SMTP id y35-20020a056a208e2300b000eebac2c6e0mr12602720pzj.44.1683033153226; Tue, 02 May 2023 06:12:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683033153; cv=none; d=google.com; s=arc-20160816; b=iyYwGJWaJPAySsJpME+YHBVmLO9xWv7arG5sLG8S9DqMvzDuYT187YRjrPrdHujA6B WiLx20RKwVF+iGSg1TrT7W6SZvJQkf9udXzBhpKBCa8rM0aBhzTYBZKVBTWK1xGTo6Tu cJBFjNgH0vvhOJe+AAQdue3+tlwl43UG4P39vU0L4MTsm1rnL+4tLCKjxSe0waRGt6SO 6CmLJI4CxBG9iw/VUxNc3/+8EVuzmaHVqSmpQpjRYMPTIfhfaFGIYX9csq6WpCipJsWy EtEtFpyIvuJr8TtNcwrfqRm/kttDe7k+YgLIKCEsRHI1HulU+xIL5JJXqgWL/SHSGsNf 6VxQ== 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=YkuaoCFV9B9612IdMsCHmsC97jW3CcgHDgumf8cJRWk=; b=1DDU7bPHsfIR+7TfQ0toazUquE6nMIBXkUu7oA4ueAH0zdZA/DbTspXphDi7x3YgPs w+df9id/H4BPB2H66yhrnw/EkuJEXtUqnUP8Oj2fIY1/CSjg+WN0RicnT5dZxijkp9KH S5s2lhiz16DLlex9u73CXLVqaA2bFR9MdS7BJfUCG9fItJZjcHm+BgXyblH5xcMtaE08 1fBwHh6U63tMmETqYcGF/ynWj3i2MWyY5DL+dx8iPSa041KZtAgEd7O1VrMwRtc5XLxe JjOqoxCUXINVmt3C+Hl8X3j23ODHLNKieUB6ebfmFoMKqZ0zNQuCWFSTEErevN6TOZz0 1SOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m+2fawWI; 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 u62-20020a638541000000b00525049b622csi23543585pgd.71.2023.05.02.06.12.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 06:12:33 -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=m+2fawWI; 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 8733F84743; Tue, 2 May 2023 15:12:18 +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="m+2fawWI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C1AE88473C; Tue, 2 May 2023 15:12:17 +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-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 B12B884734 for ; Tue, 2 May 2023 15:12:15 +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-x336.google.com with SMTP id 5b1f17b1804b1-3f182d745deso36638805e9.0 for ; Tue, 02 May 2023 06:12:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683033134; x=1685625134; 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=YkuaoCFV9B9612IdMsCHmsC97jW3CcgHDgumf8cJRWk=; b=m+2fawWIoT5AphFO+AFb7k0h+cGMPi9wzppze99bxHHofrP8hTcs11fVMloshDEC1i WSsIWRXh+l7QeLMmJvQStGSPV/V+kyR5lly79G8aB/GJBaltbFk4+b+phs1ZjRzoz/aI X+cB8zLZPQs+c66frdntm1zrjs0GSMuv4DZHv5ZF9e1c4MrSutBYWdmTRCnaSps8h4/H taZhcKE+0PIb9m7bz/gs+juucRwRnXVOktHQnLPZZncAstN+AXi8R/OttkyTYQ0gtSGe pdBhEqMohu6Qkh44isrjv0DwmwMgtu5kGIm/lZplGHshBbsTMnYrZb3ao35s7Vv/sn7v qSrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683033134; x=1685625134; 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=YkuaoCFV9B9612IdMsCHmsC97jW3CcgHDgumf8cJRWk=; b=eRnsMNC8dN2CLLeVDieJdLiEUXOIhGGyxINvUnybfDJTdEsKBYKZQrOhIXCxajNy08 GsURK999NcwRywNwQgMd0eq1jJIXyCQr+zU26Cro2tEMTJmL5h/tZsuAoUt7XPtCALMt FBy49YvPlj/w66QMNscm+SmLJtaRpOkHHy3KYwKjkcXhOr862j+k2UsM/0DpD7yT52b9 MOAvQTEeknBKEA6OdPYJAj4DYarCcztpv5bphq12O/+U3hKnmrEMtpIDDB033Rk5/Zd0 qXw6mexOie/PtttRtxpb93kDGOfiGjOjY1bU7ERbmhpdsSzV9Yo5u+wW5FFNM0YdnPcz Z++A== X-Gm-Message-State: AC+VfDxvTUzjvm/PfG/czHbkEVmkm/TZhgdUCqvlzmUvdNiwK7jY2ZVh fczreJlmYTZIt+VcRhjSDoY9IesvnHO8zbm+KNQ= X-Received: by 2002:a05:600c:2296:b0:3f0:8ed8:853c with SMTP id 22-20020a05600c229600b003f08ed8853cmr11874923wmf.37.1683033134528; Tue, 02 May 2023 06:12:14 -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 c21-20020a7bc855000000b003f17300c7dcsm35277121wml.48.2023.05.02.06.12.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 06:12:13 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH 1/6] fwu_metadata: make sure structures are packed Date: Tue, 2 May 2023 14:11:55 +0100 Message-Id: <20230502131200.2551513-2-rui.silva@linaro.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230502131200.2551513-1-rui.silva@linaro.org> References: <20230502131200.2551513-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 Tue May 2 13:11:56 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: 678396 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp499478wrs; Tue, 2 May 2023 06:12:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7++D4aBH7UiyXBin1LngUMcZDRslYDr8HI2TjT6YCx69Fbb1HjbDRGZekcrWJNIlVB3nv4 X-Received: by 2002:a17:90a:4965:b0:24e:271b:da4f with SMTP id c92-20020a17090a496500b0024e271bda4fmr2248985pjh.14.1683033166821; Tue, 02 May 2023 06:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683033166; cv=none; d=google.com; s=arc-20160816; b=K9twHKWPjdy9Ey1KkX3rv0VXQ6lgF7yKXwo1U/yr5hCpUd/bQhqrN0bCzOdF7PG04U vt/6zQaqG6QGekNwqvOogF0yn1t/hV/IfjYDo30bf2pgEssb78VhRZWtlivCXyLUKEGX 4uHDxuA3KdvPZIeqGWMKnsAMjwg/yD9VBMSdp2STPLU5HLrDC73FG4iP5B6giUYCHUc8 7tGBRpscS4VYIIZYjaWsZTQVCn3DX+pc4Rx0mqagLSjQvATTvsfTWjCOrvEtHA7cV2Ft FGaeqnxCTT1lGdtVvKQd+ihtimGK31ijt8sZB00ZjrCTgmHmBPCSeU5l+uX919XCP9mb VLBw== 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=CcTlPr/4utG1hdzdaD1JJTRYHUH+5REsTbseI+4PkM4=; b=FfSxFlTxDSPVjLLdwSf+39DhbSZf1XDkGaai1HqmjxkCCYXIfXfuF+tRufvajWqMOZ 6Rpxr8eblFTZzswc62fSjgodIzeen+a3u3q4SjJ7paSJ6MB6Hcso+P2cqcnMZs/2V2m4 Ffh+6shNYWc/Guuz/WRRGU6PnSPyDO5QZ4opHXLHXfLl2feCDPZofTPdwvL0pKhQH6bA UBssQkBbQWjyjGVpwp6sKYnk7RSO7tbixHmGmNdGFBg+RKXbj83g6sX57FmMtTH+SXE5 JW1MYUMFS5ec6O01zg5viEMjZ71C+VMhtow+/jYZ7iq31k4sDGONXEeAbqc+ILx93WTJ Oocw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p1Sv8jhd; 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 j17-20020a17090a589100b002498408b1c5si32056050pji.39.2023.05.02.06.12.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 06:12:46 -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=p1Sv8jhd; 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 6252F8473A; Tue, 2 May 2023 15:12:22 +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="p1Sv8jhd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 93DD384738; Tue, 2 May 2023 15:12:20 +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 7296384735 for ; Tue, 2 May 2023 15:12:18 +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-306342d7668so895375f8f.1 for ; Tue, 02 May 2023 06:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683033137; x=1685625137; 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=CcTlPr/4utG1hdzdaD1JJTRYHUH+5REsTbseI+4PkM4=; b=p1Sv8jhdqGluQ1vSRImvLIgMCPWSKIWKO1buzEnwGSwblPKh3YWlCQ3gld/uAhRFVG J31ayWj9fW6finntXfTztdzamdhZck9QsDGQMA1WDZ6+R/TgLXo8GlulzdtkzNz8yLhn +McdJXmLg9Uq8wxaW4IAXAQneQqT2cSTJJGQEdzBQx+lAs7BIXnmqxZR2KHECfoH2/Ht J7HVZ2arnMlljnJ+xnYfKrcXAmRSPu0DdtbqGILRgLBlKkn37E5SrEKagBBzJJUaxzCC cq9w7zDsp4B6/UbXGSkpqB5HbnfWb+kwZnNu/T7Hi7sFqbemHWTbxUVnK9yNKZptSP2O YEXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683033137; x=1685625137; 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=CcTlPr/4utG1hdzdaD1JJTRYHUH+5REsTbseI+4PkM4=; b=O3d1F5RO8zIipp2IaWpL37R7CtpJXHsyxS91Rp7mbP9fgYfDFNQU+9Ji/mz+Y7akka opQ78GDL/OIsPer3CtZCHzCQBZmwlVjTw5pMrT6AkDjzI37dm7aRgvSo9lgDD45PaHOn FmzyALi3Z4dktpp4m22+UKcYzCw27pfm0AmibQ8RRapwrxiX/JX5dnk6hPyYpPd2QSJ6 SWpwehg0s3oqamMalkbryXM4UBeDwzIHWdBUKYP+ohTvQZVknKtHwO/X8xk69pfqBQso sG64oBeQNt+OjyffhlK0SD3/4bv2ufa1s/XRMi6SuXVIaqexan7z82G+1ta1miYrLoig dMPQ== X-Gm-Message-State: AC+VfDwklX+vQ12s3fbQA5DtVUv6lk71hRngXJU8Ynt0sxiMVPElk5b8 QnrocFoIUVfweknEiP+mgXruBw+2mTWkcGOWv3Q= X-Received: by 2002:a5d:6a4e:0:b0:306:2f5f:6201 with SMTP id t14-20020a5d6a4e000000b003062f5f6201mr4025609wrw.33.1683033137227; Tue, 02 May 2023 06:12:17 -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 c21-20020a7bc855000000b003f17300c7dcsm35277121wml.48.2023.05.02.06.12.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 06:12:16 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH 2/6] nvmxip: move header to include Date: Tue, 2 May 2023 14:11:56 +0100 Message-Id: <20230502131200.2551513-3-rui.silva@linaro.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230502131200.2551513-1-rui.silva@linaro.org> References: <20230502131200.2551513-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 1 file changed, 0 insertions(+), 0 deletions(-) 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 From patchwork Tue May 2 13:11:57 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: 678397 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp499638wrs; Tue, 2 May 2023 06:13:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4pVsFoHPSPCNenyso7M7gr0sLUw+n3O71xYUmYw2icfZD+OA2/Kty+yi5sGnKPnaVfsKvK X-Received: by 2002:a17:90a:9204:b0:247:90d8:41fd with SMTP id m4-20020a17090a920400b0024790d841fdmr18981186pjo.26.1683033180594; Tue, 02 May 2023 06:13:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683033180; cv=none; d=google.com; s=arc-20160816; b=LODWLjjN8mXzjYMcNBLJ4R0/H7SgxnAwta+JtX+tS64/mAVfc+L+0ZdAM2WBx0rIB6 VByRTNP6Yin66Iqjf81SR7kCJO1VAwV3aLXYXbpjHfMqfstslXEr4MVFAMSwmRXDvSls hIoeMr7F5xzl/ZsTq4jIeT8Ke+xjaPdJCtHs7GAxUQFamRnqERHdcSc3zpaSST8buJzZ hbXzhdT3VQA6eu2UWTa1KT9nlfevKt82HWyVTboahbwUQOzsblxnFKT3/pVJX5D//Uln G3Nc7Tt48i1M0Xf53cSlS0fp2ThBTdedk68hk2hPNGH84uTJdTKV81rVGQql11dsXqxj ZBjA== 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=E9AFngAdl26/ZbtRWEQybxP4AJ+s3NWkfMFTnneAISU=; b=VaxwFxhSCm9JZ75uJT+4dCYc52Xf9nujX+jpQtLbeaqJKvXq+G/T51mVyg46fcU3gG jFXBUgD17zl9YNvJV/h3iTGsPDxB3JoY6dz//+loyd/N3gxVE+k2h8Tj0Sfcfjb02VXo J4wj4L5h43PQWBY88lNi6oQRp1vslCj52bMtgihUE0EmOry8SF6wd1QMHMGHUXqs9AQx /XA3//p378fRkVUL8fmmm9SlnTTBwa3cf1bSJgVmcHLvSideXRcThBb9hf5brdHW3OA9 xsthqqjNQRuKjwBBB6g+CmHnTWWSyeKF7kvLKWu6wvKpBZ+/PTuKG3CeJ/2yj0Twpr7L v8Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jS40rMTW; 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 k10-20020a170902ba8a00b001ab07e5eb27si2031839pls.492.2023.05.02.06.12.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 06:13:00 -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=jS40rMTW; 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 4983484757; Tue, 2 May 2023 15:12: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=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="jS40rMTW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 68EB78473C; Tue, 2 May 2023 15:12:23 +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-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (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 44F6E84735 for ; Tue, 2 May 2023 15:12: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-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f1950f5628so36459385e9.3 for ; Tue, 02 May 2023 06:12:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683033140; x=1685625140; 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=E9AFngAdl26/ZbtRWEQybxP4AJ+s3NWkfMFTnneAISU=; b=jS40rMTWz8KogmLjjQTAA5tIQsHhSCobx+twu87cJkQOP8msNcvkhq/T8Gl+sCmwSq yaSUu+X9DERCtZ/CfIfg5ObTR0c+f8OlNwTSJOzYAiD1RzotveJOIQVCEEBA8wZYr37Y hn5DnkK5ayib3PvRBYBilKTuWqtwVDWPR/q8QWJ1Bkr2/d+Zt8Uore5HkKXGh/uj1nWB jFh8xY39YxXlGD6vTnHHP9VYPPY6PTVE2nHUe4rMoVsCfmuukjm/OXQ97zTy+CrQ/wgP efAh51KwzPkOLlwklaFSu8VBgQzJgw9Nhi1O8xIJDzdjREQNQ0Yp4611fm/At2upcjY1 LvBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683033140; x=1685625140; 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=E9AFngAdl26/ZbtRWEQybxP4AJ+s3NWkfMFTnneAISU=; b=EKTDIKmrhfOhLiIhqUwxuaZZqvvpUTkMgn3Vt6Ew7kUF4qYR1xPHxynH1bVb7+qtIH aTyjmQdAven3Hw1TjlMfHPwRnTKIsqW2CWGe7KKRaP6/13U769UOiKmUr0Swx47yqS5O qMfBeIL4M4z+Y5+IcFMefUqdrJIT82uf3sqHL35KMSiWgJi2VSoHqK/ve1eMiwU1Gcoc aM63ujDP/NYhl3FsI4JA51XfDOt7mLDRcnsPqYnNIDu/N5s6YmIQrNKH3Bn4bvbncu7q UThFKAmAuDIfh/4GAccAgCR4+sy2A8VNPvbQIcIKWndXaxORsjB3JCZr8yXWK7hwdQoi i7Jw== X-Gm-Message-State: AC+VfDw4tMTwykckHX5rWHPyBN/liVAaZaGwNQ3Q4X6SRGL5nReIaSxj l7kM9PkTdNY09hz5buoo24fuVsGoIQn84N/tKfE= X-Received: by 2002:a7b:c5da:0:b0:3f1:72d4:b271 with SMTP id n26-20020a7bc5da000000b003f172d4b271mr13832268wmk.3.1683033140027; Tue, 02 May 2023 06:12:20 -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 c21-20020a7bc855000000b003f17300c7dcsm35277121wml.48.2023.05.02.06.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 06:12:18 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH 3/6] corstone1000: add fwu-metadata store info Date: Tue, 2 May 2023 14:11:57 +0100 Message-Id: <20230502131200.2551513-4-rui.silva@linaro.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230502131200.2551513-1-rui.silva@linaro.org> References: <20230502131200.2551513-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 Tue May 2 13:11:58 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: 678398 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp499791wrs; Tue, 2 May 2023 06:13:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4TXAcxALaPYb3Rw9FFMIp1zvbMCwzwMwcYrWPo3OMkhSjGts6ERoIBTdninVldgirkaePt X-Received: by 2002:a05:6a20:3c92:b0:f3:cac4:ca5d with SMTP id b18-20020a056a203c9200b000f3cac4ca5dmr16707126pzj.35.1683033195654; Tue, 02 May 2023 06:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683033195; cv=none; d=google.com; s=arc-20160816; b=euWXRHEDsRnSVm9huGNPP4yNeDKyA/x7rmQgjd998IW1D+sqNYfi73FK84pw27v+iH mMfSkZChSK5Zq1JgtiTHl/Zq4CwZ5WBftgo459zYL9c5nAH794ICArQvJGyUjUqVWMeN EfWOuwcleh/TAfJtPiSB3gxOnS7rD39k8KfrJMWXhdFdJLZYqNCjx9sFl14wzOv5787G gc8H9NJSs26wui5jj3LaWWIjBPynihfT9TA/9i+v1ZumWQBdmTaDdjNZIgwqwMLEGkhu 8Aa4gzHXJt48frzQvC4N6iTPcXH4vjn1uVlRu0o2Q8RFhV0R5TpwgTzVWkimSYzdzZMN ypEg== 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=O4vbhFn9Gl5nq1EjiKotc/2XwjjjNn4biK1M3w2B0W4=; b=bmwuOk3wZ26Qaj4dCUkpiWKNZNXGABeyLuGKu773sQHRJ/ti/zQjMDQFIicTEuLzfm u7F1gzi36+sstI44vr1kvY4/88DTYKiZvhW6xRR9UyjeMuF3LvValYrytqKzCLRKPKJC NLjFyNJwWBWLLd+1+iaj5teYAh64Ls5sWgxNcbFBkdf1PGIamNJVe7gBWjrr4POvskBu ngi5EaFrlhJOZpS2gB2/X8U3882UzlXX9Gy9aYz5sld560kzi86VufF16CcLEo1enowT hV4vo8zfLzQ3wX6hO/yN0am+bbwy5+grX7Nb8bhDxHQV6cIS/qirwq+b2WQmNdni3zGv 8Ngg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="S88/r1/5"; 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 e126-20020a636984000000b00524eef20da6si26206409pgc.642.2023.05.02.06.13.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 06:13:15 -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="S88/r1/5"; 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 279968476D; Tue, 2 May 2023 15:12: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=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="S88/r1/5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 28B5984761; Tue, 2 May 2023 15:12:26 +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-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (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 C2ED884735 for ; Tue, 2 May 2023 15:12: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-wm1-x330.google.com with SMTP id 5b1f17b1804b1-3f173af665fso23244385e9.3 for ; Tue, 02 May 2023 06:12:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683033142; x=1685625142; 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=O4vbhFn9Gl5nq1EjiKotc/2XwjjjNn4biK1M3w2B0W4=; b=S88/r1/5zWTdyyfUQKUCSQtWPEU7gWAGG50Q/xdTnU5sjVXNZC82zS21PYvKQw1Htw FJas/8e1hvRuObbDmn8uYTePeU1qZVjqcwfb5oc6XhXuQ4BrLYm6Hz24E14HoS24ouhu JpK5bjTUy2t59NukIMKAbWDPtPHvvOz06ZxyqGFoHO5NYGYtpTkrbHaZXTWZIK7bHg/Q /JNHJyT8kTtlU10wjh5X1swPbljFfc8PeyokUvlH8cW9XQArSbe62m+6TH+2qd2k44W4 nMtWDDCk0SMlrzMkgPIO06rIZ6pEWq68UwfnSrXCU+30qMo8874JF8cVp4fdD9QMd9Wi jbqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683033142; x=1685625142; 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=O4vbhFn9Gl5nq1EjiKotc/2XwjjjNn4biK1M3w2B0W4=; b=JHBVHlVMx9Xtwzwa2B2PeOup07JEJLg8dl4dWyXrhTy+oGJUIpFaN7Sf/FjuQsu+jg CZ+lWUa2C80jLriI80x+GpdD/xGAyNTNQWr4UVVkHO0zOhc+FspSNlUjzcchVFX2/+WN v7AN2zxq+CLb5VqDIPrpfQthG1uKc1assJLPbqoJLf9XPy9T4JzbFNnGa83bnmXOyteF FZeGrUbMYSsA0+bwIKrWboijSlV1wTNnzJg8bQ0qHNQGfDVjB7d6VoLYmXZxQ2ashHWg EGMh9O019OsDejVum/RAUG5FG1SyGAb9c8rXQcF7lm+JtiO5dL8zR8UMl0k8q2HEGjr5 XiHQ== X-Gm-Message-State: AC+VfDxbUQDOlHxdDdYgBpm5zPBNIhVWJ+XESj28snEswYlGPPnHqsL6 pXcrsDiXqAg7JMqTqmV76PmuLV1O4OTuEGTBDXE= X-Received: by 2002:a05:600c:ad0:b0:3f0:f3ee:9e2a with SMTP id c16-20020a05600c0ad000b003f0f3ee9e2amr11697918wmr.35.1683033142540; Tue, 02 May 2023 06:12: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 c21-20020a7bc855000000b003f17300c7dcsm35277121wml.48.2023.05.02.06.12.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 06:12:21 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH 4/6] corstone1000: add boot index Date: Tue, 2 May 2023 14:11:58 +0100 Message-Id: <20230502131200.2551513-5-rui.silva@linaro.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230502131200.2551513-1-rui.silva@linaro.org> References: <20230502131200.2551513-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 Tue May 2 13:11:59 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: 678399 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp499915wrs; Tue, 2 May 2023 06:13:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7QtwkiBPga/uzbd/y3a+1CjxaWGi3YifU7k5Somu5x0FCzMZh/qtUKkjvFlM6k2Ff2lZJ8 X-Received: by 2002:a05:6a00:1789:b0:642:ffef:1d03 with SMTP id s9-20020a056a00178900b00642ffef1d03mr1883983pfg.32.1683033209910; Tue, 02 May 2023 06:13:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683033209; cv=none; d=google.com; s=arc-20160816; b=xUn6ZMJgsC1bQpEHw3HjYXG8vjtVlMmCo1n6VIaQp/Ho/WSv01etX0nfmw2fwJsRre 6ifXtsF8aj7jqrcItCjbPWLNqoD/odTW0DsViUDm7e4OwwuARiArY1WQwskBYKMfNLEP /MSaOpZNrba+ePnISMbaBNIi7B6acOLW3kQBZcuIcYpEOF8LCYk9v+UL7eLaFiWI1PTM wXuDNG0HwfnBaffIKgs/Y3d+irE8oC6nOAIR9szreLt7rdzUsTG1WpkT6Fq29iRJRb5o 3mluu+/jHVgkFW02BZsuVLHZngoiEYBc82PTPjp448G7EvOFzmM/cKKFCB657IYCTcJR Pqdw== 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=0kXcHmrTGhAsYW+GY8q4oSakae8yeLX+s+0qCphutOE=; b=uvTqLMA9sw2655645styzirXNhCFU1JVwOzcRQcZbi/NCkVDqnhHPxYsk1CKEVtWSd DjaCbrtvQbMSz7hQ2JYXge4H02Wo4Lm3vk3r53o1ThbX/V69xaJWNfqXojUugekvFGn3 ebdbeg+wgJ44ZYZl7R+nVFWFSu5C6G4iXmZQSxJCBzntez6gp/yCKIouMMyI8/Fqjs5u d3lyandXIATpTxY6lHVmk/BSNxOjek8NKRzyHosLgx1SHbCZr7Rm0VpzJK4mWfnrA4T+ zbwi0Iy0C60gHFjfXOKAEZnTW/W4BNpv82WyLibKLYLtAtUZqBWtH5IdfSiwRnCp2r6a G6WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gINWAWG0; 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 n184-20020a6327c1000000b0051b8ab9b2a7si30851295pgn.193.2023.05.02.06.13.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 06:13:29 -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=gINWAWG0; 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 D948B84735; Tue, 2 May 2023 15:12:31 +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="gINWAWG0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D278984754; Tue, 2 May 2023 15:12:29 +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-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (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 57E3E84735 for ; Tue, 2 May 2023 15:12:26 +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-x329.google.com with SMTP id 5b1f17b1804b1-3f315712406so168621185e9.0 for ; Tue, 02 May 2023 06:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683033145; x=1685625145; 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=0kXcHmrTGhAsYW+GY8q4oSakae8yeLX+s+0qCphutOE=; b=gINWAWG0cLDdP9l3uRjPqwdi6peLc5nVVuVKhItSO7sdXcB9meiRGdvAOBsiuiUrPd gmtDTnUsCbyVhFvYPNBYua6slV4TR+GDfwn5v5Wo1yCdiprHJsRYYRjvAgIXfKTeXDGs M4vKZxqI98V09WaMMxH/YlxpGEXvRaRAvfj32rcV9hrOFFBPloEE+YVkx+icNjBZrAZ4 YPLwbGbKGP3KCV5VnkP8k2pz9FWkG7UN5JTQ/ruAci889nCCgCFMnyj9o2blSIqBxY2v c1Y/sTZekv3TB2Za35ed7VfYeaqRl4tTYYz1W2ZUSUdKcmSMNw9Q/qAvULO28CCzo3Fs j+4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683033145; x=1685625145; 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=0kXcHmrTGhAsYW+GY8q4oSakae8yeLX+s+0qCphutOE=; b=M6vNMavH3M4Fu6/KfUxHTUKEwEjBqbpes9pu6FjLoOtSd3+B8DiYUAM0ZTU7xXHoJf PXfx0L74r6SGRxB7xlf9LLx4xr0P+3iUizdg2q2mIC2uxO9GXmzQXLeXZzxwYKMTYpCL GG+0YQ9WqEuyfIM7POU/XXJHEb/Hc06S5DzyP+X5pNxovrzUrK9opajxk61VWGuK3LYT hr8S8sgJjziQHlX8bDoJu8mZtMMdQgnHD9tt5ktLhYo3oFkZsIyPcj/DsTbdiy//tzK/ NlrYc2Se3/OherT04aq4P9T+7I10A8navy61J0B+wTvxARSrSRDotqQpB9fvFS9jQpeA sszw== X-Gm-Message-State: AC+VfDzXHIxgP8wzg8CVXOsPAzSmRV2UupEm+GrnsSToNCP9vZOmK48x Nlj1nirqmOfwgkW9ZN46F1//PRfoJ0vQWGKmIFI= X-Received: by 2002:a05:600c:190e:b0:3f1:96a8:3560 with SMTP id j14-20020a05600c190e00b003f196a83560mr15849858wmq.10.1683033144996; Tue, 02 May 2023 06:12: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 c21-20020a7bc855000000b003f17300c7dcsm35277121wml.48.2023.05.02.06.12.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 06:12: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 5/6] corstone1000: set kernel_addr based on boot_idx Date: Tue, 2 May 2023 14:11:59 +0100 Message-Id: <20230502131200.2551513-6-rui.silva@linaro.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230502131200.2551513-1-rui.silva@linaro.org> References: <20230502131200.2551513-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 Tue May 2 13:12:00 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: 678400 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp500062wrs; Tue, 2 May 2023 06:13:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5LbOi/PcklH2c8M5fTF4dwwIkAk7aypgzjQyAd+JJACyZwPla/IQd3HRu/A+c25K8Uazvg X-Received: by 2002:a17:903:1c5:b0:1a6:77b8:23e0 with SMTP id e5-20020a17090301c500b001a677b823e0mr20840893plh.60.1683033224450; Tue, 02 May 2023 06:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683033224; cv=none; d=google.com; s=arc-20160816; b=lS8alsIAzctHofy6HbCGXBPiMwwdia4udMhqrz7U0CMLmjuHArpfrml2k3gA8h/zAz p8U81YID44Y//HQvXfqLkg/6Oa6gdUx5TG3mPB4XddGRhprw8/pinbH6q2c8KyDL3hWa 1Qh45UG5LMnr1GJPKkPzfK1GXxEucyDOCgFwKvWcLl/E9wEBooaFoLvF+hjPIf2m8JY2 nk2o0rXOnkzoQprA7V8nNSgQS4JhpHo0csJWbFAD4Is+YNR+Wy/JVrg9zDIYZNBcMKMR WRkN2uZT2T2ZpuA4aJU777CQ1EE4d8ZP6CNn6wWq6xipTun12E8Kg5JN/IoAlsaPpHNb dv5g== 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=Xxs8lJsVS2Tdiw1Eq8/YtsKOZ8Y7K7wM++EQTjGHcR8=; b=l1D4fqSlcedMkdEBDH9GF5StagKtl1SjUJVm6AiiaC7WOyEYRXyRmRhCjwv4z6g9aj wzPkkoW24YhYc8iQ/S6cyPOcBXvjCM9umhIBnUVGzJKfSohJrA6pWIa/EGWP4uGRzkud oZlS5WBgxkFUkRGprQwrl3PZUkyghKjgVQm+KgJaBowC+AtRr9BLn85OOgqxnFt9s6Yw TiclCvzuP7r+qBs4nLWLW3Ilm1ffme7woNEzLzA0ll8OqQLuNWTdllEDAgi07cdKTL06 v7j65HbHzUP2YKSygVqG6z1AKFWgYVIGrvNap0HYhuRGrOO/Owrt/kajfPipRpN0d3iK lgfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JDKSMPgV; 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 q16-20020a17090a2e1000b0024bccf6609dsi19425926pjd.114.2023.05.02.06.13.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 06:13:44 -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=JDKSMPgV; 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 D091E8475C; Tue, 2 May 2023 15:12:32 +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="JDKSMPgV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 91DAB84735; Tue, 2 May 2023 15:12:31 +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-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (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 4CFEE84772 for ; Tue, 2 May 2023 15:12: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-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3f19ab994ccso38987305e9.2 for ; Tue, 02 May 2023 06:12:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683033147; x=1685625147; 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=Xxs8lJsVS2Tdiw1Eq8/YtsKOZ8Y7K7wM++EQTjGHcR8=; b=JDKSMPgVYAW84xJplVZ4RZdrHSYPrfTxrxdprZE8V2LEd5zeJJESNHakTSL9uMQfMt cIcStAa4Y3vJsYvyLBPZ6je504R61YDzYmQ6vAVlANCrwxfjDppmINMXyiM/YQLEMHF0 e2IO1q8IDgReARIHCCHvg7C+osb485xi/r4OE5U07T2rZgRuryWKOG+oM7LdekTlyK5l uAJF8kiPRaaPRtOBoyIfo8Pi8/ohkZSFMkmthHHypbFBTf2dERj+H3QTflT29Ioq5hL6 Mck1jTe0xuzvMGSpv9UG3HJfnMvaxp6vH6qgHiEGxmPa9fMgwKvpIFNpD5H9YWXXw8Pe F0GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683033147; x=1685625147; 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=Xxs8lJsVS2Tdiw1Eq8/YtsKOZ8Y7K7wM++EQTjGHcR8=; b=lBJ2fUSidvGHcQMlabnNNAfbKowg4lyQE6GHo45JSkPE3MqMhiA6fZtxC13Mcywr2K W0l5eVA1N9aOe8Ar1fdZiSqp2lHUkQPSoOCQE9pJZnSwhGsPCb3TwFrpPlvI0hOfUyGm XRrRiPSF+SsrrABGIbH6R6chWxQxVgsdqLLm8soPTa3LfESBA8dqbSREUvr3ua9DH86j 1vvHNp0fa7ANkEf7GZKzcVvB+DGacvU3sfr26x7Af1uZgbzvY9RRixEzIO1qRL6atEIu lwpjAwjTMnzK0g1UN5Up4ZOvqfDb4Q/sCEnTPNlOvDm9lTjHngNtq7QliHxUiJh6eSQB pTtQ== X-Gm-Message-State: AC+VfDx5ZXuI5ii9/zYvTwu4AUA6z/1wTpDVxw5SbK0SX1sdVpu2PYMC cF7qcde54vpHuxKaWKxwrGpHuLLiTmcb7rebybc= X-Received: by 2002:a1c:4c0e:0:b0:3f0:7f4b:f3c0 with SMTP id z14-20020a1c4c0e000000b003f07f4bf3c0mr12917437wmf.19.1683033147494; Tue, 02 May 2023 06:12:27 -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 c21-20020a7bc855000000b003f17300c7dcsm35277121wml.48.2023.05.02.06.12.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 06:12: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 6/6] corstone1000: add nvmxip, fwu-mdata and gpt options Date: Tue, 2 May 2023 14:12:00 +0100 Message-Id: <20230502131200.2551513-7-rui.silva@linaro.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230502131200.2551513-1-rui.silva@linaro.org> References: <20230502131200.2551513-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