aboutsummaryrefslogtreecommitdiff
path: root/include/hw/nvram
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2013-09-01 17:56:20 +0300
committerMichael S. Tsirkin <mst@redhat.com>2013-10-14 17:48:51 +0300
commitd87072ceeccf4f84a64d4bc59124bcd64286c070 (patch)
tree2ad857412fa827f5619a66a17dc11401559569c2 /include/hw/nvram
parent77d6f4ea7608fe7f47c9d7beddd19191b2e852b2 (diff)
downloadqemu-d87072ceeccf4f84a64d4bc59124bcd64286c070.zip
qemu-d87072ceeccf4f84a64d4bc59124bcd64286c070.tar.gz
qemu-d87072ceeccf4f84a64d4bc59124bcd64286c070.tar.bz2
fw_cfg: interface to trigger callback on read
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/nvram')
-rw-r--r--include/hw/nvram/fw_cfg.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h
index f60dd67..2ab0fc29 100644
--- a/include/hw/nvram/fw_cfg.h
+++ b/include/hw/nvram/fw_cfg.h
@@ -60,6 +60,7 @@ typedef struct FWCfgFiles {
} FWCfgFiles;
typedef void (*FWCfgCallback)(void *opaque, uint8_t *data);
+typedef void (*FWCfgReadCallback)(void *opaque, uint32_t offset);
void fw_cfg_add_bytes(FWCfgState *s, uint16_t key, void *data, size_t len);
void fw_cfg_add_string(FWCfgState *s, uint16_t key, const char *value);
@@ -70,6 +71,9 @@ void fw_cfg_add_callback(FWCfgState *s, uint16_t key, FWCfgCallback callback,
void *callback_opaque, void *data, size_t len);
void fw_cfg_add_file(FWCfgState *s, const char *filename, void *data,
size_t len);
+void fw_cfg_add_file_callback(FWCfgState *s, const char *filename,
+ FWCfgReadCallback callback, void *callback_opaque,
+ void *data, size_t len);
FWCfgState *fw_cfg_init(uint32_t ctl_port, uint32_t data_port,
hwaddr crl_addr, hwaddr data_addr);