qemu-arm
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]