Message ID | 548615CE.10100@redhat.com |
---|---|
State | New |
Headers | show |
On 8 December 2014 at 21:19, Laszlo Ersek <lersek@redhat.com> wrote: > So the following in addition makes it work on TCG (x86_64) too: > > ----------------- > diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c > index 7147fea..c2bc44c 100644 > --- a/hw/nvram/fw_cfg.c > +++ b/hw/nvram/fw_cfg.c > @@ -31,7 +31,7 @@ > #include "qemu/config-file.h" > > #define FW_CFG_SIZE 2 > -#define FW_CFG_DATA_SIZE 1 > +#define FW_CFG_DATA_SIZE 8 > #define TYPE_FW_CFG "fw_cfg" > #define FW_CFG_NAME "fw_cfg" > #define FW_CFG_PATH "/machine/" FW_CFG_NAME > ----------------- > > It affects the memory_region_init_io() call in fw_cfg_initfn(). > > I hope to submit a small v3 series soon. If you do that don't you now try to define an ioport on x86 that's 8 bytes wide? You probably also need to check whether the ppc and sparc boards that use mmio fw_cfg can handle the wider data register. -- PMM
On 12/08/14 22:34, Peter Maydell wrote: > On 8 December 2014 at 21:19, Laszlo Ersek <lersek@redhat.com> wrote: >> So the following in addition makes it work on TCG (x86_64) too: >> >> ----------------- >> diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c >> index 7147fea..c2bc44c 100644 >> --- a/hw/nvram/fw_cfg.c >> +++ b/hw/nvram/fw_cfg.c >> @@ -31,7 +31,7 @@ >> #include "qemu/config-file.h" >> >> #define FW_CFG_SIZE 2 >> -#define FW_CFG_DATA_SIZE 1 >> +#define FW_CFG_DATA_SIZE 8 >> #define TYPE_FW_CFG "fw_cfg" >> #define FW_CFG_NAME "fw_cfg" >> #define FW_CFG_PATH "/machine/" FW_CFG_NAME >> ----------------- >> >> It affects the memory_region_init_io() call in fw_cfg_initfn(). >> >> I hope to submit a small v3 series soon. > > If you do that don't you now try to define an ioport on > x86 that's 8 bytes wide? You probably also need to check > whether the ppc and sparc boards that use mmio fw_cfg > can handle the wider data register. The above was just a quick PoC. The series I'm about to post takes care not to change anything (not even gdb experience) for clients that don't request the wider register. Thanks Laszlo
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index 7147fea..c2bc44c 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -31,7 +31,7 @@ #include "qemu/config-file.h" #define FW_CFG_SIZE 2 -#define FW_CFG_DATA_SIZE 1 +#define FW_CFG_DATA_SIZE 8 #define TYPE_FW_CFG "fw_cfg" #define FW_CFG_NAME "fw_cfg" #define FW_CFG_PATH "/machine/" FW_CFG_NAME