qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Xiang Zheng <zhengxiang9@huawei.com>
To: <peter.maydell@linaro.org>, <thuth@redhat.com>, <lvivier@redhat.com>
Cc: lersek@redhat.com, qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	kraxel@redhat.com, wanghaibin.wang@huawei.com,
	pbonzini@redhat.com, philmd@redhat.com
Subject: [PATCH 4/5] hw/arm/virt: Add FW_CFG_RAM_SIZE and FW_CFG_MAX_CPUS into fw_cfg
Date: Tue, 3 Dec 2019 20:27:52 +0800	[thread overview]
Message-ID: <20191203122753.19792-5-zhengxiang9@huawei.com> (raw)
In-Reply-To: <20191203122753.19792-1-zhengxiang9@huawei.com>

I'm not sure whether it's neccesary to add FW_CFG_RAM_SIZE and
FW_CFG_MAX_CPUS into fw_cfg on virt machine. This patch just makes
the fw_cfg-test happy.

Signed-off-by: Xiang Zheng <zhengxiang9@huawei.com>
---
 hw/arm/virt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index d4bedc2607..26a4183775 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1084,6 +1084,9 @@ static FWCfgState *create_fw_cfg(const VirtMachineState *vms, AddressSpace *as)
     fw_cfg = fw_cfg_init_mem_wide(base + 8, base, 8, base + 16, as);
     fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, (uint16_t)ms->smp.cpus);
 
+    fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)ram_size);
+    fw_cfg_add_i16(fw_cfg, FW_CFG_MAX_CPUS, (uint16_t)ms->smp.max_cpus);
+
     nodename = g_strdup_printf("/fw-cfg@%" PRIx64, base);
     qemu_fdt_add_subnode(vms->fdt, nodename);
     qemu_fdt_setprop_string(vms->fdt, nodename,
-- 
2.19.1




  parent reply	other threads:[~2019-12-03 12:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03 12:27 [PATCH 0/5] tests: Enable fw_cfg tests on AArch64 Xiang Zheng
2019-12-03 12:27 ` [PATCH 1/5] tests: fw_cfg: Rename pc_fw_cfg_* to fw_cfg_* Xiang Zheng
2019-12-03 12:34   ` Peter Maydell
2019-12-04  6:13     ` Xiang Zheng
2019-12-03 12:27 ` [PATCH 2/5] tests: fw_cfg: Support read/write of fw_cfg registers on aarch64 Xiang Zheng
2019-12-03 12:27 ` [PATCH 3/5] tests: fw_cfg: Use virt as default machine in fw_cfg-test.c Xiang Zheng
2019-12-03 12:27 ` Xiang Zheng [this message]
2019-12-03 12:32   ` [PATCH 4/5] hw/arm/virt: Add FW_CFG_RAM_SIZE and FW_CFG_MAX_CPUS into fw_cfg Peter Maydell
2019-12-04  6:14     ` Xiang Zheng
2019-12-03 12:27 ` [PATCH 5/5] tests: Enable fw_cfg test on aarch64 Xiang Zheng
2019-12-03 13:01 ` [PATCH 0/5] tests: Enable fw_cfg tests on AArch64 Thomas Huth
2019-12-04  6:18   ` Xiang Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191203122753.19792-5-zhengxiang9@huawei.com \
    --to=zhengxiang9@huawei.com \
    --cc=kraxel@redhat.com \
    --cc=lersek@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wanghaibin.wang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).