peterdelevoryas / rpms / qemu

Forked from rpms/qemu 2 years ago
Clone

Blame 0006-fw_cfg_mem-max-access-size-and-region-size-are-the-s.patch

391fb8
From dfcc3acd2510e5adc3dbb67c83a131bf5fb017ec Mon Sep 17 00:00:00 2001
391fb8
From: Laszlo Ersek <lersek@redhat.com>
391fb8
Date: Mon, 22 Dec 2014 13:11:37 +0100
391fb8
Subject: [PATCH 06/15] fw_cfg_mem: max access size and region size are the
391fb8
 same for data register
391fb8
391fb8
Make it clear that the maximum access size to the MMIO data register
391fb8
determines the full size of the memory region.
391fb8
391fb8
Currently the max access size is 1.
391fb8
391fb8
This patch doesn't change behavior.
391fb8
391fb8
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
391fb8
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
391fb8
Message-id: 1419250305-31062-4-git-send-email-pbonzini@redhat.com
391fb8
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
391fb8
(cherry picked from commit 86099db3823fec1800225f89544014a98b227ed9)
391fb8
---
391fb8
 hw/nvram/fw_cfg.c | 4 ++--
391fb8
 1 file changed, 2 insertions(+), 2 deletions(-)
391fb8
391fb8
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
391fb8
index c48bc6e..8deb860 100644
391fb8
--- a/hw/nvram/fw_cfg.c
391fb8
+++ b/hw/nvram/fw_cfg.c
391fb8
@@ -31,7 +31,6 @@
391fb8
 #include "qemu/config-file.h"
391fb8
 
391fb8
 #define FW_CFG_SIZE 2
391fb8
-#define FW_CFG_DATA_SIZE 1
391fb8
 #define FW_CFG_NAME "fw_cfg"
391fb8
 #define FW_CFG_PATH "/machine/" FW_CFG_NAME
391fb8
 
391fb8
@@ -694,7 +693,8 @@ static void fw_cfg_mem_realize(DeviceState *dev, Error **errp)
391fb8
     sysbus_init_mmio(sbd, &s->ctl_iomem);
391fb8
 
391fb8
     memory_region_init_io(&s->data_iomem, OBJECT(s), &fw_cfg_data_mem_ops,
391fb8
-                          FW_CFG(s), "fwcfg.data", FW_CFG_DATA_SIZE);
391fb8
+                          FW_CFG(s), "fwcfg.data",
391fb8
+                          fw_cfg_data_mem_ops.valid.max_access_size);
391fb8
     sysbus_init_mmio(sbd, &s->data_iomem);
391fb8
 }
391fb8
 
391fb8
-- 
391fb8
2.1.0
391fb8