aboutsummaryrefslogtreecommitdiff
path: root/hw/hpet_emul.h
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/hpet_emul.h
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/hpet_emul.h')
-rw-r--r--hw/hpet_emul.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/hw/hpet_emul.h b/hw/hpet_emul.h
index d7bc102c22..8bf312ab21 100644
--- a/hw/hpet_emul.h
+++ b/hw/hpet_emul.h
@@ -53,4 +53,19 @@
#define HPET_TN_INT_ROUTE_CAP_SHIFT 32
#define HPET_TN_CFG_BITS_READONLY_OR_RESERVED 0xffff80b1U
+struct hpet_fw_entry
+{
+ uint32_t event_timer_block_id;
+ uint64_t address;
+ uint16_t min_tick;
+ uint8_t page_prot;
+} __attribute__ ((packed));
+
+struct hpet_fw_config
+{
+ uint8_t count;
+ struct hpet_fw_entry hpet[8];
+} __attribute__ ((packed));
+
+extern struct hpet_fw_config hpet_cfg;
#endif