summaryrefslogtreecommitdiff
path: root/hw/pc.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2010-06-14 11:29:28 +0300
committerAnthony Liguori <aliguori@us.ibm.com>2010-06-14 11:12:53 -0500
commit40ac17cd56eb5c5a89559ea0fa53f7eea80cbd07 (patch)
tree5075aa9aac81afe13cf9115423b0ea523ddc87ef /hw/pc.c
parent072c2c31c27204e8e1897c52e481d2ab0b4d075d (diff)
pass info about hpets to seabios.]
Currently HPET ACPI table is created regardless of whether qemu actually created hpet device. This may confuse some guests that don't check that hpet is functional before using it. Solve this by passing info about hpets in qemu to seabios via fw config interface. Additional benefit is that seabios no longer uses hard coded hpet configuration. Proposed interface supports up to 8 hpets. This is the number defined by hpet spec. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pc.c')
-rw-r--r--hw/pc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/pc.c b/hw/pc.c
index 0f7d330609..0211fbf0f8 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -62,6 +62,7 @@
#define FW_CFG_SMBIOS_ENTRIES (FW_CFG_ARCH_LOCAL + 1)
#define FW_CFG_IRQ0_OVERRIDE (FW_CFG_ARCH_LOCAL + 2)
#define FW_CFG_E820_TABLE (FW_CFG_ARCH_LOCAL + 3)
+#define FW_CFG_HPET (FW_CFG_ARCH_LOCAL + 4)
#define E820_NR_ENTRIES 16
@@ -485,6 +486,8 @@ static void *bochs_bios_init(void)
fw_cfg_add_bytes(fw_cfg, FW_CFG_E820_TABLE, (uint8_t *)&e820_table,
sizeof(struct e820_table));
+ fw_cfg_add_bytes(fw_cfg, FW_CFG_HPET, (uint8_t *)&hpet_cfg,
+ sizeof(struct hpet_fw_config));
/* allocate memory for the NUMA channel: one (64bit) word for the number
* of nodes, one word for each VCPU->node and one word for each node to
* hold the amount of memory.