[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: |
Xiang Zheng |
Subject: |
Re: [PATCH 1/5] tests: fw_cfg: Rename pc_fw_cfg_* to fw_cfg_* |
Date: |
Wed, 4 Dec 2019 14:13:53 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 |
On 2019/12/3 20:34, Peter Maydell wrote:
> 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.
>
Yes, "0x09020000" is the address of the fw_cfg device on virt machine, I
should have noticed it. I will have a try for varying the addresses
by machine type.
--
Thanks,
Xiang
- [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 3/5] tests: fw_cfg: Use virt as default machine in fw_cfg-test.c, Xiang Zheng, 2019/12/03
- [PATCH 5/5] tests: Enable fw_cfg test on aarch64, 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 1/5] tests: fw_cfg: Rename pc_fw_cfg_* to fw_cfg_*, Xiang Zheng, 2019/12/03
- Re: [PATCH 0/5] tests: Enable fw_cfg tests on AArch64, Thomas Huth, 2019/12/03