Message ID | 20230502131200.2551513-5-rui.silva@linaro.org |
---|---|
State | Superseded |
Headers | show
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: <u-boot-bounces@lists.denx.de> 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 <u-boot@lists.denx.de>; 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 <u-boot@lists.denx.de>; 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 <rui.silva@linaro.org> To: u-boot@lists.denx.de Cc: Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>, Ilias Apalodimas <ilias.apalodimas@linaro.org>, Rui Miguel Silva <rui.silva@linaro.org> 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 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean |
Series |
corstone1000: fwu metadata and GPT
|
expand
|
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 <common.h> #include <cpu_func.h> #include <dm.h> +#include <env.h> +#include <env.h> #include <netdev.h> #include <dm/platform_data/serial_pl01x.h> #include <asm/armv8/mmu.h> @@ -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; }
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 <rui.silva@linaro.org> --- board/armltd/corstone1000/corstone1000.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)