From nobody Mon Feb 9 06:00:51 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1659693264; cv=none; d=zohomail.com; s=zohoarc; b=A9zjK9GTwTycLbjpKH97PZK89nbXrdF3VT3LcmXOEPZwbkiBwGdPbOW2bSQ5+7vpkS3aKybeV4ciL5PjXG5KHpa3Li/LD+W5rKo5BYK3maoWb1k+dr/SAFXicR0zcTWatIdQU7dWUbSyE1Y7r5iwVqugC2VyDhSlWJcylqOEq7w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659693264; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LZCK1LNH2Rj6X2lYdtcZHY6VpwRx32I2PwlVD4SMxlk=; b=jEt817QPGFKReen4JEMUUsNuG6DIuK8ZHPYg2T2X03rj5GbU3vupQ2EjEoIBPOWasCjdtTZQtv68wL+TermE5pSNt47TVXgrsPtijrcpZfvqaidpP8owmtj3p2UX0UWSRxHXE3VodGOj3xnYMek6QZC+84xOvOnZSXnsu1HnXAQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 165969326448564.71152063956174; Fri, 5 Aug 2022 02:54:24 -0700 (PDT) Received: from localhost ([::1]:53738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJu2B-0006iT-G1 for importer@patchew.org; Fri, 05 Aug 2022 05:54:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJtog-0007Zf-Pa for qemu-devel@nongnu.org; Fri, 05 Aug 2022 05:40:28 -0400 Received: from mail-vs1-xe2f.google.com ([2607:f8b0:4864:20::e2f]:40578) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJtob-0001g1-58 for qemu-devel@nongnu.org; Fri, 05 Aug 2022 05:40:23 -0400 Received: by mail-vs1-xe2f.google.com with SMTP id q190so1921781vsb.7 for ; Fri, 05 Aug 2022 02:40:18 -0700 (PDT) Received: from balboa.COMFAST ([191.19.239.67]) by smtp.gmail.com with ESMTPSA id f9-20020a1f1f09000000b00376f4f93745sm2668496vkf.10.2022.08.05.02.40.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Aug 2022 02:40:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=LZCK1LNH2Rj6X2lYdtcZHY6VpwRx32I2PwlVD4SMxlk=; b=XoZUD7O4xvSOxrCRLxv+o9IXEcjt8dBoTgF6HIDIz5jyIVuR7dTZcN1qt8cD5MdxYX Urrlpg2hUMwV8pjTDJqGlWAXhhBe4Jiwq3wj+Hm2yF91oaHEo7gHsJNEXwirqAwmInh+ 7DRTzepMsbsdKPtuZROHr0p1nMR4VCQPT4L9ZXhuIToOEdjC3/LNYJu/rTyBhlgz68y5 6ZP0mjR7XK3sP+wqeN2B6Yve2hZCDxhkjZ+lY3EnbJgL4t22PfExR3KoZ0DaaLcEYC91 8TIPEe1LODGjlBj3ClxB6C1AkBP6tMiUzbp/IH+UCW0p4/bYb8nM1C1o7UREESwpMPKT 756g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=LZCK1LNH2Rj6X2lYdtcZHY6VpwRx32I2PwlVD4SMxlk=; b=YbjC6ADyMn0OouNocVJEVJQ+iZPrvPBuelBygJZ08AUqXfkdrL9Njefx5RylR9LVFi +D7rL5DKfEBCDlbPE0qwALaonTGgQzor7tOJzaUFW4UjL2/oEnHTU7GqITKvX6UoIjZH vDp9oW0CHP5nkjvIa6mUBKVe1sBiVb8wYPGLni3BkbpWKwcNMnCVuVTbFpviIFPs32Hq 1c78x9QBqcv++T1lU7xbz0WM4oFiefLNuzjoTzxBUqhFnpzHP52EGCAPB66GpIuyT3Rk YBAa35uB9hrbC5hAVCPZ3G5UMCQSVFbMq6bYEBecO4Acko5iLcOrSOXpGbbQLTFu3tLK Blhw== X-Gm-Message-State: ACgBeo35o4Jjg+UTVWIAa3kBVY2CRLRmUXz6yafuomAsGnvll3T1hDyC e2BX7hzKyucPhXziI9NepjsGxO2LfJY= X-Google-Smtp-Source: AA6agR4x+oOfAJMTgrn2UF0WIksXVSM/Mq6HQ+vhLjLPLxU4oezy1cCtXC2vSamwc9bO/e7CYnvSkQ== X-Received: by 2002:a67:c009:0:b0:357:92c6:77cc with SMTP id v9-20020a67c009000000b0035792c677ccmr2422917vsi.35.1659692417608; Fri, 05 Aug 2022 02:40:17 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: alistair.francis@wdc.com, david@gibson.dropbear.id.au, Daniel Henrique Barboza , Alistair Francis , Bin Meng , Palmer Dabbelt Subject: [PATCH for-7.2 v2 11/20] hw/riscv: set machine->fdt in sifive_u_machine_init() Date: Fri, 5 Aug 2022 06:39:39 -0300 Message-Id: <20220805093948.82561-12-danielhb413@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220805093948.82561-1-danielhb413@gmail.com> References: <20220805093948.82561-1-danielhb413@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::e2f; envelope-from=danielhb413@gmail.com; helo=mail-vs1-xe2f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1659693265250100001 Content-Type: text/plain; charset="utf-8" This will enable support for 'dumpdtb' and 'info fdt' HMP commands for the sifive_u machine. Cc: Alistair Francis Cc: Bin Meng Cc: Palmer Dabbelt Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- hw/riscv/sifive_u.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index e4c814a3ea..10f5289966 100644 --- a/hw/riscv/sifive_u.c +++ b/hw/riscv/sifive_u.c @@ -634,6 +634,14 @@ static void sifive_u_machine_init(MachineState *machin= e) start_addr_hi32 =3D (uint64_t)start_addr >> 32; } =20 + /* + * Update the machine->fdt pointer to enable support for + * 'dumpdtb' and 'info fdt' commands. Use fdt_pack() to shrink + * the blob size we're going to store. + */ + fdt_pack(s->fdt); + machine->fdt =3D s->fdt; + /* reset vector */ uint32_t reset_vec[12] =3D { s->msel, /* MSEL pin state */ --=20 2.36.1