ia64/xen-unstable

view xen/include/asm-x86/hpet.h @ 19848:5839491bbf20

[IA64] replace MAX_VCPUS with d->max_vcpus where necessary.

don't use MAX_VCPUS, and use vcpu::max_vcpus.
The changeset of 2f9e1348aa98 introduced max_vcpus to allow more vcpus
per guest. This patch is ia64 counter part.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jun 29 11:26:05 2009 +0900 (2009-06-29)
parents 573e6673e9e0
children
line source
1 #ifndef __X86_HPET_H__
2 #define __X86_HPET_H__
4 /*
5 * Documentation on HPET can be found at:
6 * http://www.intel.com/ial/home/sp/pcmmspec.htm
7 * ftp://download.intel.com/ial/home/sp/mmts098.pdf
8 */
10 #define HPET_MMAP_SIZE 1024
12 #define HPET_ID 0x000
13 #define HPET_PERIOD 0x004
14 #define HPET_CFG 0x010
15 #define HPET_STATUS 0x020
16 #define HPET_COUNTER 0x0f0
17 #define HPET_T0_CFG 0x100
18 #define HPET_T0_CMP 0x108
19 #define HPET_T0_ROUTE 0x110
20 #define HPET_T1_CFG 0x120
21 #define HPET_T1_CMP 0x128
22 #define HPET_T1_ROUTE 0x130
23 #define HPET_T2_CFG 0x140
24 #define HPET_T2_CMP 0x148
25 #define HPET_T2_ROUTE 0x150
27 #define HPET_Tn_CFG(n) (HPET_T0_CFG + n * 0x20)
28 #define HPET_Tn_CMP(n) (HPET_T0_CMP + n * 0x20)
29 #define HPET_Tn_ROUTE(n) (HPET_T0_ROUTE + n * 0x20)
31 #define HPET_ID_VENDOR 0xffff0000
32 #define HPET_ID_LEGSUP 0x00008000
33 #define HPET_ID_NUMBER 0x00001f00
34 #define HPET_ID_REV 0x000000ff
35 #define HPET_ID_NUMBER_SHIFT 8
37 #define HPET_ID_VENDOR_SHIFT 16
38 #define HPET_ID_VENDOR_8086 0x8086
40 #define HPET_CFG_ENABLE 0x001
41 #define HPET_CFG_LEGACY 0x002
42 #define HPET_LEGACY_8254 2
43 #define HPET_LEGACY_RTC 8
45 #define HPET_TN_ENABLE 0x004
46 #define HPET_TN_PERIODIC 0x008
47 #define HPET_TN_PERIODIC_CAP 0x010
48 #define HPET_TN_SETVAL 0x040
49 #define HPET_TN_32BIT 0x100
50 #define HPET_TN_ROUTE 0x3e00
51 #define HPET_TN_FSB 0x4000
52 #define HPET_TN_FSB_CAP 0x8000
53 #define HPET_TN_ROUTE_SHIFT 9
56 #define hpet_read32(x) \
57 (*(volatile u32 *)(fix_to_virt(FIX_HPET_BASE) + (x)))
58 #define hpet_write32(y,x) \
59 (*(volatile u32 *)(fix_to_virt(FIX_HPET_BASE) + (x)) = (y))
61 /*
62 * Detect and initialise HPET hardware: return counter update frequency.
63 * Return value is zero if HPET is unavailable.
64 */
65 u64 hpet_setup(void);
67 /*
68 * Callback from legacy timer (PIT channel 0) IRQ handler.
69 * Returns 1 if tick originated from HPET; else 0.
70 */
71 int hpet_legacy_irq_tick(void);
73 /*
74 * Temporarily use an HPET event counter for timer interrupt handling,
75 * rather than using the LAPIC timer. Used for Cx state entry.
76 */
77 void hpet_broadcast_init(void);
78 void hpet_broadcast_enter(void);
79 void hpet_broadcast_exit(void);
80 int hpet_broadcast_is_available(void);
81 void hpet_disable_legacy_broadcast(void);
83 #endif /* __X86_HPET_H__ */