From patchwork Thu May 19 17:36:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 574235 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1f0e:0:0:0:0 with SMTP id hs14csp1554740mab; Thu, 19 May 2022 10:57:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkSPBHItETKNRDqZ+GLM1Uc3OWyb9ZxIXDeQWwClT0QJ45dI3fafSyWwnJ/Vr4FfQ3/VAb X-Received: by 2002:a05:6214:627:b0:461:f1be:50d9 with SMTP id a7-20020a056214062700b00461f1be50d9mr4999577qvx.40.1652983062408; Thu, 19 May 2022 10:57:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652983062; cv=none; d=google.com; s=arc-20160816; b=GqAoTvqOaYUesXdMP0labTe5AiEK14s6gf93wFWR/1ILMN6dctqLaFyxQHVyOgA4iI 2R9OPlw0IFksBLiPvY2Bumc3uFpgDGVER/zpqTj1wATyCWFNdHcz8GHxydj1zRJfI/fj VGArxYCTeWxlMddPKhMbDTOd4xJTNvFRt377ZqWBVgZkLY41633k0ngRvhlZjzk1EPiw Hiemdk0UDVmEfllkwknwv8z3qjsK/tPcU6+SqS6MKs0Fb3GcjQr3/Tf1YLdVVqkUzlH0 MUVrHmWQo9Kl/xo2ozY7t0YVau9rQdBF560AsuEK2QfERV3RCELxlMYCPKkmtqf53csb n4Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=YgUeRfpkdJ4o62k2nkr046juo0Vkg6GLb14jjVJCaXM=; b=xrOb0dV1FKKeBhXavnjg+5O1+YAEFh5zelctnIV/f5O3okllVN+8UuPUPYXN9w6h++ A/xb+3uIFTGnc7R509BvGKkrUZK6oauwacFPzYbl2lTfpZpXlDvjx0JqsBQo60TOKXZP G2CQOADoeNsZhSgwjZdYuIStUT8bp8MBM25zyBTdKY1xgVAE7aGQzPatVDjySFXD+KZx EG0jHuD3YPOXL5wRWjbbRA1VyZ9ib7/Ngn+DniKgc3MYA0t18SHNx48Jy3LJo+8l9iMD JwxWa/SbxCXNzO4ysxqG5jw1kxEChxVd4N0Rc0jOm+0rjKTPTFQi4C7oWOegQJqyDIZo 1lhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mZUGU8ae; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d12-20020ac85d8c000000b002ebd38e3763si1305579qtx.526.2022.05.19.10.57.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 May 2022 10:57:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mZUGU8ae; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrkP7-0001lu-TI for patch@linaro.org; Thu, 19 May 2022 13:57:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrk5J-0006Qn-C5 for qemu-devel@nongnu.org; Thu, 19 May 2022 13:37:13 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:36684) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrk5F-0000sK-HE for qemu-devel@nongnu.org; Thu, 19 May 2022 13:37:13 -0400 Received: by mail-wm1-x334.google.com with SMTP id a14-20020a7bc1ce000000b00393fb52a386so5464353wmj.1 for ; Thu, 19 May 2022 10:37:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=YgUeRfpkdJ4o62k2nkr046juo0Vkg6GLb14jjVJCaXM=; b=mZUGU8aegX3KsthTfgy/l6VL5lycrG124JPXFDDa34+LDpnZeqRhVlRXObZ39lsHqr wH36vW67JP43iyiOfDMI3hTkuK+vdNr1zP4DZSiQIePU363G+E5xQ9vEfrv4+iDQuKKR do+xIXtn0KVT5rN1+jx+r47wvJfvEmP/mu4/Vj69amf1mmh+9gIN5ENGJPkrFeRqq2DY mSxfNScngju53tXLMnjRsnbbrLXRyn+mEfTqWKaBPJ/z/DNKDw5Rhbzm8MieaC2aDxKm MgXnlPrxMLru8bMwVx9VFT+Weau4A+uuXsxRlP62GVkhZd9AMSEyDtk0duap5Qs1dHli U3Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YgUeRfpkdJ4o62k2nkr046juo0Vkg6GLb14jjVJCaXM=; b=KV9lkkY74s4VXNlobisjplzCWm4O6TRNqzmBi5w5tAXa8fEmha5px9N1siRZmSZbPP JEUGW16+7egMD+B4IVDV7kd53jk0d64I6HgZyXoFiKYUy4rix9vwLufxThJf6oWfxBtQ e9uvLIz7GYeZC3Eyw/fb8BW/GO+hiJgWqHfkWpBeqXzMVYafZ4eZaHFPeNiC5N3OFAE+ I+ssK+kXBTai5sJStZWacVaQDN2vNe+csNw7WuLQ7GnoK2BRqtAKtMTXNMkDUBxOikiN jO6wnWxaDHrE6C70fjaISFPXhnpBjy3G6AUesGA+emK9IFS471NQ1ZQJpY8XSGqsqcJj dzIA== X-Gm-Message-State: AOAM530S52Eq8jp7ZaHmmNc4akmKhE3yxIl9MtvvK77MxOErOMtELtI6 +dbiLyXAjBscZuGbA9XT9H5Ks9K9nvg10A== X-Received: by 2002:a05:600c:19d1:b0:394:7661:6de9 with SMTP id u17-20020a05600c19d100b0039476616de9mr4893965wmq.76.1652981827762; Thu, 19 May 2022 10:37:07 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id e2-20020adfa742000000b0020c5253d8f2sm180183wrd.62.2022.05.19.10.37.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 May 2022 10:37:07 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 17/22] hw/arm/virt: Fix incorrect non-secure flash dtb node name Date: Thu, 19 May 2022 18:36:46 +0100 Message-Id: <20220519173651.399295-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220519173651.399295-1-peter.maydell@linaro.org> References: <20220519173651.399295-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" In the virt board with secure=on we put two nodes in the dtb for flash devices: one for the secure-only flash, and one for the non-secure flash. We get the reg properties for these correct, but in the DT node name, which by convention includes the base address of devices, we used the wrong address. Fix it. Spotted by dtc, which will complain Warning (unique_unit_address): /flash@0: duplicate unit-address (also used in node /secflash@0) if you dump the dtb from QEMU with -machine dumpdtb=file.dtb and then decompile it with dtc. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20220513131316.4081539-2-peter.maydell@linaro.org --- hw/arm/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 1a45f44435e..587e885a98c 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1195,7 +1195,7 @@ static void virt_flash_fdt(VirtMachineState *vms, qemu_fdt_setprop_string(ms->fdt, nodename, "secure-status", "okay"); g_free(nodename); - nodename = g_strdup_printf("/flash@%" PRIx64, flashbase); + nodename = g_strdup_printf("/flash@%" PRIx64, flashbase + flashsize); qemu_fdt_add_subnode(ms->fdt, nodename); qemu_fdt_setprop_string(ms->fdt, nodename, "compatible", "cfi-flash"); qemu_fdt_setprop_sized_cells(ms->fdt, nodename, "reg",