summaryrefslogtreecommitdiffstats
path: root/hw/nvram
diff options
context:
space:
mode:
authorHu Tao <hutao@cn.fujitsu.com>2013-04-26 11:24:44 +0800
committerAnthony Liguori <aliguori@us.ibm.com>2013-04-30 10:30:01 -0500
commit10a584b2875a391d1036adac18955a892e56f5e3 (patch)
tree8c87ec63eae4dec13b228588a157838ccac1c230 /hw/nvram
parent1dfe5057e5cf45b296ae67a7f84bdc6fa618d602 (diff)
downloadhqemu-10a584b2875a391d1036adac18955a892e56f5e3.zip
hqemu-10a584b2875a391d1036adac18955a892e56f5e3.tar.gz
pvpanic: pass configurable ioport to seabios
This lets seabios patch the corresponding SSDT entry. Also add fw_cfg object to /machine/fw_cfg so we can reference it elsewhere. Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 60c65d95fe2b23b12bea67099126566010a11a1a.1366945969.git.hutao@cn.fujitsu.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/nvram')
-rw-r--r--hw/nvram/fw_cfg.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
index 97bba87..1a7e49c 100644
--- a/hw/nvram/fw_cfg.c
+++ b/hw/nvram/fw_cfg.c
@@ -489,11 +489,17 @@ FWCfgState *fw_cfg_init(uint32_t ctl_port, uint32_t data_port,
dev = qdev_create(NULL, "fw_cfg");
qdev_prop_set_uint32(dev, "ctl_iobase", ctl_port);
qdev_prop_set_uint32(dev, "data_iobase", data_port);
- qdev_init_nofail(dev);
d = SYS_BUS_DEVICE(dev);
s = DO_UPCAST(FWCfgState, busdev.qdev, dev);
+ if (!object_resolve_path("/machine/fw_cfg", NULL)) {
+ object_property_add_child(qdev_get_machine(), "fw_cfg", OBJECT(s),
+ NULL);
+ }
+
+ qdev_init_nofail(dev);
+
if (ctl_addr) {
sysbus_mmio_map(d, 0, ctl_addr);
}
OpenPOWER on IntegriCloud