From: Laszlo Ersek <lersek@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
qemu-devel@nongnu.org, imammedo@redhat.com, somlo@cmu.edu,
ehabkost@redhat.com, mst@redhat.com, pbonzini@redhat.com,
rjones@redhat.com, peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCHv2 4/4] fw_cfg: move QOM type defines into fw_cfg.h
Date: Tue, 13 Jun 2017 00:52:42 +0200 [thread overview]
Message-ID: <7908b46e-a36b-024e-ea30-0390d5367fde@redhat.com> (raw)
In-Reply-To: <1497302470-10776-5-git-send-email-mark.cave-ayland@ilande.co.uk>
On 06/12/17 23:21, Mark Cave-Ayland wrote:
> This allows the device to be instantiated externally for boards that
> wish to wire up the fw_cfg device themselves.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
> hw/nvram/fw_cfg.c | 8 --------
> include/hw/nvram/fw_cfg.h | 8 ++++++++
> 2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
> index 6c21e43..22a8404 100644
> --- a/hw/nvram/fw_cfg.c
> +++ b/hw/nvram/fw_cfg.c
> @@ -40,14 +40,6 @@
> #define FW_CFG_NAME "fw_cfg"
> #define FW_CFG_PATH "/machine/" FW_CFG_NAME
>
> -#define TYPE_FW_CFG "fw_cfg"
> -#define TYPE_FW_CFG_IO "fw_cfg_io"
> -#define TYPE_FW_CFG_MEM "fw_cfg_mem"
> -
> -#define FW_CFG(obj) OBJECT_CHECK(FWCfgState, (obj), TYPE_FW_CFG)
> -#define FW_CFG_IO(obj) OBJECT_CHECK(FWCfgIoState, (obj), TYPE_FW_CFG_IO)
> -#define FW_CFG_MEM(obj) OBJECT_CHECK(FWCfgMemState, (obj), TYPE_FW_CFG_MEM)
> -
> /* FW_CFG_VERSION bits */
> #define FW_CFG_VERSION 0x01
> #define FW_CFG_VERSION_DMA 0x02
> diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h
> index b980cba..e515698 100644
> --- a/include/hw/nvram/fw_cfg.h
> +++ b/include/hw/nvram/fw_cfg.h
> @@ -4,6 +4,14 @@
> #include "exec/hwaddr.h"
> #include "hw/nvram/fw_cfg_keys.h"
>
> +#define TYPE_FW_CFG "fw_cfg"
> +#define TYPE_FW_CFG_IO "fw_cfg_io"
> +#define TYPE_FW_CFG_MEM "fw_cfg_mem"
> +
> +#define FW_CFG(obj) OBJECT_CHECK(FWCfgState, (obj), TYPE_FW_CFG)
> +#define FW_CFG_IO(obj) OBJECT_CHECK(FWCfgIoState, (obj), TYPE_FW_CFG_IO)
> +#define FW_CFG_MEM(obj) OBJECT_CHECK(FWCfgMemState, (obj), TYPE_FW_CFG_MEM)
> +
> typedef struct FWCfgFile {
> uint32_t size; /* file size */
> uint16_t select; /* write this to 0x510 to read it */
>
With the concern that I voiced under patch #3 (namely that board code
might be required to set up the machine-wide link to the sole fw-cfg
device manually, outside of realize):
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
next prev parent reply other threads:[~2017-06-12 22:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-12 21:21 [Qemu-devel] [PATCHv2 0/4] fw_cfg: qdev-related tidy-ups Mark Cave-Ayland
2017-06-12 21:21 ` [Qemu-devel] [PATCHv2 1/4] fw_cfg: don't map the fw_cfg IO ports in fw_cfg_io_realize() Mark Cave-Ayland
2017-06-12 22:27 ` Laszlo Ersek
2017-06-12 23:12 ` Laszlo Ersek
2017-06-13 18:27 ` Mark Cave-Ayland
2017-06-14 12:34 ` Paolo Bonzini
2017-06-12 21:21 ` [Qemu-devel] [PATCHv2 2/4] fw_cfg: move setting of FW_CFG_VERSION_DMA bit to fw_cfg_init1() Mark Cave-Ayland
2017-06-12 22:31 ` Laszlo Ersek
2017-06-12 21:21 ` [Qemu-devel] [PATCHv2 3/4] fw_cfg: move qdev_init_nofail() from fw_cfg_init1() to callers Mark Cave-Ayland
2017-06-12 22:50 ` Laszlo Ersek
2017-06-16 9:52 ` Mark Cave-Ayland
2017-06-12 21:21 ` [Qemu-devel] [PATCHv2 4/4] fw_cfg: move QOM type defines into fw_cfg.h Mark Cave-Ayland
2017-06-12 22:52 ` Laszlo Ersek [this message]
2017-06-14 12:38 ` [Qemu-devel] [PATCHv2 0/4] fw_cfg: qdev-related tidy-ups Paolo Bonzini
2017-06-16 10:02 ` Mark Cave-Ayland
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=7908b46e-a36b-024e-ea30-0390d5367fde@redhat.com \
--to=lersek@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
--cc=somlo@cmu.edu \
/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).