aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGabriel L. Somlo <somlo@cmu.edu>2016-02-19 13:20:25 -0500
committerGerd Hoffmann <kraxel@redhat.com>2016-03-08 10:46:30 +0100
commitce9a2aa372f567d1a19417ab02789706d132daf7 (patch)
treeb447b7e8da4524f816af2ca23d91c6b4466a36d1 /include
parent97556fe80e4f7252300b3498b3477fb4295153a3 (diff)
fw_cfg: expose control register size in fw_cfg.h
Expose the size of the control register (FW_CFG_CTL_SIZE) in fw_cfg.h. Add comment to fw_cfg_io_realize() pointing out that since the 8-bit data register is always subsumed by the 16-bit control register in the port I/O case, we use the control register width as the *total* width of the (classic, non-DMA) port I/O region reserved for the device. Cc: Marc MarĂ­ <markmb@redhat.com> Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Marc MarĂ­ <markmb@redhat.com> Message-id: 1455906029-25565-2-git-send-email-somlo@cmu.edu Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/nvram/fw_cfg.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h
index 5d19975df5..4315f4e582 100644
--- a/include/hw/nvram/fw_cfg.h
+++ b/include/hw/nvram/fw_cfg.h
@@ -44,6 +44,9 @@
#define FW_CFG_INVALID 0xffff
+/* width in bytes of fw_cfg control register */
+#define FW_CFG_CTL_SIZE 0x02
+
#define FW_CFG_MAX_FILE_PATH 56
#ifndef NO_QEMU_PROTOS