[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/5] tests: fw_cfg: Rename pc_fw_cfg_* to fw_cfg_*
From: |
Peter Maydell |
Subject: |
Re: [PATCH 1/5] tests: fw_cfg: Rename pc_fw_cfg_* to fw_cfg_* |
Date: |
Tue, 3 Dec 2019 12:34:30 +0000 |
On Tue, 3 Dec 2019 at 12:29, Xiang Zheng <address@hidden> wrote:
>
> Rename pc_fw_cfg_* to fw_cfg_* to make them common for other
> architectures so that we can run fw_cfg tests on aarch64.
>
> Signed-off-by: Xiang Zheng <address@hidden>
> -static inline QFWCFG *pc_fw_cfg_init(QTestState *qts)
> +static inline QFWCFG *fw_cfg_init(QTestState *qts)
> {
> - return io_fw_cfg_init(qts, 0x510);
> + const char *arch = qtest_get_arch();
> +
> + if (!strcmp(arch, "aarch64")) {
> + return mm_fw_cfg_init(qts, 0x09020000);
> + } else {
> + return io_fw_cfg_init(qts, 0x510);
> + }
Presence and address of the fw_cfg device depends
on the machine type, not the architecture, so is
it possible to write this so that it varies by
machine type, rather than by guest arch ?
There should also presumably be a fallback path
for "fw_cfg not present here", I suppose.
thanks
-- PMM
- [PATCH 0/5] tests: Enable fw_cfg tests on AArch64, Xiang Zheng, 2019/12/03
- [PATCH 4/5] hw/arm/virt: Add FW_CFG_RAM_SIZE and FW_CFG_MAX_CPUS into fw_cfg, Xiang Zheng, 2019/12/03
- [PATCH 2/5] tests: fw_cfg: Support read/write of fw_cfg registers on aarch64, Xiang Zheng, 2019/12/03
- [PATCH 5/5] tests: Enable fw_cfg test on aarch64, Xiang Zheng, 2019/12/03
- [PATCH 3/5] tests: fw_cfg: Use virt as default machine in fw_cfg-test.c, Xiang Zheng, 2019/12/03
- [PATCH 1/5] tests: fw_cfg: Rename pc_fw_cfg_* to fw_cfg_*, Xiang Zheng, 2019/12/03
- Re: [PATCH 1/5] tests: fw_cfg: Rename pc_fw_cfg_* to fw_cfg_*,
Peter Maydell <=
- Re: [PATCH 0/5] tests: Enable fw_cfg tests on AArch64, Thomas Huth, 2019/12/03