From patchwork Mon Jun 3 12:49:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 801247 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp1897628wrw; Mon, 3 Jun 2024 05:49:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVg4Fp+vqRThZvSb2AbGlicZXMRq01VLaDNZXfhKBVdyIFVIgVrLV58k3PX9zyvcER5Y6vUgqyOThRQEZ8CLN9j X-Google-Smtp-Source: AGHT+IG7cbWMBqS58Wh1GmFx2rAFlPEJojRPsGj0eBgCRHR9qyAVvnbddU9EwyXAEW1FdEsZDQEW X-Received: by 2002:a17:906:3b03:b0:a68:c959:b1dd with SMTP id a640c23a62f3a-a68c959b22dmr336887066b.34.1717418985459; Mon, 03 Jun 2024 05:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717418985; cv=none; d=google.com; s=arc-20160816; b=dN1xbdKmDUO13VJBkQY2Nl42YtYO4gj1yk+WxeVl010kghAETyhEQPR9wGkwe0ywEX 0nvE7UmmqzuRbwQwuVbwzgh7lKXaKHU6CAdZVjyedfWGOo4Z6bBx3d02fVeJW0XeN8V3 Q6iSLYmnXP9GLonRv6oBs1i4aVHLm3MQ35BZyGGjpZtvfOVRucuaDBHnoha/JNQJapLk 5GwsCQpWOGvf2jkx2J9dKeGeClkmQuGlsbzZ7CYmsEsdFPmvFMShoV+s94lCSgxtK47V FQzz2EiJUJTwhA2amHPxnXX8VEVL04XD6r7WX02mY19XcAbHNtseWQQUD2KzQwRI1WJm cBgA== 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:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=RGCEYa5XkSWB0iVOh6JvNgiUZI+KicBxG5d0DpTh/lo=; fh=qIo46oyO8DUzb9TIPN+p5OAevVSEaK0gGcbdv6qXhpM=; b=CKoL2N3MXU5lDrALJamrH9nXfqnm+F5Z+F1DQfgPl878XLoI+hKJ9iFV0vP1kJkNJq QG/AVVWZHG2okGvwKFv7Cda35wLteNirjnrvRGq4AAjWhR/Vyzh0Q1m04iN66QJ14aWh NPKKEqDaFTYBr6oDGqZVwdEtu6jLqLtxai+wsyCwFji6z8nMea5Hu6Or+g5xefAdgVlz tTNHYHvQF0aGUIDgf3OMS3zFDNbKu4Xu14CTrwDe2wDmoNoKNbY+qG9kIIYW5n4kt8UU +utOF3UgdO0GoSjmr/g/Vuq1tyI/+E2mO5lj/bLwVr3r61ivc6dBiBNHDm/RYUtXU4wJ lJkA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qTrM1e9H; 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 a640c23a62f3a-a68a116f5c3si290688066b.804.2024.06.03.05.49.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:49:45 -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=qTrM1e9H; 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 68F958832D; Mon, 3 Jun 2024 14:49: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=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="qTrM1e9H"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 82DE6882AC; Mon, 3 Jun 2024 14:49:24 +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-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) (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 EA85288245 for ; Mon, 3 Jun 2024 14:49:20 +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=caleb.connolly@linaro.org Received: by mail-ej1-x641.google.com with SMTP id a640c23a62f3a-a68b54577aaso218590866b.3 for ; Mon, 03 Jun 2024 05:49:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717418960; x=1718023760; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=RGCEYa5XkSWB0iVOh6JvNgiUZI+KicBxG5d0DpTh/lo=; b=qTrM1e9HbGGau3kbTILYAXvMj+dyUAAHVvrs9esj9d7k5roR4WaLR2s+/FMtKnewHy ooIFqUfpR6OFsHAk3rKXJ5fq1+Le+W5Gy4FxYspdj88PT0Pk/sRlBMJc5VrBeACYHidP by2LwMhXt3CZLKbFEht7SHXZXQ8SHLlL0f+e7GId5oCmGWz1a0fHKihgv7zjr7d9QQim 2Ke/h5fnmR7SpyT+hlrQxu12+sRfJh6w8TjNt0yKiATtaJi+y0D0z6bkgIxxoObTKZOj vXkDqRksIkcWfxe9cdphBwz8KwK5Fv/fGZI1/gJ1dvjocz8YPSIihj51zA11SHRxAKdq ZDgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717418960; x=1718023760; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RGCEYa5XkSWB0iVOh6JvNgiUZI+KicBxG5d0DpTh/lo=; b=KfUjjI5BcZrHAr9TY0q2KJehtGb5uyuQTD0PxTPGZdIqxpHz1oqBjP3EF7/7+K7SSh 10j60hx0F7ikP0coDHplj+pSHCtfu80CfRlcthqHo4xw6eYA6fKguic1wsv9bmvSLois QdXkziYR9+JKBzUNlJj4WzQVi/0S4kWPChJqNuObMJpG0o4tzpt9maJmQuyzul2o/Aj8 XdTMRIN58Agrt8MuPslzsm/wQfM1NOZD5Jj23OQk2NSZEYAYFOsu5V4kFE4WVTNr9fOu hMZ5k9mdl3kC43DcKoGWfg0Z+geyPF1HUgvTS/h7rv7/R6/hL+HL8Y8XNG1OPQkb1BDh FEiA== X-Forwarded-Encrypted: i=1; AJvYcCX7d/i5TiTMYWGWDK3/ZrImxfe5N4glSQ7GXtJ4qqp0sYi1VQ9YL7GnIcwkiUw3eO21cib+1w85NYOtRVobRwl15sdFNQ== X-Gm-Message-State: AOJu0YyzmgIlPaBWPh7dOJgrqKqV49zoBnDtgtG70WLpQ3gQCvgAgLqY a9AozATKtYUezXHbwbmRiqdzaBm070IHTCqgj5GQACqWYYBH6wYKtT3plQz0JGo= X-Received: by 2002:a17:906:3acd:b0:a68:e4ec:469b with SMTP id a640c23a62f3a-a68e4ec46f8mr284351966b.76.1717418960236; Mon, 03 Jun 2024 05:49:20 -0700 (PDT) Received: from [192.168.0.113] ([2a02:8109:aa0d:be00::8090]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a691cd07c72sm98917066b.170.2024.06.03.05.49.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:49:19 -0700 (PDT) From: Caleb Connolly Date: Mon, 03 Jun 2024 14:49:16 +0200 Subject: [PATCH v3 1/8] dfu: add scsi backend MIME-Version: 1.0 Message-Id: <20240603-b4-qcom-capsule-updates-v3-1-fe2e083289ec@linaro.org> References: <20240603-b4-qcom-capsule-updates-v3-0-fe2e083289ec@linaro.org> In-Reply-To: <20240603-b4-qcom-capsule-updates-v3-0-fe2e083289ec@linaro.org> To: Tom Rini , Simon Glass , Lukasz Majewski , Mattijs Korpershoek , Caleb Connolly , Neil Armstrong , Sumit Garg Cc: Ilias Apalodimas , u-boot@lists.denx.de, u-boot-qcom@groups.io X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=17748; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=X9LCAosc146pi80knRkJqk2VHngxRX5sStxu5+X8s/Y=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmXbvNfv+PbbKs8Jsj5zdxrh5nhT+/ErakIl43M 5S6SFEzdp2JAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZl27zQAKCRAFgzErGV9k tu74EACRyQ3IVxKjzP/wP2J5I6xCEBgMw5ttwLunm0A45IITLC8sOI/XVza10udVj1sFPbxZ8JW QskgBUZf/NlGLpxlxWAaIdDYqZNMmQjfButb7lvZh6vncQDGT1CYepClrrGHAp4+cLq4bAQrVSD Wli4/4Q2MVp0H4cNw2GavBfWd+VcHeQXofVrTPAHFYk/pC2Sd//NpUfvj1grloSv6tjv2pPodxS QSB8rK+YXjEB5fIsqjqu7F5qnRXQFJ3oW6eVCrQUC4Wl+iRdZD5PCM3gCqJZ8UgjKo/15RGtcLz ueQ2+ZS+h8l8qRrMHdCwUE1cEmtfqT3X+tJye2D0NOZpffYHuYfF3zCrOeZBHx02Q2glYR/HPKt s6oKhP4B2KuMI3oJSwMmM+ItHXgn/mrX3vQft4dhxNhCru6CphdHYDv/4gdkaoo3/jZ4scuN8I5 Sc1PJ4qF1hrM90LyYr6cZ2yHI26EmHOAaIIPgmTazxt0hDVcLtmTuv6PANpXTmezn0wccvETksH cIdTKHx88zmCSQjJKPo9QfoKBfoxQHuxQaD5MFwJ/KHEzGBoNp8k8eeJcVeeyGMjDaz7lACc/cd YxR+Y+hg/FSOJx4ONcDKF5gmlCuSljvS/pBPSjJbGZ9cCcbufq5kX5aOfSVy2t7qYBhvdR+Wu2E 1AvRQZDI8cRZjWg== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 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 This is extremely similar to the MMC backend, but there are some notable differences. Works with a DFU string like scsi 4=u-boot-bin part 11 Where "4" is the SCSI dev number (sequential LUN across all SCSI devices) and "11" is the partition number. Signed-off-by: Caleb Connolly Reviewed-by: Mattijs Korpershoek Acked-by: Mattijs Korpershoek --- doc/usage/dfu.rst | 32 ++++ drivers/dfu/Kconfig | 7 + drivers/dfu/Makefile | 1 + drivers/dfu/dfu.c | 5 +- drivers/dfu/dfu_scsi.c | 435 +++++++++++++++++++++++++++++++++++++++++++++++++ include/dfu.h | 26 +++ 6 files changed, 505 insertions(+), 1 deletion(-) diff --git a/doc/usage/dfu.rst b/doc/usage/dfu.rst index 8cc09c308d82..f497dcf137a4 100644 --- a/doc/usage/dfu.rst +++ b/doc/usage/dfu.rst @@ -21,8 +21,9 @@ U-Boot implements this DFU capability (CONFIG_DFU) with the command dfu Today the supported DFU backends are: - MMC (RAW or FAT / EXT2 / EXT3 / EXT4 file system / SKIP / SCRIPT) +- SCSI (UFS, RAW partition, FAT / EXT2 / EXT3 / EXT4 file system / SKIP / SCRIPT) - NAND - RAM - SF (serial flash) - MTD (all MTD device: NAND, SPI-NOR, SPI-NAND,...) @@ -166,8 +167,38 @@ mmc Please note that this means the user will be able to execute any arbitrary commands just like in the u-boot's shell. +scsi + for UFS storage:: + + dfu 0 scsi + + each element in *dfu_alt_info* being + + * raw raw access to SCSI LUN + * part raw access to partition + * fat file in FAT partition + * ext4 file in EXT4 partition + * skip 0 0 ignore flashed data + * script 0 0 execute commands in shell + + with + + size + is the size of the access area (hexadecimal without "0x") + or 0 which means whole device + partid + is the GPT or DOS partition index. + dev + is the SCSI LU (Logical Unit) index (decimal only) + + A value of environment variable *dfu_alt_info* for UFS could be:: + + u-boot part 4;bl2 raw 0x1e 0x1d + + See mmc section above for details on the skip and script types. + nand raw slc nand device:: dfu 0 nand @@ -277,8 +308,9 @@ alternate list separated by '&' with the same format for each :: mmc =;....; nand =;....; ram =;....; + scsi =;....; sf =;....; mtd =;....; virt =;....; diff --git a/drivers/dfu/Kconfig b/drivers/dfu/Kconfig index 0360d9da1427..158c660e6c4e 100644 --- a/drivers/dfu/Kconfig +++ b/drivers/dfu/Kconfig @@ -86,8 +86,15 @@ config DFU_VIRT This option enables using DFU to read and write to VIRTUAL device used at board level to manage specific behavior (OTP update for example). +config DFU_SCSI + bool "SCSI flash back end for DFU" + help + This option enables using DFU to read and write to SCSI devices + used at board level to manage specific behavior + (OTP update for example). + config SET_DFU_ALT_INFO bool "Dynamic set of DFU alternate information" help This option allows to call the function set_dfu_alt_info to diff --git a/drivers/dfu/Makefile b/drivers/dfu/Makefile index dfbf64da6677..3b3ba0994b3a 100644 --- a/drivers/dfu/Makefile +++ b/drivers/dfu/Makefile @@ -10,4 +10,5 @@ obj-$(CONFIG_$(SPL_)DFU_NAND) += dfu_nand.o obj-$(CONFIG_$(SPL_)DFU_RAM) += dfu_ram.o obj-$(CONFIG_$(SPL_)DFU_SF) += dfu_sf.o obj-$(CONFIG_$(SPL_)DFU_WRITE_ALT) += dfu_alt.o obj-$(CONFIG_$(SPL_)DFU_VIRT) += dfu_virt.o +obj-$(CONFIG_$(SPL_)DFU_SCSI) += dfu_scsi.o diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c index 540d48fab77d..c81fa7724268 100644 --- a/drivers/dfu/dfu.c +++ b/drivers/dfu/dfu.c @@ -547,8 +547,11 @@ static int dfu_fill_entity(struct dfu_entity *dfu, char *s, int alt, return -1; } else if (strcmp(interface, "virt") == 0) { if (dfu_fill_entity_virt(dfu, devstr, argv, argc)) return -1; + } else if (strcmp(interface, "scsi") == 0) { + if (dfu_fill_entity_scsi(dfu, devstr, argv, argc)) + return -1; } else { printf("%s: Device %s not (yet) supported!\n", __func__, interface); return -1; @@ -643,9 +646,9 @@ int dfu_config_entities(char *env, char *interface, char *devstr) const char *dfu_get_dev_type(enum dfu_device_type t) { const char *const dev_t[] = {NULL, "eMMC", "OneNAND", "NAND", "RAM", - "SF", "MTD", "VIRT"}; + "SF", "MTD", "VIRT", "SCSI"}; return dev_t[t]; } const char *dfu_get_layout(enum dfu_layout l) diff --git a/drivers/dfu/dfu_scsi.c b/drivers/dfu/dfu_scsi.c new file mode 100644 index 000000000000..9f95194784c1 --- /dev/null +++ b/drivers/dfu/dfu_scsi.c @@ -0,0 +1,435 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * DFU SCSI backend (based on MMC backend). + * + * Copyright (C) 2012 Samsung Electronics + * author: Lukasz Majewski + * Copyright (C) 2024 Linaro Ltd. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static unsigned char *dfu_file_buf; +static u64 dfu_file_buf_len; +static u64 dfu_file_buf_offset; + +#define scsi_get_blk_desc(dev) ((struct blk_desc *)dev_get_uclass_plat(dev)) + +#define find_scsi_device(dev_num, scsi) blk_get_device(UCLASS_SCSI, dev_num, scsi) + +static int scsi_block_op(enum dfu_op op, struct dfu_entity *dfu, u64 offset, void *buf, long *len) +{ + struct udevice *scsi; + u32 blk_start, blk_count, n = 0; + int ret; + + ret = find_scsi_device(dfu->data.scsi.lun, &scsi); + if (ret < 0) { + pr_err("Device scsi %d - not found!", dfu->data.scsi.lun); + return -ENODEV; + } + + /* + * We must ensure that we work in lba_blk_size chunks, so ALIGN + * this value. + */ + *len = ALIGN(*len, dfu->data.scsi.lba_blk_size); + + blk_start = dfu->data.scsi.lba_start + (u32)lldiv(offset, dfu->data.scsi.lba_blk_size); + blk_count = *len / dfu->data.scsi.lba_blk_size; + if (blk_start + blk_count > dfu->data.scsi.lba_start + dfu->data.scsi.lba_size) { + puts("Request would exceed designated area!\n"); + return -EINVAL; + } + + debug("%s: %s dev: %d start: %d cnt: %d buf: 0x%p\n", __func__, + op == DFU_OP_READ ? "scsi READ" : "scsi WRITE", dfu->data.scsi.lun, blk_start, + blk_count, buf); + switch (op) { + case DFU_OP_READ: + n = blk_dread(scsi_get_blk_desc(scsi), blk_start, blk_count, buf); + break; + case DFU_OP_WRITE: + n = blk_dwrite(scsi_get_blk_desc(scsi), blk_start, blk_count, buf); + break; + default: + pr_err("Operation not supported\n"); + } + + if (n != blk_count) { + pr_err("scsi block operation failed"); + return -EIO; + } + + return 0; +} + +static int scsi_file_op(enum dfu_op op, struct dfu_entity *dfu, u64 offset, void *buf, u64 *len) +{ + char dev_part_str[8]; + int ret; + int fstype; + loff_t size = 0; + + switch (dfu->layout) { + case DFU_FS_FAT: + fstype = FS_TYPE_FAT; + break; + case DFU_FS_EXT4: + fstype = FS_TYPE_EXT; + break; + case DFU_SKIP: + return 0; + default: + printf("%s: Layout (%s) not (yet) supported!\n", __func__, + dfu_get_layout(dfu->layout)); + return -1; + } + + snprintf(dev_part_str, sizeof(dev_part_str), "%d:%d", dfu->data.scsi.dev, + dfu->data.scsi.part); + + ret = fs_set_blk_dev("scsi", dev_part_str, fstype); + if (ret) { + puts("dfu: fs_set_blk_dev error!\n"); + return ret; + } + + switch (op) { + case DFU_OP_READ: + ret = fs_read(dfu->name, (size_t)buf, offset, *len, &size); + if (ret) { + puts("dfu: fs_read error!\n"); + return ret; + } + *len = size; + break; + case DFU_OP_WRITE: + ret = fs_write(dfu->name, (size_t)buf, offset, *len, &size); + if (ret) { + puts("dfu: fs_write error!\n"); + return ret; + } + break; + case DFU_OP_SIZE: + ret = fs_size(dfu->name, &size); + if (ret) { + puts("dfu: fs_size error!\n"); + return ret; + } + *len = size; + break; + default: + return -1; + } + + return ret; +} + +static int scsi_file_buf_write(struct dfu_entity *dfu, u64 offset, void *buf, long *len) +{ + int ret = 0; + + if (offset == 0) { + dfu_file_buf_len = 0; + dfu_file_buf_offset = 0; + } + + /* Add to the current buffer. */ + if (dfu_file_buf_len + *len > CONFIG_SYS_DFU_MAX_FILE_SIZE) + *len = CONFIG_SYS_DFU_MAX_FILE_SIZE - dfu_file_buf_len; + memcpy(dfu_file_buf + dfu_file_buf_len, buf, *len); + dfu_file_buf_len += *len; + + if (dfu_file_buf_len == CONFIG_SYS_DFU_MAX_FILE_SIZE) { + ret = scsi_file_op(DFU_OP_WRITE, dfu, dfu_file_buf_offset, dfu_file_buf, + &dfu_file_buf_len); + dfu_file_buf_offset += dfu_file_buf_len; + dfu_file_buf_len = 0; + } + + return ret; +} + +static int scsi_file_buf_write_finish(struct dfu_entity *dfu) +{ + int ret = scsi_file_op(DFU_OP_WRITE, dfu, dfu_file_buf_offset, dfu_file_buf, + &dfu_file_buf_len); + + /* Now that we're done */ + dfu_file_buf_len = 0; + dfu_file_buf_offset = 0; + + return ret; +} + +int dfu_write_medium_scsi(struct dfu_entity *dfu, u64 offset, void *buf, long *len) +{ + int ret = -1; + + switch (dfu->layout) { + case DFU_RAW_ADDR: + ret = scsi_block_op(DFU_OP_WRITE, dfu, offset, buf, len); + break; + case DFU_FS_FAT: + case DFU_FS_EXT4: + ret = scsi_file_buf_write(dfu, offset, buf, len); + break; + case DFU_SCRIPT: + ret = run_command_list(buf, *len, 0); + break; + case DFU_SKIP: + ret = 0; + break; + default: + printf("%s: Layout (%s) not (yet) supported!\n", __func__, + dfu_get_layout(dfu->layout)); + } + + return ret; +} + +int dfu_flush_medium_scsi(struct dfu_entity *dfu) +{ + int ret = 0; + + switch (dfu->layout) { + case DFU_FS_FAT: + case DFU_FS_EXT4: + ret = scsi_file_buf_write_finish(dfu); + break; + case DFU_SCRIPT: + /* script may have changed the dfu_alt_info */ + dfu_reinit_needed = true; + break; + case DFU_RAW_ADDR: + case DFU_SKIP: + break; + default: + printf("%s: Layout (%s) not (yet) supported!\n", __func__, + dfu_get_layout(dfu->layout)); + } + + return ret; +} + +int dfu_get_medium_size_scsi(struct dfu_entity *dfu, u64 *size) +{ + int ret; + + switch (dfu->layout) { + case DFU_RAW_ADDR: + *size = dfu->data.scsi.lba_size * dfu->data.scsi.lba_blk_size; + return 0; + case DFU_FS_FAT: + case DFU_FS_EXT4: + ret = scsi_file_op(DFU_OP_SIZE, dfu, 0, NULL, size); + if (ret < 0) + return ret; + return 0; + case DFU_SCRIPT: + case DFU_SKIP: + return 0; + default: + printf("%s: Layout (%s) not (yet) supported!\n", __func__, + dfu_get_layout(dfu->layout)); + return -1; + } +} + +static int scsi_file_buf_read(struct dfu_entity *dfu, u64 offset, void *buf, long *len) +{ + int ret; + + if (offset == 0 || offset >= dfu_file_buf_offset + dfu_file_buf_len || + offset + *len < dfu_file_buf_offset) { + u64 file_len = CONFIG_SYS_DFU_MAX_FILE_SIZE; + + ret = scsi_file_op(DFU_OP_READ, dfu, offset, dfu_file_buf, &file_len); + if (ret < 0) + return ret; + dfu_file_buf_len = file_len; + dfu_file_buf_offset = offset; + } + if (offset + *len > dfu_file_buf_offset + dfu_file_buf_len) + return -EINVAL; + + /* Add to the current buffer. */ + memcpy(buf, dfu_file_buf + offset - dfu_file_buf_offset, *len); + + return 0; +} + +int dfu_read_medium_scsi(struct dfu_entity *dfu, u64 offset, void *buf, long *len) +{ + int ret = -1; + + switch (dfu->layout) { + case DFU_RAW_ADDR: + ret = scsi_block_op(DFU_OP_READ, dfu, offset, buf, len); + break; + case DFU_FS_FAT: + case DFU_FS_EXT4: + ret = scsi_file_buf_read(dfu, offset, buf, len); + break; + default: + printf("%s: Layout (%s) not (yet) supported!\n", __func__, + dfu_get_layout(dfu->layout)); + } + + return ret; +} + +void dfu_free_entity_scsi(struct dfu_entity *dfu) +{ + if (dfu_file_buf) { + free(dfu_file_buf); + dfu_file_buf = NULL; + } +} + +/* + * @param s Parameter string containing space-separated arguments: + * 1st: + * raw (raw read/write) + * fat (files) + * ext4 (^) + * part (partition image) + * 2nd and 3rd: + * lba_start and lba_size, for raw write + * scsi_dev and scsi_part, for filesystems and part + */ +int dfu_fill_entity_scsi(struct dfu_entity *dfu, char *devstr, char **argv, int argc) +{ + const char *entity_type; + ssize_t second_arg; + ssize_t third_arg = -1; + struct udevice *scsi; + struct blk_desc *blk_dev; + int ret; + char *s; + + if (argc < 2) { + pr_err("Need at least one argument\n"); + return -EINVAL; + } + + dfu->data.scsi.lun = dectoul(devstr, &s); + if (*s) + return -EINVAL; + + entity_type = argv[0]; + /* + * Base 0 means we'll accept (prefixed with 0x or 0) base 16, 8, + * with default 10. + */ + second_arg = simple_strtol(argv[1], &s, 0); + if (*s) + return -EINVAL; + if (argc >= 3) { + third_arg = simple_strtoul(argv[2], &s, 0); + if (*s) + return -EINVAL; + } + + if (scsi_scan(false)) { + pr_err("Couldn't init scsi device.\n"); + return -ENODEV; + } + + ret = find_scsi_device(dfu->data.scsi.lun, &scsi); + if (ret < 0) { + pr_err("Couldn't find scsi device no. %d.\n", dfu->data.scsi.lun); + return -ENODEV; + } + + blk_dev = scsi_get_blk_desc(scsi); + if (!blk_dev) { + pr_err("Couldn't get block device for scsi device no. %d.\n", dfu->data.scsi.lun); + return -ENODEV; + } + + /* if it's NOT a raw write */ + if (strcmp(entity_type, "raw")) { + dfu->data.scsi.dev = (second_arg != -1) ? second_arg : dfu->data.scsi.lun; + dfu->data.scsi.part = third_arg; + } + + if (!strcmp(entity_type, "raw")) { + dfu->layout = DFU_RAW_ADDR; + dfu->data.scsi.lba_start = second_arg; + if (third_arg < 0) { + pr_err("raw requires two arguments\n"); + return -EINVAL; + } + dfu->data.scsi.lba_size = third_arg; + dfu->data.scsi.lba_blk_size = blk_dev->blksz; + + /* + * In case the size is zero (i.e. scsi raw 0x10 0), + * assume the user intends to use whole device. + */ + if (third_arg == 0) + dfu->data.scsi.lba_size = blk_dev->lba; + + } else if (!strcmp(entity_type, "part")) { + struct disk_partition partinfo; + int scsipart = second_arg; + + if (third_arg >= 0) { + pr_err("part only accepts one argument\n"); + return -EINVAL; + } + + if (part_get_info(blk_dev, scsipart, &partinfo) != 0) { + pr_err("Couldn't find part #%d on scsi device #%d\n", scsipart, + dfu->data.scsi.lun); + return -ENODEV; + } + + dfu->layout = DFU_RAW_ADDR; + dfu->data.scsi.lba_start = partinfo.start; + dfu->data.scsi.lba_size = partinfo.size; + dfu->data.scsi.lba_blk_size = partinfo.blksz; + } else if (!strcmp(entity_type, "fat")) { + dfu->layout = DFU_FS_FAT; + } else if (!strcmp(entity_type, "ext4")) { + dfu->layout = DFU_FS_EXT4; + } else if (!strcmp(entity_type, "skip")) { + dfu->layout = DFU_SKIP; + } else if (!strcmp(entity_type, "script")) { + dfu->layout = DFU_SCRIPT; + } else { + pr_err("Memory layout (%s) not supported!\n", entity_type); + return -ENODEV; + } + + dfu->dev_type = DFU_DEV_SCSI; + dfu->get_medium_size = dfu_get_medium_size_scsi; + dfu->read_medium = dfu_read_medium_scsi; + dfu->write_medium = dfu_write_medium_scsi; + dfu->flush_medium = dfu_flush_medium_scsi; + dfu->inited = 0; + dfu->free_entity = dfu_free_entity_scsi; + + /* Check if file buffer is ready */ + if (!dfu_file_buf) { + dfu_file_buf = memalign(CONFIG_SYS_CACHELINE_SIZE, CONFIG_SYS_DFU_MAX_FILE_SIZE); + if (!dfu_file_buf) { + pr_err("Could not memalign 0x%x bytes\n", CONFIG_SYS_DFU_MAX_FILE_SIZE); + return -ENOMEM; + } + } + + return 0; +} diff --git a/include/dfu.h b/include/dfu.h index fa1918cd6635..d7f365a7f1ce 100644 --- a/include/dfu.h +++ b/include/dfu.h @@ -23,8 +23,9 @@ enum dfu_device_type { DFU_DEV_RAM, DFU_DEV_SF, DFU_DEV_MTD, DFU_DEV_VIRT, + DFU_DEV_SCSI, }; enum dfu_layout { DFU_RAW_ADDR = 1, @@ -98,8 +99,20 @@ struct sf_internal_data { struct virt_internal_data { int dev_num; }; +struct scsi_internal_data { + int lun; + + /* RAW programming */ + unsigned int lba_start; + unsigned int lba_size; + unsigned int lba_blk_size; + + /* FAT/EXT */ + unsigned int dev; // Always 0??? + unsigned int part; +}; #if defined(CONFIG_DFU_NAME_MAX_SIZE) #define DFU_NAME_SIZE CONFIG_DFU_NAME_MAX_SIZE #else @@ -126,8 +139,9 @@ struct dfu_entity { struct nand_internal_data nand; struct ram_internal_data ram; struct sf_internal_data sf; struct virt_internal_data virt; + struct scsi_internal_data scsi; } data; int (*get_medium_size)(struct dfu_entity *dfu, u64 *size); @@ -516,8 +530,20 @@ static inline int dfu_fill_entity_virt(struct dfu_entity *dfu, char *devstr, return -1; } #endif +#if CONFIG_IS_ENABLED(DFU_SCSI) +int dfu_fill_entity_scsi(struct dfu_entity *dfu, char *devstr, + char **argv, int argc); +#else +static inline int dfu_fill_entity_scsi(struct dfu_entity *dfu, char *devstr, + char **argv, int argc) +{ + puts("SCSI support not available!\n"); + return -1; +} +#endif + extern bool dfu_reinit_needed; #if CONFIG_IS_ENABLED(DFU_WRITE_ALT) /** From patchwork Mon Jun 3 12:49:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 801246 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp1897554wrw; Mon, 3 Jun 2024 05:49:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUyrZQVHenPCbD5pFzwRgNyrOUdOhmYNUJSRxox5GC/N4avm+yt+wIf5gosbMMAYHq/mAzNx4FPm0VZ4kmKmU+9 X-Google-Smtp-Source: AGHT+IFq56WMX+mE+CcyKnM+652fkglbYEryh9MGqpUWhYhsDWTaPrriJTlJhVxRkZ5q/luEjhh1 X-Received: by 2002:a17:906:1b5b:b0:a68:c672:9ea9 with SMTP id a640c23a62f3a-a68c672a238mr358607266b.28.1717418975242; Mon, 03 Jun 2024 05:49:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717418975; cv=none; d=google.com; s=arc-20160816; b=mbxVQ543JJi8UUhT3uAxl84/budjxnJJU+GMcFVdoPc1cjuK8CiN9J8mWJ7000VN1A jiavd/ljkloFMhlRRdhQ3Ab6WSr2MRCkUGDC450hheyB4gRz9NfvfYdxHPhnODKJyy7X ph8I44SospFIhnhajubBmWuMAaqaKft0b5Bjj3mD1iDrPZEHr7iP5N3mLJFJPhMDHNBC hk2MC+beit800ctAtZweEF0GbzY6DUOg9rZfCYZDbMhrY4fk0V+QU294/M4ia4JI0qnZ obOufu5qXRGcPoqRIxBaIvHAeBamZGmKdMwZJRpW1L/5m+Jew+9m7z4W0/Ydp0V7BOe+ 9wvw== 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:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=TsLrwe77MphWY0YcELWYdgLVdM7F1B/rZUAF0i5P55I=; fh=VCc3BUTJ2y6IUymk5X4lcQatZaxz97N2bsHppRiXonI=; b=FtHlrZ35Bd8pt2OJnUqnq2emB25pCJ4Yp23NMMasTOyHB4xwtOT0J0GJxRuAe/2uB1 QEfP7/aEnJTXB+a8ZeNjkWRal7jlODKq+MGZM1y9hbmzn92lt/fkPHR42NJ/nYJHEhEK IjCJhKYD7B2YYfU9dz8disevP24EzFRtYy3tgnb6KDfTWhEbSHXTiZWJFY3wy0Ra6Qbr dhk7k5G4WW8ClPL/6aJcUIfe+wgJ2Xe56wLdYsPY+HC6+NcvYha2Sf9HkBppu0Q50RK7 lH56CEcDFC86eMq9XpEWHSs0gwBFuOXLyg+4NYPMXgC6MraKzPirRbAwymBRACBJp11I b08A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mMxGUfit; 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 a640c23a62f3a-a68a251d384si296993966b.27.2024.06.03.05.49.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:49:35 -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=mMxGUfit; 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 09310882AF; Mon, 3 Jun 2024 14:49: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=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="mMxGUfit"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3918088324; Mon, 3 Jun 2024 14:49:24 +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-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (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 E5BAC882AC for ; Mon, 3 Jun 2024 14:49: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=caleb.connolly@linaro.org Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a6302bdb54aso565509466b.0 for ; Mon, 03 Jun 2024 05:49:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717418961; x=1718023761; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=TsLrwe77MphWY0YcELWYdgLVdM7F1B/rZUAF0i5P55I=; b=mMxGUfitaKrJHgT/F8E9MzOaUXgjWjV1DjrSPOvmuAyOEY682awRpf4lWQ16pvzdCi Y3vOHlxzS+dO20458wkp1lYJIqL01hacoI6G6Tv/YtKczcSgLLhPBj4naV/dy0plExq6 2sup+zQs+ZJure3Pfex6dtlXfkr1jiW068M+d6Y++uZbXOOiKBBwOcdUVuVE8XtWTlvU ceFK9cICJDWYj564OzEfk19hj+jbmMy2HwMUdEAQx5OBq+uMpqpq/4FaxIdLtY95N/Vb Hhd+FipFfv1PFDfokFKGp526MI9OHjKR/ag45v8cTe/3UTTIvtTuCWOf2XTt8E64y/7f LEOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717418961; x=1718023761; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TsLrwe77MphWY0YcELWYdgLVdM7F1B/rZUAF0i5P55I=; b=Rr0/abfA3FwtAv8LjxqfZd5DL9U2gKxoIB06HKtgkDk0rhW2dtKe0ztG8YwLv5bhoJ V5dlD0sExTGgfmNJJ+W1sxMfVCFWEdEPnhW1+Ln/cHgVbctVT5ryhunF1KIJqD1OYVpO Q6mumZPEeL9Li1GrGtaK0pHQi+FsBX3RQfK2koYGscmCExiGfUf3I4WPTevOfn/p26pA wYYVfe8I3LlbQZnyykSu2rVA539pCBt3KL5DkOLvLyfW+loHf+Lgff5YGj+Wcb2fw+P2 BMl8AeYmg44nGBDP6FS1hiGG6B08gqdGBslNBF68EIVvIlWRuKIR63hkIyGb8b815LbM 6NCw== X-Forwarded-Encrypted: i=1; AJvYcCWWOikZ0kfnlM3nFlazpCUQxRt28YAvT6V3+NRDpflyUpUGHlm9EGt5nqfvq2MMEvseRdLKzkA3enNSBdVPVXNAB0YKWw== X-Gm-Message-State: AOJu0Yx2lKYROao3y9vdl1X8HIoNKlGcurelOMf+bUcvdlhJvoadae3F IiwCrVOi8LvzmjYsJWQYTQZheR1ZTN6xQandomxjFea3IJhL7LHcNg9RRE1X6wU= X-Received: by 2002:a17:906:27ce:b0:a68:f8b9:ffa3 with SMTP id a640c23a62f3a-a68f8ba0035mr210645166b.46.1717418961361; Mon, 03 Jun 2024 05:49:21 -0700 (PDT) Received: from [192.168.0.113] ([2a02:8109:aa0d:be00::8090]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a691cd07c72sm98917066b.170.2024.06.03.05.49.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:49:20 -0700 (PDT) From: Caleb Connolly Date: Mon, 03 Jun 2024 14:49:17 +0200 Subject: [PATCH v3 2/8] disk: expose partition type flags MIME-Version: 1.0 Message-Id: <20240603-b4-qcom-capsule-updates-v3-2-fe2e083289ec@linaro.org> References: <20240603-b4-qcom-capsule-updates-v3-0-fe2e083289ec@linaro.org> In-Reply-To: <20240603-b4-qcom-capsule-updates-v3-0-fe2e083289ec@linaro.org> To: Tom Rini , Simon Glass , Lukasz Majewski , Mattijs Korpershoek , Caleb Connolly , Neil Armstrong , Sumit Garg Cc: Ilias Apalodimas , u-boot@lists.denx.de, u-boot-qcom@groups.io X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1946; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=6r6o+LARxoUfqXvO6HRYgyNJUDpuL2kNJVwCc7gQ/4M=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmXbvNAJ2Jfm3J8hw8bYT0Lk+zvfwvCoq6WP61l 80Pu7qH7cyJAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZl27zQAKCRAFgzErGV9k thuZD/wNvsSqR0r0EOrVxGpHjhu+ExvMV1GvqYbcxOmUu3ipp/4ZkbDzdyoBnLUhihQJWnLHcTB tCiKR2dLWottkBsUZ9zw11xnzhSmtFk/PDpTt8els64QIlPMIroz27t8PbBwN5PJj4aeMFn55IJ XPk21sloQfR2JlExPLlsGtICzctsCMkMF5Wn+w/3eNluCfETJAJk+oK7BMl/PrG3lMlA/TT6San lDRplKOaE5wlPgLWHwicnsmE9PL/e2AoqH8JPU6Vxu7uoNSvi+RSzJaEGN3IVDgr3U5xbjkEQ/+ FZptqghTY9eQT1H8FxiTVsxPpngcLgiPYId86ksz3JSq39DM/mB3kjcNNy498Z0wWZxU+ncNwyE nQa4Y4YiA9eJWUV+Qvjrf+0Cpd2p/5dGUFoKAkzRAu95L/vZJqyd6DljZp0jMC7SNkZNVo+YQjT mVgm3iP4iScigoh+eM4AK/XN6dgfzxztvq5f6K95iwPjrP0Bu10OZfEAHngOwvK+gnyvAD1oACB PRDudCOG6RD3h23tFyK0dHZYpKHFGj7dy6RMj4fOf18EIckQ9LGo4HBCy+GQws2/0rgZf/JJMHT rQ0WLbnNOko97BXopAI9xe8HRw/lKy/0qH0+CYqZwFa2op2pYQ7qIX0wTA9sUtLwzljM8scAgqB GFB1UxshE5rQoOA== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 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 GPT partition tables include two bytes worth of vendor defined attributes, per partition. ChromeOS and Qualcomm both use these (with different encoding!) to handle A/B slot switching with a retry counter. Expose these via the disk_partition struct so that they can be parsed by the relevant board code. This will be used on Qualcomm boards to determine which slot we're booting on so that we can flash capsule updates to the correct one. Reviewed-by: Ilias Apalodimas Reviewed-by: Mattijs Korpershoek Signed-off-by: Caleb Connolly --- disk/part_efi.c | 1 + include/part.h | 1 + 2 files changed, 2 insertions(+) diff --git a/disk/part_efi.c b/disk/part_efi.c index b1a03bd165e0..bde4adcfa087 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -291,8 +291,9 @@ int part_get_info_efi(struct blk_desc *desc, int part, snprintf((char *)info->name, sizeof(info->name), "%s", print_efiname(&gpt_pte[part - 1])); strcpy((char *)info->type, "U-Boot"); info->bootable = get_bootable(&gpt_pte[part - 1]); + info->type_flags = gpt_pte[part - 1].attributes.fields.type_guid_specific; if (CONFIG_IS_ENABLED(PARTITION_UUIDS)) { uuid_bin_to_str(gpt_pte[part - 1].unique_partition_guid.b, (char *)disk_partition_uuid(info), UUID_STR_FORMAT_GUID); diff --git a/include/part.h b/include/part.h index 32ee40488563..afae51f1b933 100644 --- a/include/part.h +++ b/include/part.h @@ -68,8 +68,9 @@ struct disk_partition { * PART_BOOTABLE the MBR bootable flag is set * PART_EFI_SYSTEM_PARTITION the partition is an EFI system partition */ int bootable; + u16 type_flags; /* top 16 bits of GPT partition attributes */ #if CONFIG_IS_ENABLED(PARTITION_UUIDS) char uuid[UUID_STR_LEN + 1]; /* filesystem UUID as string, if exists */ #endif #ifdef CONFIG_PARTITION_TYPE_GUID From patchwork Mon Jun 3 12:49:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 801248 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp1897692wrw; Mon, 3 Jun 2024 05:49:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWUub4L92h3LS0zUIUn2nkGDN/rmm9DoA3NUFPlWPOHxR6bNnzgPtKKLZW9nV2cKZLOPGjDK2WAnLwoV/sFHcmE X-Google-Smtp-Source: AGHT+IEXb8zYVyBfPuXY6otHW/Tm+XOTQk0J/i/sV2Ohvc8IJoSDR50XIgJvt1eqFJsGstqcXVej X-Received: by 2002:a05:6512:1152:b0:52b:9c8a:735a with SMTP id 2adb3069b0e04-52b9c8a74fcmr1514221e87.40.1717418995828; Mon, 03 Jun 2024 05:49:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717418995; cv=none; d=google.com; s=arc-20160816; b=MT1HwZhSPXcDJRleDlaRxvh5VQbCMxsm9LBJrt7STgiibDmvCtMGmtSobUax587GMF ekI22SgNEJquHCTpXpkF8f5exykaoagduMY86VQvGI35bVQP/pKzetbFFQfgXtalxHPJ Qb59uc9SnWZOPWOKK35R/o679RKONzptLpHhv4gjqPBRsu1bwQrFSp4wOXr4jhorobKw fLTT2IEVy93c3TPOYE8F+CIDixn60JB2Kvda3uRdOeuX9pOyA5B5szMhyGGSvbIdNY6u ujS7edKi6ft0q8Wr4i8Z5MioLyaLPwIIm5Egb3YbhWylsOoIT1tDd04/L7n/bzk8nYwL V0fg== 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:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=77CYVgJKcDJpsI1Ed1gMNCRl5Q4qcCYKv+bhM8jtCsI=; fh=Sk9+/xlSJ4a9yPS7/zwMGAR8EN18L+XfSKBong5jsQs=; b=uwMk5lmHMgDXiYNiP7wfo4CJyb4oDH/dUMLvPjXg3yBICsu3Zuo3sz9JNPwNzHO7Ux in5LoYjX5kEnmS34h+5eMn+raWPzhKqQVPTiv69oLxlI8yUUKHiZu4wMfqUp2ucPzRhi 2Iz4EIaKux1G14UMNuDcGRwmQlxGJI2YAvlVF1w4GevmRZSpsLisrjUQ4ikJmJVhSARx dZ2POYySioW0nibT0cFK9sm106RdSeFhkRvaBVxv/E03EjzuV6Q9Iiu6hiEXaYkuErni tx55lyHrWiDz96IW4uU4i/BbvXWGjkgEi9S6lfBS6cG/bvk+dehgSUjGFJUpu0CjAKVR Gexw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tJZYM7lO; 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 4fb4d7f45d1cf-57a31c62d20si3966419a12.227.2024.06.03.05.49.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:49:55 -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=tJZYM7lO; 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 C886588245; Mon, 3 Jun 2024 14:49: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=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="tJZYM7lO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D956A88245; Mon, 3 Jun 2024 14:49:24 +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-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (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 EBFD387FC1 for ; Mon, 3 Jun 2024 14:49: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=caleb.connolly@linaro.org Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a69024f2433so138234966b.2 for ; Mon, 03 Jun 2024 05:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717418962; x=1718023762; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=77CYVgJKcDJpsI1Ed1gMNCRl5Q4qcCYKv+bhM8jtCsI=; b=tJZYM7lO5H3Ka0GU8Rnau/T0B5k3psvDm8P8wjQq2rjtZUkSdduzttH/7eYiQ5B5Rf ZOMxEfl+Unt7zq6/cOU0lbjaduz9jul7yIJeKvMWYTrwTCo1z9vRmOP/H76Jjh4ksKVe 1dkaqM6kYtp8E6AaDPL4bTBcm0zGjP24FjVLBWZnVBnh18URNGtSE8kfBkZsKOO38ksh qpPN7LJz0p+UJ/2VTOiWNU+xX9VIR4wPtt4sISHKQnER/4iGD3TgIj1Z+RdkVcGo5ElI bPLhzQZqTVSv27vk0hRXuS98Z85RKZdJJAp90QTeBbtD/qona+2x/106MpQVyIpTxg02 wMFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717418962; x=1718023762; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=77CYVgJKcDJpsI1Ed1gMNCRl5Q4qcCYKv+bhM8jtCsI=; b=ARhWrd1nUFi5NiVrRP78rvNIzghrIUAl4Poyfff72p6d39sL2pTC5qCjFlq12V6GpL j7sGhXfXzPat4ydlS2yzcWNAwzz2HQq155Vhm3ZbWByTuUXKm3XRnBlon9ASktu2xzTq k8xGxELOtuCBUB7HMkIUTgKbIFgC1wGnoYWWbEJLR0SN5UFwAwVze01gKj4UXzRIm+ww UyeUPp8YkuFooGs2QbuOp5k+JgZqG9WTuQNr2JD2b86MQVCH4J7YyHLviE24BssOCPIR STflaieXFjL2/Hm6W8gnz3+Zur7Mc+kCUaDOrK3X/xMD+312Ttq/putE8nf/DAjyGtJU msOg== X-Forwarded-Encrypted: i=1; AJvYcCV/igxrp6VdNAc38BkteKyCe5UlNhCfQ2OyqCYs7QKSoeUens7nlpFq3zOC7pbkKK91sfLX2iFbVWksgtP2jKA92kVj2Q== X-Gm-Message-State: AOJu0YzzFQGt9G8pRY1L17uPDHYw9JqiXRvGSEDQa103338zEntJgHU4 +BX2lC4LzogPHBFwvUvYb0IGB7KtSagZXtBLSF7gEGuox5BkM2arbyoIzmiFbMU= X-Received: by 2002:a17:906:cd10:b0:a59:a356:3f6d with SMTP id a640c23a62f3a-a6822049b1dmr527124366b.54.1717418962412; Mon, 03 Jun 2024 05:49:22 -0700 (PDT) Received: from [192.168.0.113] ([2a02:8109:aa0d:be00::8090]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a691cd07c72sm98917066b.170.2024.06.03.05.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:49:21 -0700 (PDT) From: Caleb Connolly Date: Mon, 03 Jun 2024 14:49:18 +0200 Subject: [PATCH v3 3/8] mmc: msm_sdhci: work around a bug when writing MIME-Version: 1.0 Message-Id: <20240603-b4-qcom-capsule-updates-v3-3-fe2e083289ec@linaro.org> References: <20240603-b4-qcom-capsule-updates-v3-0-fe2e083289ec@linaro.org> In-Reply-To: <20240603-b4-qcom-capsule-updates-v3-0-fe2e083289ec@linaro.org> To: Tom Rini , Simon Glass , Lukasz Majewski , Mattijs Korpershoek , Caleb Connolly , Neil Armstrong , Sumit Garg Cc: Ilias Apalodimas , u-boot@lists.denx.de, u-boot-qcom@groups.io X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1043; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=xiqItTSGGlbEaRHj7FGeYLvraoWKv5JTGiseJ0yRN2M=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmXbvNZbkd7s/eLfMaDiDxTG6X3AL3iDrBHdBHK ZmY2qfEyGuJAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZl27zQAKCRAFgzErGV9k tn0PD/9lkjImSKNN6fnnulQy542jwypvIUXnslWxFew54cHKd41dad2RxdXn/JuMiRjGBjIk70I cPsiA587D+CfJvtZmoXiDkjEbVC9ut3Iocgb+ob6CHFLlauO54ahDHgDNjhoKuvLtIVfSh0/KS/ EB5DCgW+CghwqCF8J1Lsx2/RJtt6LG+0zRSwMnBtashYkvBNDDz5Rl6djS4xprtHgwNC5nPTZ/J UdFJYUyA3UlgEXri4JrtduzdHRsPz+jjUkTqNm6XkITuAJi1fpdOXWgDDBq0Eb/CbScU0iTtJXp uP1AKea4k+NhwJq3UnTJrqX1FgSR+Kh6wlnSXFLo7Tv10uwNXqOiPTvRHzu38HtFgLa7+9eAiIV jG5sNd16kBZzsQRJ+vQRqIvvf5twVtrkpnVYVDNBJSo27SEq98A7atLJLcwPj0F4fMYroXREjKu ttihnm1cn3SFnsqvmXjXfbieNzEbn7PhOlq/oHV1FprZifF4OLuC0l7aSHpp2JKyggN7PB1oeJv C9fZ0NxQoVMo/aHuVas8rLdkKRLNSBhW8q3VQwmJ2G807lwWT2Kc6uVilDw1cY1Q900z2UQUTN1 pP5rwIIqfii3JuHduxaN4a6twAyoGDwwAJ/9FuhBTqVXW38O9s3QMyZrrA0/SDMpra5rAaCGzsM i3q/VvVUAMHM7nQ== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 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 For some unknown reason, writes of larger than 1 block always fail with a checksum error on Qualcomm v5 controllers. Until this is resolved, work around the issue by setting b_max to 1 for these controllers. Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- drivers/mmc/msm_sdhci.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c index 4ce0de6c47d8..fc3e8d101b6e 100644 --- a/drivers/mmc/msm_sdhci.c +++ b/drivers/mmc/msm_sdhci.c @@ -195,8 +195,15 @@ static int msm_sdc_probe(struct udevice *dev) return ret; host->mmc->priv = &prv->host; upriv->mmc = host->mmc; + /* + * FIXME: v5 controllers have a bug in U-Boot that causes all writes + * greater than 1 block to fail. Work around this by setting b_max to 1. + */ + if (var_info->mci_removed) + plat->cfg.b_max = 1; + return sdhci_probe(dev); } static int msm_sdc_remove(struct udevice *dev) From patchwork Mon Jun 3 12:49:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 801249 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp1897758wrw; Mon, 3 Jun 2024 05:50:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXjhNe+eHnvyWvW0xmbhiC4SEVR9LXwUoQU3SbZUWTiDUPKwOmhTE1asO0U0qLpzDoMl50En5dpBcDnCt9uBckS X-Google-Smtp-Source: AGHT+IEJX88vVQ9bRqgAKAQXVj/L7keVdUhAWwLwPx5HMWb3bQI8iXT1+zWuGyiP8RiBMc3KEACA X-Received: by 2002:a17:906:1f0f:b0:a66:7b79:3574 with SMTP id a640c23a62f3a-a681fc5c84amr658384466b.12.1717419007912; Mon, 03 Jun 2024 05:50:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717419007; cv=none; d=google.com; s=arc-20160816; b=g6KvCpjE9lj+mCuqwjpnzWe73wDdYRMDOWb7+XNuT55evuM/oqwiGR1ndHwdLSYIZH PIrVPY8Vd2FeLHiBfYKsSCD38DI5rWNW8utJF4ukYLGk/KXYfzlESJCq6gdqMjJIuyHO viexeIlHE9c7cYNeuOUP+JCNr3idf1N2p1SuuBo7WivNVOr4VALH+R1bKFGS0/AP/gcL 3CN/5F7EYnY4CBOryGynsQWuKXzs2wmQpB5yPk/n+zcgYPD9fn0/reTnObsMiLeOAh7I Ff+Sryd7XG2WoQJ349os5yxQwSLxlUDKYyNt6JUQV4V6/7IZwptyLk3Reg39jP6aBSCO OFnw== 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:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=86mUaD1/vTfxTWu9OPghZY4V0R/+KpfioAzFBHX9LDw=; fh=eROptrb18wdmU0ltmjxBcdbvPHShba6gw8foie8+6sM=; b=p4QqHUSPF1f1GSpfmwgGiDOupg1nXDifM5c2zmQPu9CrpX/9koj1WxoAhattstHU0h m8180O0ZzvwAhg2Id3kgd95oEP1ywSoiepjVZHcqIEJmYSVC9OShaK4e+MkZAAHp3Pz2 pNKFYst6gvqRnaDQ1ar1k/V8vzvmHDumoF/idFN/o5Thfc28bqKbknxf8tIC+D5tTKsH Jq3C9ejumJxElVF/tMTxZh2QubjC3cgyIW4AFVHgJorhbUAMMh/c2iBGS1xnrnjPmR+G Hv+Tq8RhUPTg/FjUaONz19lQTIwzADYaEMaNycgCWZnwZzdX/CEd/865cFFJ3Q/gzPEC 6aXg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LA9+Ubin; 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 a640c23a62f3a-a68e20badccsi196825266b.519.2024.06.03.05.50.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:50:07 -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=LA9+Ubin; 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 36527882EF; Mon, 3 Jun 2024 14:49:28 +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="LA9+Ubin"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3FE9E88324; Mon, 3 Jun 2024 14:49: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-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) (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 F2F8A8830C for ; Mon, 3 Jun 2024 14:49: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=caleb.connolly@linaro.org Received: by mail-ej1-x642.google.com with SMTP id a640c23a62f3a-a68a4a9946cso205216866b.1 for ; Mon, 03 Jun 2024 05:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717418963; x=1718023763; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=86mUaD1/vTfxTWu9OPghZY4V0R/+KpfioAzFBHX9LDw=; b=LA9+UbinOxcsNlyTsWBJbgkZkdsxG17vSMXJ0Rd8qA1fFEO7r4ruEiJnA9Swc75J6W fjj9B/LqXkdw8ESk3ZcyZ8bObCrU7ITNHXgQeInZrWXgMfvdvjOVvrdg7iCM2Iylc77+ NzVxEafem+T7uQR3OG9A/o1w5WbhA5frXbp+Ino6Hd8COSL/a3n+sJYQVaRQ8pTNTIK/ dUGLEi+h/r4xiYpJSA9jZf08sZtHI/PnzgTZ2n0h0HML/W2O7DByD4AfL/vSBHzcqaVt dq55bxCel/uMehIaK0KVHKnpJnS/fr4IxZBgP+7GRkThJQwWVuoCBu0f2VXROK2lvfXw K/Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717418963; x=1718023763; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=86mUaD1/vTfxTWu9OPghZY4V0R/+KpfioAzFBHX9LDw=; b=t4PrOkWf3YUTLvi64unsXLmgSc2RXnOH4tCFTAAlIaWaOIkwePrTlaSADN/hosb166 n0Jeddrt999yKLTc7fEQZ0/JvADSuHk8zZPGx+6VMrq18YCCYsOAfM2NvdKHe0UJNJcm /VGp43kuANepbNSxNV+Sez9s7MuDhvVqZZBnojaYXOrsx/swQvywumnhEbyKU7jmfkKC baHMMNE7EL6mBIs2akD4kexGlQX1CiWDClzpuog7WG6qZJt7jE5aDlO3eb0XQPuCb50e oQuUGhNSGZQusq8JAuCt21rgK6c6gxWCMSrmyqTGQvyIonmaOcMSxvbj2r27XfIkQXob r5Aw== X-Forwarded-Encrypted: i=1; AJvYcCUu/NAKEFnkBQz91BR+2ftOCDPY39VTx71UJ3aqB0cdB5AlhnR3i6S9rDehG+BQXYdEYwO4FZZ3gNeXVb/5gijlmx4UgA== X-Gm-Message-State: AOJu0Yw8sFbuu62ybeY9McGQOrgdCz5AE9VI3w+wwmlwOFgdiJ2uMA7P OFfCAtL5HVG+HuOHz3OTVrp0zCSmarTRN8zj8o1ekYg1oRB6S4lHiqq0xKGkghM= X-Received: by 2002:a17:906:f90b:b0:a68:c71e:f3ab with SMTP id a640c23a62f3a-a68c71ef44bmr397432066b.22.1717418963452; Mon, 03 Jun 2024 05:49:23 -0700 (PDT) Received: from [192.168.0.113] ([2a02:8109:aa0d:be00::8090]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a691cd07c72sm98917066b.170.2024.06.03.05.49.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:49:23 -0700 (PDT) From: Caleb Connolly Date: Mon, 03 Jun 2024 14:49:19 +0200 Subject: [PATCH v3 4/8] mach-snapdragon: implement capsule update support MIME-Version: 1.0 Message-Id: <20240603-b4-qcom-capsule-updates-v3-4-fe2e083289ec@linaro.org> References: <20240603-b4-qcom-capsule-updates-v3-0-fe2e083289ec@linaro.org> In-Reply-To: <20240603-b4-qcom-capsule-updates-v3-0-fe2e083289ec@linaro.org> To: Tom Rini , Simon Glass , Lukasz Majewski , Mattijs Korpershoek , Caleb Connolly , Neil Armstrong , Sumit Garg Cc: Ilias Apalodimas , u-boot@lists.denx.de, u-boot-qcom@groups.io X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=7614; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=EpMPrXl1BpsSBb6KK0OxGXPTs1+7bPTJNY03PRK3KtI=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmXbvN5AJNOmj7inzXIoNbY2Kmtaq1AznxMoEBO n7vsHtDr6SJAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZl27zQAKCRAFgzErGV9k ts7XEACCiJG/x46nluEMDqnp3sfCoWVbzadOL4+h9MoHZutOQY3ojes7CapE9Xi8kowloa4WhSu fdAL8VIUjl9r1TROy3VMbPXjnWviPuMBCVwWWj+vYyi4QgvAo0Ho0c88Eg/+axtcocrnEVk+nF6 IhEIixQpIOZATMyIEA4CRDzJL5jn9G/v7lmZPzcT9nPmjoHhcxZeVAPLNq2mdkUrg6nIPxTL7Th Dpe6vCZomSL84blGNGmapHpvHPgp9GreGouapnydKUS8knGz4WCp5kEnOwsJheyorwlaSXwYoNa L9Ab2lUGG+6UH3s6VouUK4jbc9VS8IWskqOMyAvXzW4FgutyywDO62p/NYnryMXFSl/9E+v5Ybe Ar27OqnA7u5lsXxnnRs6V8run27Sou56NUyuLNVQErb2j8gFO3M0uQpJGhkRlM7Xe3/Iaa1vI8k W+S/Q9WrNLuOtC6A5DhK95YOoZ7PPUkmvEsWbIaylutDr1d1LOn83C213sj60d7E0IT83H+dh+q JpGlhT7u7xUpodOCGYstG/tMN0zI1MIBb1/UrH3Lu7wGprqd2j3Nt3Xx7CkuRemXWb0mQg5RMwk CkewwNaB66CpJ7MHMO86xjaYvF3wxARemUGupbbhxpYXg6qXqzFqdGCQzyqNuTk7WYiMbngVh0w JaxNgXvAmwOix0w== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 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 Qualcomm boards flash U-Boot to the boot partition, implement support for determining which slot U-Boot is running from and finding the correct boot partition for that slot and configuring the appropriate DFU string. For now this only supports boards with SCSI/UFS storage where U-Boot is flashed to the boot partition, and only U-Boot itself is updated. In the future we may also support updating additional firmware components (tz, hyp, xbl) as well as having U-Boot installed to other partitions (e.g. as a first-stage bootloader). Signed-off-by: Caleb Connolly Acked-by: Ilias Apalodimas --- arch/arm/mach-snapdragon/Makefile | 1 + arch/arm/mach-snapdragon/board.c | 3 + arch/arm/mach-snapdragon/capsule_update.c | 147 ++++++++++++++++++++++++++++++ arch/arm/mach-snapdragon/qcom-priv.h | 6 ++ include/configs/qcom.h | 5 + 5 files changed, 162 insertions(+) diff --git a/arch/arm/mach-snapdragon/Makefile b/arch/arm/mach-snapdragon/Makefile index 7a4495c8108f..343e825c6fdd 100644 --- a/arch/arm/mach-snapdragon/Makefile +++ b/arch/arm/mach-snapdragon/Makefile @@ -2,5 +2,6 @@ # # (C) Copyright 2015 Mateusz Kulikowski obj-y += board.o +obj-$(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) += capsule_update.o obj-$(CONFIG_OF_LIVE) += of_fixup.o diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c index b439a19ec7eb..c4a3394706e6 100644 --- a/arch/arm/mach-snapdragon/board.c +++ b/arch/arm/mach-snapdragon/board.c @@ -299,8 +299,11 @@ int board_late_init(void) configure_env(); qcom_late_init(); + /* Configure the dfu_string for capsule updates */ + qcom_configure_capsule_updates(); + return 0; } static void build_mem_map(void) diff --git a/arch/arm/mach-snapdragon/capsule_update.c b/arch/arm/mach-snapdragon/capsule_update.c new file mode 100644 index 000000000000..505f5bf5ae07 --- /dev/null +++ b/arch/arm/mach-snapdragon/capsule_update.c @@ -0,0 +1,147 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Common initialisation for Qualcomm Snapdragon boards. + * + * Copyright (c) 2024 Linaro Ltd. + * Author: Caleb Connolly + */ + +#define pr_fmt(fmt) "QCOM-FMP: " fmt + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qcom-priv.h" + +struct efi_fw_image fw_images[] = { + { + .image_type_id = QUALCOMM_UBOOT_BOOT_IMAGE_GUID, + .fw_name = u"QUALCOMM-UBOOT", + .image_index = 1, + }, +}; + +struct efi_capsule_update_info update_info = { + /* Filled in by configure_dfu_string() */ + .dfu_string = NULL, + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + +/* LSB first */ +struct part_slot_status { + u16: 2; + u16 active : 1; + u16: 3; + u16 successful : 1; + u16 unbootable : 1; + u16 tries_remaining : 4; +}; + +static int find_boot_partition(const char *partname, struct blk_desc *blk_dev, char *name) +{ + int ret; + int partnum; + struct disk_partition info; + struct part_slot_status *slot_status; + + for (partnum = 1;; partnum++) { + ret = part_get_info(blk_dev, partnum, &info); + if (ret) + return ret; + + slot_status = (struct part_slot_status *)&info.type_flags; + log_io("%16s: Active: %1d, Successful: %1d, Unbootable: %1d, Tries left: %1d\n", + info.name, slot_status->active, + slot_status->successful, slot_status->unbootable, + slot_status->tries_remaining); + if (!strncmp(info.name, partname, strlen(partname)) && slot_status->active) { + log_debug("Found active %s partition: '%s'!\n", partname, info.name); + strlcpy(name, info.name, sizeof(info.name)); + return partnum; + } + } + + return -1; +} + +/** + * qcom_configure_capsule_updates() - Configure the DFU string for capsule updates + * + * U-Boot is flashed to the boot partition on Qualcomm boards. In most cases there + * are two boot partitions, boot_a and boot_b. As we don't currently support doing + * full A/B updates, we only support updating the currently active boot partition. + * + * So we need to find the current slot suffix and the associated boot partition. + * We do this by looking for the boot partition that has the 'active' flag set + * in the GPT partition vendor attribute bits. + */ +void qcom_configure_capsule_updates(void) +{ + struct blk_desc *desc; + int ret = 0, partnum = -1, devnum; + static char dfu_string[32] = { 0 }; + char name[32]; /* GPT partition name */ + char *partname = "boot"; + struct udevice *dev = NULL; + + /* + * There is currently no good way to check how U-Boot is booting, but we have + * a few hueristics, like here checking if our DTB has a kaslr-seed specified + * will tell us if we were chainloaded by another bootloader. + * FIXME: we should do this check once and use some proper API to expose the data. + */ + if (!ofnode_has_property(ofnode_path("/chosen"), "kaslr-seed")) { + log_debug("No initrd address present, skip as we might not be chainloaded\n"); + return; + } + + if (IS_ENABLED(CONFIG_SCSI)) { + /* Scan for SCSI devices */ + ret = scsi_scan(false); + if (ret) { + debug("Failed to scan SCSI devices: %d\n", ret); + return; + } + } + + uclass_foreach_dev_probe(UCLASS_BLK, dev) { + if (device_get_uclass_id(dev) != UCLASS_BLK) + continue; + + desc = dev_get_uclass_plat(dev); + if (!desc || desc->part_type == PART_TYPE_UNKNOWN) + continue; + devnum = desc->devnum; + partnum = find_boot_partition(partname, desc, + name); + if (partnum >= 0) + break; + } + + if (partnum < 0) { + log_err("Failed to find boot partition\n"); + return; + } + + switch (desc->uclass_id) { + case UCLASS_SCSI: + snprintf(dfu_string, 32, "scsi %d=u-boot-bin part %d", devnum, partnum); + break; + case UCLASS_MMC: + snprintf(dfu_string, 32, "mmc 0=u-boot-bin part %d %d", devnum, partnum); + break; + default: + debug("Unsupported storage uclass: %d\n", desc->uclass_id); + return; + } + log_debug("boot partition is %s, DFU string: '%s'\n", name, dfu_string); + + update_info.dfu_string = dfu_string; +} diff --git a/arch/arm/mach-snapdragon/qcom-priv.h b/arch/arm/mach-snapdragon/qcom-priv.h index 0a7ed5eff8b8..74d39197b89f 100644 --- a/arch/arm/mach-snapdragon/qcom-priv.h +++ b/arch/arm/mach-snapdragon/qcom-priv.h @@ -2,8 +2,14 @@ #ifndef __QCOM_PRIV_H__ #define __QCOM_PRIV_H__ +#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) +void qcom_configure_capsule_updates(void); +#else +void qcom_configure_capsule_updates(void) {} +#endif /* EFI_HAVE_CAPSULE_SUPPORT */ + #if CONFIG_IS_ENABLED(OF_LIVE) /** * qcom_of_fixup_nodes() - Fixup Qualcomm DT nodes * diff --git a/include/configs/qcom.h b/include/configs/qcom.h index e50b3bce5cdd..b6b5acffe5e4 100644 --- a/include/configs/qcom.h +++ b/include/configs/qcom.h @@ -10,8 +10,13 @@ #define __CONFIGS_SNAPDRAGON_H #define CFG_SYS_BAUDRATE_TABLE { 115200, 230400, 460800, 921600 } +// 2a5aa852-b856-4d97-baa9-5c5f4421551f +#define QUALCOMM_UBOOT_BOOT_IMAGE_GUID \ + EFI_GUID(0x2a5aa852, 0xb856, 0x4d97, 0xba, 0xa9, \ + 0x5c, 0x5f, 0x44, 0x21, 0x55, 0x1f) + /* Load addressed are calculated during board_late_init(). See arm/mach-snapdragon/board.c */ #define CFG_EXTRA_ENV_SETTINGS \ "stdin=serial,button-kbd\0" \ "stdout=serial,vidconsole\0" \ From patchwork Mon Jun 3 12:49:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 801250 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp1897842wrw; Mon, 3 Jun 2024 05:50:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWlNUMqzZ1zOrn+g3Ufix32NUsIu24GFB21gNJwu+nZHfTFzvikx+3efyaNURONTI2HZTIqyVBnvjuY708l6Zvi X-Google-Smtp-Source: AGHT+IEk/KKilaxPZ+DC+c2H98HfFvt/r/QPRweRxzpXaVe8F2HtbAoraLcZy0an+C3bl4rZYw26 X-Received: by 2002:a17:906:185a:b0:a66:7666:fc62 with SMTP id a640c23a62f3a-a6820136beemr600744766b.22.1717419018629; Mon, 03 Jun 2024 05:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717419018; cv=none; d=google.com; s=arc-20160816; b=ZkyIny9Kbr2x7TFCuhxtpGfGs9Cl8pDQY5vKotb9Nnx7w2ZuLUTKQk4AbAsfKthFYC AJx7qzV6zWSqQLS356Y4VeDj9e9TXBTyp4xM0xo/Rl1vVZjFmyj/DfifC8Ri+paLmuz9 pjGRrH47MmVSncvrx2Uej8UYf+PSYi2dOfhgT4SyPDO/yvCUJ3R1iC7+/P81r2V7YgEM bg6HdbsJXbGhPoFva10TvnFjBphU8DulXn/YZLojKOqlK/fpbeJjdr9Q5LsNEFib0LhK n5pgSjv9IdWo5CJY1abBhRdlRY5nO9ZEZ0C3GykxScJtuMHTJ0SaGrT2zhTMF52pYDrN rJ4g== 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:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=5CvkkQQjVZUlt+hyfw3395Vr64sY/z9KeE8osvnQc1Y=; fh=T4Bqm10ALhCOf4E3K3aQK1xKNPFCn2ENm6BZcAYeYD0=; b=guTDpeTodZv2Vdi13UIww7AHfAcMwlpjixx87z1d+vNCGpD90R/T66LRcn4hM686k6 HQhHTQVRITtXQxVuKXxusBk6S3acz4/xmq1EGRbYvKaFgC29cMPvmF84ejCWSNbXznV2 vO+EDXVTZmwtR7CEjF6VkPnu7yDAyP7P1lcm7SzewJuUg0c42rqo0JvK2Lmel8K1bULY PE//vc/AtmcCvHgrguaX5EhXrS23BzhP9F4mg9m86JpkHveVYG20B9auER4eBEI8ZGd1 YNwjSS6QonMnn8VlMJU6GMz2v6tqWM8yD9iHF0LEXsvq1BMtQ0XoKuTHTnpD2K3rNV/a 77jQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=quJOZDNJ; 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 a640c23a62f3a-a68abdd93ecsi289969666b.140.2024.06.03.05.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:50:18 -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=quJOZDNJ; 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 942F788379; Mon, 3 Jun 2024 14:49:28 +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="quJOZDNJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BCA6788348; Mon, 3 Jun 2024 14:49: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,UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.2 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (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 D9F2C87FC1 for ; Mon, 3 Jun 2024 14:49:24 +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=caleb.connolly@linaro.org Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a6267778b3aso379393566b.3 for ; Mon, 03 Jun 2024 05:49:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717418964; x=1718023764; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=5CvkkQQjVZUlt+hyfw3395Vr64sY/z9KeE8osvnQc1Y=; b=quJOZDNJclgsBEFnPflUbz4wshMJxcJzvVMT9R3IjkSiN0QExnkgGto4vxbbA25eJn om+tEYi8b3YBoEk8OzMlqy0qo6JEDvIv4fM/+TAhxpKaxq1gnbeVIk5vxrkTmJ4tL53w HaG5NP5C4G17iUHCiqDtx7X2ApMiErFDOScVKc77ma3DhYnQz9uKCZcyMnrTMyOq1H/G CmA6F5y65rwuXa3T19RBhKN9EQ6ClwXUehiKg3+1SYMXwnG0xE+oZmBB7tQMoHCz87Hz 8i8S+8VFR/0YwDrXQSablnnL5hVPn39IGx47jcGlfEYYO7Ov2Tw2TduvKRKw3hvjNLtL qwdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717418964; x=1718023764; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5CvkkQQjVZUlt+hyfw3395Vr64sY/z9KeE8osvnQc1Y=; b=aKTxnXKqsZfVJc0G+wo5veB7IFkpGfOu0K7AnObJ3R01oDx+XyiikEuf/9skiNJGLw LGiENbvOoD15WyXV7KcGY5Enk3tLMqgVNi89xGV5iMKSkaQXkLWbRa4Io03dkxJtd7bK Op3NcCqQUw/JAwYhRmEGYWbkQ0AZ8KVuzwpAQN52K6OTU21bTBgAe6iyfOMRBI8HiN9Y GB41MUrwnVfBiiFXn+/IoTEYG29v7neHnKJfKkuLumw927Hdo6pDcYkDiGhDO8X05CTF 6TRuabauwwCSDZJ/Gje1om1NyZJt569bXseZu7bhJQ+84iS9K8pB+TAWPg5DcZCLQ6Y5 gpRQ== X-Forwarded-Encrypted: i=1; AJvYcCU5X1rJo7qKeCL3jF3f1QVh7YUn11h1tVGM43a262IoSwsIl0QdwK17lQWdSNladiNOnxtqdffL4mABqGI0YYln3vLtUg== X-Gm-Message-State: AOJu0Yw9wuvS2LIy2DcmPB9Eocaqw7ptmwdzNcaYG+LrXR6hYwsN8WRy U8sjRkilU3v7eT6B6pJ3XtSeChgTwRwI+xVNZDPR2N/z/iFV5WZzarlBhztJqkc= X-Received: by 2002:a17:907:9803:b0:a69:2288:41da with SMTP id a640c23a62f3a-a6922884340mr102606466b.30.1717418964434; Mon, 03 Jun 2024 05:49:24 -0700 (PDT) Received: from [192.168.0.113] ([2a02:8109:aa0d:be00::8090]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a691cd07c72sm98917066b.170.2024.06.03.05.49.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:49:24 -0700 (PDT) From: Caleb Connolly Date: Mon, 03 Jun 2024 14:49:20 +0200 Subject: [PATCH v3 5/8] qcom_defconfig: savedefconfig MIME-Version: 1.0 Message-Id: <20240603-b4-qcom-capsule-updates-v3-5-fe2e083289ec@linaro.org> References: <20240603-b4-qcom-capsule-updates-v3-0-fe2e083289ec@linaro.org> In-Reply-To: <20240603-b4-qcom-capsule-updates-v3-0-fe2e083289ec@linaro.org> To: Tom Rini , Simon Glass , Lukasz Majewski , Mattijs Korpershoek , Caleb Connolly , Neil Armstrong , Sumit Garg Cc: Ilias Apalodimas , u-boot@lists.denx.de, u-boot-qcom@groups.io X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1417; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=xR83LA5bb4K9phi09iNVFjk2Jp7tPnB8GRgBaK5vvro=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmXbvNczOivBzDXs1l9btft2o2g4TdXdBRGL5ef krA8W9FjhaJAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZl27zQAKCRAFgzErGV9k trPND/9u+/2vRWy6megtuySP+qVqwBrdeFrKr/sCcjvDbZuSGa/ZzmNLlsXNvP+QFSEqrNEGfnM TmQYrwVU4iphpp/KFnxD8dL0l7l6mJ3q6auB8sHHqmNiOx2TXx7aLCIt08+SKs3LRqOyQHeiyY+ G2999m0n8y44TjG7T5gxD2VPiH3p9uHCjx1phoE+VpoXXptJ9y4BSGpJGU/p9TKyItXWbpUzFeN pGgbsMCCSVsaJQKbqCESkfLpQbkpnwT2B7jJC3+dJKv75Q7JySeGVWEBrKbqXl5N10sME7+DFw/ QpEnlxsn9Op0q7RF7riRbgXfBDe5WjQ0cQxfhoYN8J/nK6RpOsNuoyydlXf/wAM0/qzwvi69dwv +9UhoaYTzi0Ljp95rl3scfid+pL0hoD7AdH/Bl3S2mk4KmLEZQvcicYhIMaL5tjeJy2IJSKjVXe CQ4PGTLSUBSwaWPbSo0NtqzH32+ZAQKJREDcbWJeXHm4GmFOvUzWLLJas9ubuKSDHcDBuKtE6sP 0tK7ZjBlkuka67QVOisrRobMSLnYo6YeivGeQCK05TR9bSmxVIpUXK9LBblht7BMzDWEMIf6Mp/ cmM8MUvukHfQcmYCjJaXSiOdNfgxam3gF516PSr5UUEePha50H3RsBxWctlfz9CLRNPxBify4g7 +fwz9nyp7lq7pfQ== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 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 run savedefconfig Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- configs/qcom_defconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/configs/qcom_defconfig b/configs/qcom_defconfig index 65f13ae7a089..f2dfced4bc1e 100644 --- a/configs/qcom_defconfig +++ b/configs/qcom_defconfig @@ -1,17 +1,18 @@ CONFIG_ARM=y CONFIG_SKIP_LOWLEVEL_INIT=y CONFIG_POSITION_INDEPENDENT=y +CONFIG_SYS_INIT_SP_BSS_OFFSET=1572864 CONFIG_ARCH_SNAPDRAGON=y CONFIG_DEFAULT_DEVICE_TREE="qcom/sdm845-db845c" CONFIG_SYS_LOAD_ADDR=0xA0000000 -CONFIG_SYS_INIT_SP_BSS_OFFSET=1572864 CONFIG_BUTTON_CMD=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_BOOTSTD_FULL=y # CONFIG_BOOTMETH_VBE is not set CONFIG_BOOTDELAY=1 +CONFIG_OF_BOARD_SETUP=y CONFIG_USE_PREBOOT=y CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR=y CONFIG_SYS_CBSIZE=512 CONFIG_LOG_MAX_LEVEL=9 @@ -33,9 +34,8 @@ CONFIG_CMD_USB=y CONFIG_CMD_CAT=y CONFIG_CMD_BMP=y CONFIG_CMD_LOG=y CONFIG_OF_LIVE=y -CONFIG_OF_BOARD_SETUP=y CONFIG_BUTTON_QCOM_PMIC=y CONFIG_CLK=y CONFIG_CLK_QCOM_QCM2290=y CONFIG_CLK_QCOM_QCS404=y @@ -106,6 +106,5 @@ CONFIG_VIDEO_FONT_16X32=y CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_NO_FB_CLEAR=y CONFIG_VIDEO_SIMPLE=y CONFIG_HEXDUMP=y -CONFIG_GENERATE_SMBIOS_TABLE=y CONFIG_LMB_MAX_REGIONS=64 From patchwork Mon Jun 3 12:49:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 801251 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp1897921wrw; Mon, 3 Jun 2024 05:50:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV5st5kI3GMS9ocy0TZq53bICyGO8F3BMAzH6MJPXdJ0xzrYOWM5KTWgar3/WGzflaWQVn8qNGF2rhgffF1zNm8 X-Google-Smtp-Source: AGHT+IFa5jSQ9dVPRVcD+ob4wosbVLk7ox8rx20tXs+s1aVSnLiKcQh+fexagdVCOYc9HmtLSm0c X-Received: by 2002:a17:907:1314:b0:a68:86b9:52e8 with SMTP id a640c23a62f3a-a6886b9537dmr449143766b.68.1717419029031; Mon, 03 Jun 2024 05:50:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717419029; cv=none; d=google.com; s=arc-20160816; b=PXZuV2Y2uYz5VRXXcQK24qpvz+Bi4pc5Kh9PO3eOTyTZ5u017bJy/MC2oKXbMIm7rq /QjOCkbr15fDHUa0brcpxj4VODIV6HLwgIUf/GGpkoIMJnmsTO40hNi88x0qor1mm/L+ JGJeNZjRGYHj7sjYGDm/nvUgOSrMa/DWKuwVaAxhYMZR1aQFezrH9gtQ22CJ2gixdW4/ 5sSDR3gKOrQ5B0gq5nDkbIbQHAmgvhYY3iDAgzUQdTisgxxRbCHXkULUBaoUE23+nWiz 7dJckffN5BivVNa4DbofbJWp2DgWnXevQvOJzFE7vDLcjg8WyAgR01Y9g8OYMl4hNwaS RjCw== 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:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=lxK2ugEbGSKN7sRXDYunMJj2LB7aLL5crETjpykvPOY=; fh=UOmWJGGS/WbhfkfeuYKTlxoAkD9MIIMxYlGoe/dZILQ=; b=M5Q8nMr435M1gNSo3cc663oXGkrmzVp61wSltXsYpGAKnfcqO/JZdHYPtW7iJkcGfe AsUX5myTqeuoTgHEiIQYqdKtMenGmv1x814pqK7kphBnF+YlRXG8xs7YlSBDpumYuJjF zhxGBLd4XsbkFTxg3Lr8XB23phabF1eHMElpkNgzUz9BXaJHzMb9PD1VTPm4+sCXHfF0 AuQEmYrePsi+mLDP0TZ8hu7j8XnZQYy6Ies549Gu8MnJMNx/4uxN6DP6u95f2WoW0kVz DHUKRX86DCouasuyruiVnB59615JXl/K+T7jjcbgtUOJXAWxMBdEkvhW2+irHmops6Xy p26w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ci0y7/RU"; 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 a640c23a62f3a-a67e74f102csi401975666b.276.2024.06.03.05.50.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:50: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="ci0y7/RU"; 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 0097088353; Mon, 3 Jun 2024 14:49: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=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="ci0y7/RU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F222188365; Mon, 3 Jun 2024 14:49:27 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) (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 00BBE88292 for ; Mon, 3 Jun 2024 14:49: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=caleb.connolly@linaro.org Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a63359aaacaso563621966b.1 for ; Mon, 03 Jun 2024 05:49:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717418965; x=1718023765; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=lxK2ugEbGSKN7sRXDYunMJj2LB7aLL5crETjpykvPOY=; b=ci0y7/RUHnl6c69bvlLMe7rJ6CMszu/CVa1pdktLYmITTnRXycKxZ7vuoiXHvkDqH9 Fymscg66BD95xhJlu5wX3hJi9cJ5RRQD6+tdMWL+L7+ggt4zVBX4L2dW4b8rH1R1D9dt n5yBmEbTm+NqsyzMKn2ZlOVLrebTiDt6JBiD6E/JW7m+uU9gfJmbjvMoHGtjr91D9eYV zHAFgxRnL06HWlTV39UYAlCBMQLYOCGVhLN66QRPdqGEmvcz2HmNMdQrZDe6eHq+jgbO ElYxj+ENGGy90EpVglQsvNVC9A87N8ppdxT5/6vb4gxqr50me+Dd7su6/+SpQbivwEmG E0lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717418965; x=1718023765; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lxK2ugEbGSKN7sRXDYunMJj2LB7aLL5crETjpykvPOY=; b=DCJyAZ8xAKtPf2zepjB/gWyeSHnWF0XOM3rzsqRzblghi9ipRzT0Wd7lOK5IyN5E0M Tu0uBFaYHbXI4wuwhf/Xi1sVzxQJHY1DQMxY/lMSOxeXpTrn3rrGDQVFkp/DQLHg1lMA YVEVd0nsILI5iE3rBqVk25UsxXiZy5FiEjWexeWpgTrxUltgsUZkrj03j/cEnJFAw0Ak x/SSEtkb4N2tWzsdog8NMZHkcw7DymQ0poTkS1xVoEwmlkCsvT9kWw7C0XZAR/ifoeFN DqGDSl5LDLvedq9ZizyuZs/VigeNx5TVECYOesPo0A2aaOu2CpEi5itl7xeu5m/6fyEi 1UuA== X-Forwarded-Encrypted: i=1; AJvYcCVZXUY4rhswpbaSroQMS+g8NhnbF5+MKxC8Ew0mX10cxzwAcBT/YJXEVrZ4uisfer22j9S8JP+GrHuL05AHGF6jN0DJ0Q== X-Gm-Message-State: AOJu0Ywuh+PQztDTPyENenU5OmnwqPtrtAmfBZ25bnk8CgEQvGMPcSnr +BDDsrbHDDBViLM0caE+TXL2crnSK4bZYPVMePqasIj+4t5z9I0pFfLF1NywfU8= X-Received: by 2002:a17:906:280a:b0:a68:4aeb:e32f with SMTP id a640c23a62f3a-a684aebe420mr595679666b.2.1717418965510; Mon, 03 Jun 2024 05:49:25 -0700 (PDT) Received: from [192.168.0.113] ([2a02:8109:aa0d:be00::8090]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a691cd07c72sm98917066b.170.2024.06.03.05.49.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:49:25 -0700 (PDT) From: Caleb Connolly Date: Mon, 03 Jun 2024 14:49:21 +0200 Subject: [PATCH v3 6/8] mach-snapdragon: use SYSRESET_PSCI MIME-Version: 1.0 Message-Id: <20240603-b4-qcom-capsule-updates-v3-6-fe2e083289ec@linaro.org> References: <20240603-b4-qcom-capsule-updates-v3-0-fe2e083289ec@linaro.org> In-Reply-To: <20240603-b4-qcom-capsule-updates-v3-0-fe2e083289ec@linaro.org> To: Tom Rini , Simon Glass , Lukasz Majewski , Mattijs Korpershoek , Caleb Connolly , Neil Armstrong , Sumit Garg Cc: Ilias Apalodimas , u-boot@lists.denx.de, u-boot-qcom@groups.io X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1644; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=M6iptjEymhuqp1KfmFS4RPhJ/d89vJi1LDpR7tOtX6Y=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmXbvN4eIuLx7/d5rRBLZdZiVhkCDzk3e/CGVqV i4fK+d2ER6JAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZl27zQAKCRAFgzErGV9k tpcQD/wIhtab1iQX9CKKtLe8AdimmpMIQh+IVraR6zx/A24CG/VZM8W3IXETpsThF3tWPDC8KZp gJmgfzXq6PNx4FqCSVCGRqvzxNMnYXe1LM4Ya2hPyUJL1K0V7qVkHh67R3Gr8pc7KzbFpGqLa29 AJFcL823Z8zchyTfCjzE1UGH8qGt6xXimAZGq7aatq990OTESJNS41dN2+TdmTuGWyI0dA2RwkZ oxOlT3wrlVw9GKqnlvU9Fu8QIMGbA/kAOfc1/UBeD/zMq3LZA+/SEoREoiogeSoNojvQlV7X42N WnPNlDWnxArz6EzLO2F9/UPofROqA7v880p9f7OAPb9oNLfEEf/r8x3iTCRSxjb/aOeNV6cbUj3 YM0aBXRZ8LCSbHA8Plq6Ux17/OVeNpbNxGQwrKIIiU6PUPEtkiH+/xh2QVfw1JFIE/ZTP3iwfof EbJH7alsc/DaP4o0WurU12fYoymtNwXLuYRmtnu2yT+FtEImTYSe73rCVrzbqTXKUEQUiYj9kqA TdYgQyZUSfWPHHBcW0rPKaB3/9PxOOt+YiPbMBhkZxgVz4xBTTtDkgqoNm8McvL+DGd8lq4jyfZ vZaglobiuJM0VCOR7XbHYN9rV1xXDy89nzDlqKGF22V68B7RIWa2OqxUrfC1vkCJYk2BHjcwGaa 6mwF94tJbYWblEg== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 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 Capsule updates depend on SYSRESET, which we currently don't select but instead use a custom reset_cpu() implementation which just calls psci_reset(). Clean this up, drop our custom function and require PSCI reset. There are some Qualcomm platforms that either can or do run without PSCI support, but we didn't handle these properly before anyway. Reviewed-by: Neil Armstrong Reviewed-by: Ilias Apalodimas Signed-off-by: Caleb Connolly --- arch/arm/Kconfig | 2 ++ arch/arm/mach-snapdragon/board.c | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 39ad03acd2e4..0d5161358e33 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1084,8 +1084,10 @@ config ARCH_SNAPDRAGON select OF_CONTROL select OF_SEPARATE select SMEM select SPMI + select SYSRESET + select SYSRESET_PSCI select BOARD_LATE_INIT select OF_BOARD select SAVE_PREV_BL_FDT_ADDR select LINUX_KERNEL_IMAGE_HEADER if !ENABLE_ARM_SOC_BOOT0_HOOK diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c index c4a3394706e6..b0d9a65bb8f5 100644 --- a/arch/arm/mach-snapdragon/board.c +++ b/arch/arm/mach-snapdragon/board.c @@ -106,13 +106,8 @@ void *board_fdt_blob_setup(int *err) return (void *)fdt; } -void reset_cpu(void) -{ - psci_system_reset(); -} - /* * Some Qualcomm boards require GPIO configuration when switching USB modes. * Support setting this configuration via pinctrl state. */ From patchwork Mon Jun 3 12:49:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 801252 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp1898020wrw; Mon, 3 Jun 2024 05:50:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWDXlCtviFgmd2XBMdtWBELcH5CFzK/h2cf0wpK75g+6jU+RC+1NUNzptRmUrVwZCqJXbBVExjja5auWmuYss4L X-Google-Smtp-Source: AGHT+IEoSqTiumEkPDlXjpfc6ZppYJTJ4temZ9G5zrGhlByygMlKmuqjJIO6jUjTFz+36hH9WAtK X-Received: by 2002:a50:aad5:0:b0:578:638e:3683 with SMTP id 4fb4d7f45d1cf-57a3634b650mr7655041a12.5.1717419039197; Mon, 03 Jun 2024 05:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717419039; cv=none; d=google.com; s=arc-20160816; b=CyjJqYFjpAIZPZ1SWx+b48/8pzeuZ9yHJhL8syxxf1rPaRfXBjBSzFA9JZU8iqQTuO ZLTh7yb5sh1V+b3Ewb/SJHP85AqvBXtfY4FFwBTs+i/sEu/vEvkvkzwK8WfLGtxaX3Vg rFkFaxr4lwoZI1joYPm62GHBBY2gl8czZAwDCdM8ZBqNiC0uxyDECd7rg7C8u/3LVY6+ a+PNpS1t+qICVRonWhmCi33Fclbbl5+kiwoHPSF/ASqwH6SebnsNMWRdxTRgBW0hceSM WaPwz9VQslKOhZ3XQZ2CE+yeNW2+0trA56imDwkGWb7EknO8kf6Y2voFMrMpLz9NV02i 2hRA== 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:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=YRws0KiWxU6E63HsFpROoSFxlC6P2ZzzbZQIBTC1JRk=; fh=r9lEll+yZLqOv+fgIXF+05d5FoLpGW3+SGyjtPv7dYY=; b=mHYlW0G36Z+s6gZ8g56y9b6ItqDub4hjCo4Z5uIH6Pd+UFROF8e8Xs80MmZpGTzMp4 wloMppYS24b407DVGSoPS5S2lpht/JLX+sYAnmhADVSepkwMXq5Xfkf1HnE2vk7cGAcS OadcvowmoAeuBaWhUTSbJCYiBkyX8Ehe2xAsvo7tuWbBlTN6aLYXUKfFE+xTWWviTeKZ 8tjAg4qyybU9Q1dOS5JS42HmzzmHj7rrvBe7JhoYpn0nC9ruzwiP702L3OlGG40DQ14c sHJ/yWRo695ntxmN3/ls4+66LeEgUykChWqb6d/GYU5ZnuGu7VG5pMWDyrBh4F8mFsGz qScQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VWKwKAjd; 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 4fb4d7f45d1cf-57a31b802dasi4014796a12.52.2024.06.03.05.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:50:39 -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=VWKwKAjd; 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 5BD2788354; Mon, 3 Jun 2024 14:49:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=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="VWKwKAjd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E5D6D88381; Mon, 3 Jun 2024 14:49:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) (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 070C08834B for ; Mon, 3 Jun 2024 14:49: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=caleb.connolly@linaro.org Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a68b334eb92so81489366b.0 for ; Mon, 03 Jun 2024 05:49:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717418966; x=1718023766; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YRws0KiWxU6E63HsFpROoSFxlC6P2ZzzbZQIBTC1JRk=; b=VWKwKAjdOzfo2W07f17IflGO0bgcvoGqD0gzt2cI8B9sS+XdH2rfU6Zjb/PB8Ibj/m 2y/9ozMN0JPUKNeEm0fj/UZTHKVmq56YnmfYk4VDKuXCBqnuiNEgNqJR6p98ncuXsypc ZeQkp2oNF/2/qNdIq0JK7mWAKX6Nn9HQsDqZXNn0/upClYt9RAIgmox2WK/dUv183YnZ Jhf8QJJal9s+eMhMyIsOt6QNtntdONV6HoQW0sCOWqBXeHz6fRTJPoOIIU3q48EpNmN2 ZmZILT1vL04UV31PZTstK/Ttr8hijYNLfwBlxz5H519vcF8UEUms9m5hZnHY+fZEL8BJ Ap5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717418966; x=1718023766; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YRws0KiWxU6E63HsFpROoSFxlC6P2ZzzbZQIBTC1JRk=; b=RTafvq30hCqrWplVnP65NS5EeBfKu1yByjNWOFkRf0ALI9lVXZWqP8AW8X6w1KGxNF kuiCEBQMJ//l0g3+8GD/ZgD/etPoTTFG8WldxYYTpwv1CVc1AuUWBWxUVP2akttG2B17 7qD1R6jpLK17P8wjqT1DNBHIWEJdp0QdIpEET5wQ3wOThM5r6/Cl7Zt7mA09uZL3JWR9 kWRQGpFKzPDYk6nUvHVbV56EZW8cU0DB9aKNgzDE1fD8MYU6kZYkVY95c4bLWfdTI2hD GVk7lLbY4X61x9vc7AfYd19sIvA+LiaLSLMSrAnkCmeWag/O3Yhr1z0PHkpsckjUPPio p+eQ== X-Forwarded-Encrypted: i=1; AJvYcCVpvKtKIc6ojG/ZOBjHPBb0ViPvBBeNd0rkfkOmISuRDvNELx7UgfefQLNt4NDHTEcEtblMVG5FMbY8VjHnkattjuXklg== X-Gm-Message-State: AOJu0Yw3LxgMCIMUkJplYKepo5gVc2+1QYpzoINVdDq2RD/gn71tOyq4 vmHBhZhKGR4dp91fe4HsWoZQ6Ov5O4I70Lx1MN3BKv+YyEOdhsLLUD9n+zZBSZQ= X-Received: by 2002:a50:871d:0:b0:57a:228e:4331 with SMTP id 4fb4d7f45d1cf-57a3634a940mr8174076a12.4.1717418966555; Mon, 03 Jun 2024 05:49:26 -0700 (PDT) Received: from [192.168.0.113] ([2a02:8109:aa0d:be00::8090]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a691cd07c72sm98917066b.170.2024.06.03.05.49.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:49:26 -0700 (PDT) From: Caleb Connolly Date: Mon, 03 Jun 2024 14:49:22 +0200 Subject: [PATCH v3 7/8] mach-snapdragon: bump up heap size MIME-Version: 1.0 Message-Id: <20240603-b4-qcom-capsule-updates-v3-7-fe2e083289ec@linaro.org> References: <20240603-b4-qcom-capsule-updates-v3-0-fe2e083289ec@linaro.org> In-Reply-To: <20240603-b4-qcom-capsule-updates-v3-0-fe2e083289ec@linaro.org> To: Tom Rini , Simon Glass , Lukasz Majewski , Mattijs Korpershoek , Caleb Connolly , Neil Armstrong , Sumit Garg Cc: Ilias Apalodimas , u-boot@lists.denx.de, u-boot-qcom@groups.io X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=925; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=/AW++a5pXidkjplriFbZN3H78VQM/xJuDOmH212nb/0=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmXbvNgUe1P5cZV2ylL577f2efUmeHEjoqBLw3r k8hq2GwQYuJAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZl27zQAKCRAFgzErGV9k tufLD/0Vba3v2O0T4vGX4KMnWElUX7H5y+2gMULxRxZHoGTQzOT9MLuZXAHLktV8Qa0PV78qUPE 4xnekOkfcivWoYmzQXMeVtEUxc/TuAIkflVqAq/mB29El8HTroXs9iwmiaoMAivjDuuH2zfqOB4 FebX2XENpVFvGwUwhVomKl3Mx1zhyObGYkxCBrMkBj9pzqMk69BrgXFjbSkjSNWwl0vZ0olJ03S wmgFmDz2oiq/FPuwYN7lcgVBAyrjszRK+y7mpO1kounoJXDBHh0I83n+qgp+Mh0uuYSyQJQrlIo pk6rJW7Hsb7vXMASl72K1mZGvrY423vQ3gFllidG52sWzLtjbcB1Cqtj0a4vg4mEKAHQxmcpAgQ q72JiMb31qFUEGoyQcFnwwVaG6eVgdmUPwgii5poJt95F0eQY7sFHV8twJblxi2q5zIK6yNRQrk HQvBjGQ9Ew9185xZ5qmmCjsPMjblNDqzomWIp8wvb/hT052arIfwIzglu1jmwC4p8anFI8pquJJ Pgunzs3baXCdSJiVcQwzhwxOXc/e/w/lPTks0bvjgl5IL1acVPHBq6HNrrr+bnSmh2kqU4zyOVH If8XRFZbc9rj4LdkcIcSobHVtTLgWcZjKoz6/xpgtU8XcHzkqmChHnKFHPtEk9gFN3tdpbc4riw 2nLqXmxDKNqMmbQ== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 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 For capsule updates we need more heap space for the DFU buffer. Give ourselves a whole 8MiB! Reviewed-by: Neil Armstrong Reviewed-by: Ilias Apalodimas Signed-off-by: Caleb Connolly --- arch/arm/mach-snapdragon/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig index 536960b83c3b..5023c906bed8 100644 --- a/arch/arm/mach-snapdragon/Kconfig +++ b/arch/arm/mach-snapdragon/Kconfig @@ -10,8 +10,11 @@ config SYS_VENDOR Allows to specify vendor for the Snapdragon SoCs based boards. Based on this option board// will be used as the custom board directory. +config SYS_MALLOC_LEN + default 0x800000 + config SYS_MALLOC_F_LEN default 0x2000 config SPL_SYS_MALLOC_F From patchwork Mon Jun 3 12:49:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 801253 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp1898105wrw; Mon, 3 Jun 2024 05:50:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVWu5Vu+2zzPeF648xO7OmER70wm/A6ralPH3Xj2b9vPMbXzVYXC47lEPlpRwfiyrvnCqX2Ex7hwxyXrKgI1KR+ X-Google-Smtp-Source: AGHT+IHecZyVXkqS0m87cVmwxASuFRkveuca7kEKp542nEuCj1zij5a6TxEM9jJCQRdd4wQ40DxE X-Received: by 2002:a17:907:aa1:b0:a59:a532:ed58 with SMTP id a640c23a62f3a-a682051787emr565527366b.28.1717419049250; Mon, 03 Jun 2024 05:50:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717419049; cv=none; d=google.com; s=arc-20160816; b=vpZwbfRXJgh+Z10R5gBgAegVc2n/saQmRfHCCI1XoxAb4CY8T9bCZc/GzVO9LpJ5nF B5pJg+h6XnY1Zum4LiHwFh0fagMuC4e0YbrgAZ/LBS8YaoA2AABcYXzl4lQoJAfzzumD 25E51+dfhtlic/Zp+bgvOGpRQ9vMex+uialx27Ws1ycob4ycm3lp7/qkmNjkCF3tJ2aN LOjV2p1WuhXILEF2yW0D4LYAwyW4ms7yBgOOFlzUZGd67FKXTH5hFfn9EfdXyGA0tp+3 WqpxRCv4FpDAqIH+Gu8//rPQUYSqMwLQTKbJ/xa/2pWkAAavFpc34GkG/5nJsSnf8rDa VLXw== 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:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=lsIZY0KzQXAG1zxH2t2OLiFyKGHkLCxaeTV1oOAZzl4=; fh=KWn+AZ0g+WyEO02ScRZ8ujl+QLLI9KrQdUYqQdqOKAc=; b=ygi27HGedclOqQMZhmqGwIsNjFfJ1HUFxe7CJ9MX0p4K5Pt/ErF1boRrALSRxoGEyT dNKR3tz45+k4wNJiEUpd2sq058eXG1BQLqmgzqRvCPqArWffrTGVwYEUi8WSQd2hLKbp HsKI4BJG5LquKGd51zSLGweJh3NJvq5sIpy5aRN1SZo3bkT0MHYy/8BCfZzGWc5apkdr pbEdal34WQhmLHQoPv4gszFh3KVddUpCpo5SRdJumBD9IAqeoBu7hkwwokfGa5H+LTiB cb9r+c8dmVCWVhQgbr0nBfENyePYPVViaCInK4QK52IM+glyCCkZXXKYFyR9jMEGXoSZ 7z0A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w1KM9yyF; 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 a640c23a62f3a-a68ee5f019asi165227966b.70.2024.06.03.05.50.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:50:49 -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=w1KM9yyF; 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 B834B88294; Mon, 3 Jun 2024 14:49: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="w1KM9yyF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C6450881B8; Mon, 3 Jun 2024 14:49:30 +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,UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.2 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) (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 35772882AC for ; Mon, 3 Jun 2024 14:49:28 +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=caleb.connolly@linaro.org Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a68f1017170so165587866b.0 for ; Mon, 03 Jun 2024 05:49:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717418968; x=1718023768; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=lsIZY0KzQXAG1zxH2t2OLiFyKGHkLCxaeTV1oOAZzl4=; b=w1KM9yyFpB71+7eorTWUAC8UHev6qWsOAlUxjB0gP3ScWqdOlB4GPFrCCv5HDiaT4P ORrLJY7D2JsWAw6TipUOYIp1kSSlP4z0Z7Pn5nuh9V/h80OpZId4YKVQEbG69iXX5Mb8 VXgdsUEG/K/yF8VEKGMiSYl6f/DMV1dxI3QJey5NSWx/P7Iv1YPxqGaOZ0E6L2erDKyV Mb/sofHU3vCTas77sSsq9JdeigDF5fVwM75rujXDrKgebXArcNvfrJhS/iWHSH4WYzu+ iXCM0hoaoA8Jn/NLegAPraEoGn2T8PFXAPdJisPtnw11ypU/TOljRr/3pRMBzxQxyyKJ 67iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717418968; x=1718023768; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lsIZY0KzQXAG1zxH2t2OLiFyKGHkLCxaeTV1oOAZzl4=; b=wjYm1ap7efTjtq5+GIytIimdCCAe2L8hasGv8D2VuKcvXXcYQVPON2f5b3beGiKXZN h8+STNNdtkVZDWxP9LGdzvQVZW3MnP96eYr2tbmtpsqeXvaqgmlUx4BSO/WKteruS0JN VoSiKDRqFGgy6f8u6fG0wWzclPuGAwmH1gnJoBgkKLketLhKOFQSUZ5x1TlXmy9WewLL IeOfRkGH+GFOMSExFO3CKFyKvwwFS8zaXTz10/N5nRXqyLr+dy7HliJwI81eNFhKHz8A VJGDsRZhit619/lGY4bQSXXxnhxeVjJtZOL4wTvMJ5uNdDDs3Yw4QK7bDzFqsdyiEkJf qmgA== X-Forwarded-Encrypted: i=1; AJvYcCWDSjchHM25Jt641XHnQYi3N1t3AhpTsBrB+71mKw3b+FAXAcuu0E1MgklUKQJLs3j/ZLE8XzJfInzg2tKZPyudJ1cHHQ== X-Gm-Message-State: AOJu0YyYYeKpald/v0VswH28yrv/LH5szX7Y4fOfhi2baMdk+2hCgz5d dp4C4VN9dYn3b78WXBItgmxpMtPR6Xs4fcmQbPXgcLXYhZ7GL7e5kecfiH72rNs= X-Received: by 2002:a17:907:944c:b0:a69:d3c:bda2 with SMTP id a640c23a62f3a-a690d3cbe91mr224023366b.26.1717418967566; Mon, 03 Jun 2024 05:49:27 -0700 (PDT) Received: from [192.168.0.113] ([2a02:8109:aa0d:be00::8090]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a691cd07c72sm98917066b.170.2024.06.03.05.49.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:49:27 -0700 (PDT) From: Caleb Connolly Date: Mon, 03 Jun 2024 14:49:23 +0200 Subject: [PATCH v3 8/8] qcom_defconfig: enable capsule update support MIME-Version: 1.0 Message-Id: <20240603-b4-qcom-capsule-updates-v3-8-fe2e083289ec@linaro.org> References: <20240603-b4-qcom-capsule-updates-v3-0-fe2e083289ec@linaro.org> In-Reply-To: <20240603-b4-qcom-capsule-updates-v3-0-fe2e083289ec@linaro.org> To: Tom Rini , Simon Glass , Lukasz Majewski , Mattijs Korpershoek , Caleb Connolly , Neil Armstrong , Sumit Garg Cc: Ilias Apalodimas , u-boot@lists.denx.de, u-boot-qcom@groups.io X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1827; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=Bf88sm23VkxDn3TjsmUmB8CcS2N5ovQyDSQifX5rp3o=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmXbvNBFdXZ8h2awVkL8Q0kqru+aBB3odWHQBfY D3SStYyK1+JAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZl27zQAKCRAFgzErGV9k tn1UD/401Nl/mbAF/aBtS484s3QxfTbc72jNz7rNigZWVJniYA7tF8XxzwGpJqKW63pL5oTeSuc AFBWQtskiesX1ZsIKORFb53rvGyupoWhBqIUz0sYVq9A6TLstqnIys9vxZPNki5ByTbc/cszzuY Sp6/GgmCmAdfbYT+SyplvWSHQGiyAbWI8cZSbnlw0jaMVMg/LOwgMhRWLQ9a4Nf4dWbzuGw3//o x3FJSib7N26EkNkogH1XNc93eXctXzPCAhW/IvDLWqqiF+Pzjbr8lc/MU0xI86AahQQu/g6Ct81 FtGJUmx8QiA3GNM/aOWuXf+PFyEZwhtDdYzvcXSMFtgF8VzfB0FPpK+h0pGWcD+HuMDcva4F42M xX57uhWsIw5uomwUtd81rYRvT1Ze2bJViDAJTOT7AxIVClbEWvcTwYadJ08SHZ8UsLPFqULUpbz cZ3P9Y0eOEO60Em0nGX7fkpSncfTrra+HvHe+PEVkgS0J0GSv8gGiugeQQkyp+qhsIQjGVZVaBe GhSBlMs8msUueFKCokDj3nF4SJNM0T8RdDhFcA+MK14st5sy3Q+3IagbcyIDYaj09QB7geGYo8Z DxAoLn+YSeqU/F9FEHJaUevJnB/rkJyMRNUcVv9sJS2YYdt7SyIrrbXWmlJ/GIY1NJAVX+CKfkM rTn+mYhLc0U3QiQ== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 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 all the necessary options for capsule updates to work, as well as a few additional EFI features. Signed-off-by: Caleb Connolly Reviewed-by: Ilias Apalodimas --- configs/qcom_defconfig | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/configs/qcom_defconfig b/configs/qcom_defconfig index f2dfced4bc1e..d1de7158e3f5 100644 --- a/configs/qcom_defconfig +++ b/configs/qcom_defconfig @@ -19,33 +19,39 @@ CONFIG_LOG_MAX_LEVEL=9 CONFIG_LOG_DEFAULT_LEVEL=4 # CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_CMD_BOOTMENU=y +CONFIG_CMD_NVEDIT_EFI=y CONFIG_CMD_EEPROM=y CONFIG_SYS_I2C_EEPROM_BUS=2 CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2 CONFIG_SYS_EEPROM_PAGE_WRITE_BITS=5 # CONFIG_CMD_BIND is not set CONFIG_CMD_CLK=y +CONFIG_CMD_DFU=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_UFS=y CONFIG_CMD_USB=y CONFIG_CMD_CAT=y CONFIG_CMD_BMP=y +CONFIG_CMD_EFIDEBUG=y CONFIG_CMD_LOG=y CONFIG_OF_LIVE=y CONFIG_BUTTON_QCOM_PMIC=y CONFIG_CLK=y +CONFIG_CLK_STUB=y CONFIG_CLK_QCOM_QCM2290=y CONFIG_CLK_QCOM_QCS404=y CONFIG_CLK_QCOM_SDM845=y CONFIG_CLK_QCOM_SM6115=y CONFIG_CLK_QCOM_SM8250=y CONFIG_CLK_QCOM_SM8550=y CONFIG_CLK_QCOM_SM8650=y -CONFIG_CLK_STUB=y +CONFIG_DFU_MMC=y +CONFIG_DFU_SCSI=y +CONFIG_SYS_DFU_DATA_BUF_SIZE=0x200000 CONFIG_MSM_GPIO=y CONFIG_QCOM_PMIC_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_QUP=y @@ -105,6 +111,10 @@ CONFIG_VIDEO=y CONFIG_VIDEO_FONT_16X32=y CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_NO_FB_CLEAR=y CONFIG_VIDEO_SIMPLE=y -CONFIG_HEXDUMP=y +CONFIG_SYMBOL_LOOKUP=y +CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y +CONFIG_EFI_CAPSULE_ON_DISK=y +CONFIG_EFI_IGNORE_OSINDICATIONS=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y CONFIG_LMB_MAX_REGIONS=64