aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/hpet.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-05-21 10:38:57 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-05-21 10:38:57 +0100
commitf505be0a58bb0757ed34a11695f905e15395ad97 (patch)
tree706176cf3542546cc3cf0bf63ec8feb49cdf4f37 /xen/include/asm-x86/hpet.h
parent306921aa6fe884cd988244e8ad4644a1c76d8cea (diff)
downloadxen-f505be0a58bb0757ed34a11695f905e15395ad97.tar.gz
xen-f505be0a58bb0757ed34a11695f905e15395ad97.tar.bz2
xen-f505be0a58bb0757ed34a11695f905e15395ad97.zip
x86: Fix lapic timer stop issue in deep C state
Local APIC timer may stop at deep C state (C3/C4...) entry/exit. this patch add the logic that use platform timer (HPET) to reenable local APIC timer at C state entry/exit. Signed-off-by: Wei Gang <gang.wei@intel.com> Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/include/asm-x86/hpet.h')
-rw-r--r--xen/include/asm-x86/hpet.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/xen/include/asm-x86/hpet.h b/xen/include/asm-x86/hpet.h
index f3c27cb6a6..1f4681a373 100644
--- a/xen/include/asm-x86/hpet.h
+++ b/xen/include/asm-x86/hpet.h
@@ -49,4 +49,24 @@
#define hpet_write32(y,x) \
(*(volatile u32 *)(fix_to_virt(FIX_HPET_BASE) + (x)) = (y))
+/*
+ * Detect and initialise HPET hardware: return counter update frequency.
+ * Return value is zero if HPET is unavailable.
+ */
+u64 hpet_setup(void);
+
+/*
+ * Callback from legacy timer (PIT channel 0) IRQ handler.
+ * Returns 1 if tick originated from HPET; else 0.
+ */
+int hpet_legacy_irq_tick(void);
+
+/*
+ * Temporarily use an HPET event counter for timer interrupt handling,
+ * rather than using the LAPIC timer. Used for Cx state entry.
+ */
+void hpet_broadcast_init(void);
+void hpet_broadcast_enter(void);
+void hpet_broadcast_exit(void);
+
#endif /* __X86_HPET_H__ */