qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fw_cfg: Set the max fw_cfg mem read size to 8 bytes
@ 2021-05-18 12:43 Xiaojuan Yang
  2021-05-18 15:49 ` Laszlo Ersek
  0 siblings, 1 reply; 3+ messages in thread
From: Xiaojuan Yang @ 2021-05-18 12:43 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Laszlo Ersek, Gerd Hoffmann
  Cc: yangxiaojuan, qemu-devel

From: yangxiaojuan <yangxiaojuan@loongson.cn>

fw_cfg_data_read() func supports access widths from
1 to 8 bytes while the ops set the wrong read size.

Most arch use 8 bytes to send ram_size to bios.

Signed-off-by: yangxiaojuan <yangxiaojuan@loongson.cn>
---
 hw/nvram/fw_cfg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
index 9b8dcca4ea..242614152c 100644
--- a/hw/nvram/fw_cfg.c
+++ b/hw/nvram/fw_cfg.c
@@ -540,7 +540,7 @@ static const MemoryRegionOps fw_cfg_data_mem_ops = {
     .endianness = DEVICE_BIG_ENDIAN,
     .valid = {
         .min_access_size = 1,
-        .max_access_size = 1,
+        .max_access_size = 8,
         .accepts = fw_cfg_data_mem_valid,
     },
 };
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-19  3:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-18 12:43 [PATCH] fw_cfg: Set the max fw_cfg mem read size to 8 bytes Xiaojuan Yang
2021-05-18 15:49 ` Laszlo Ersek
2021-05-19  3:08   ` yangxiaojuan

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).