From 26491a388ce69d80c6d7d2b15ddf93d4399f04bc Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 26 Jun 2013 15:52:22 +0200 Subject: libqos: Generalize I/O-mapped fw_cfg Provide a constructor that takes the base address in addition to the PC-specific one. Signed-off-by: Markus Armbruster Message-id: 1372254743-15808-12-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori --- tests/libqos/fw_cfg.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/libqos/fw_cfg.h') diff --git a/tests/libqos/fw_cfg.h b/tests/libqos/fw_cfg.h index 19bb053..61b1548 100644 --- a/tests/libqos/fw_cfg.h +++ b/tests/libqos/fw_cfg.h @@ -33,5 +33,11 @@ uint32_t qfw_cfg_get_u32(QFWCFG *fw_cfg, uint16_t key); uint64_t qfw_cfg_get_u64(QFWCFG *fw_cfg, uint16_t key); QFWCFG *mm_fw_cfg_init(uint64_t base); +QFWCFG *io_fw_cfg_init(uint16_t base); + +static inline QFWCFG *pc_fw_cfg_init(void) +{ + return io_fw_cfg_init(0x510); +} #endif -- cgit v1.1