aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-07-21 09:46:17 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-07-21 09:46:17 +0100
commitd84cb0723cbab44f52f553ca8769bd72b57325ed (patch)
tree6fe2b4c007402ceb1aa248d92f655bcaa53775e2
parent9829c9f3ec5266b57cd01d2a93451480186d0658 (diff)
downloadxen-d84cb0723cbab44f52f553ca8769bd72b57325ed.tar.gz
xen-d84cb0723cbab44f52f553ca8769bd72b57325ed.tar.bz2
xen-d84cb0723cbab44f52f553ca8769bd72b57325ed.zip
x86: More accurate PIT frequency estimation (1193182Hz)
In practice this has no impact since variance between crystals will be substantially greater than 1-2ppm. But we may as well be as accurate as possible. From: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
-rw-r--r--xen/arch/x86/i8259.c2
-rw-r--r--xen/arch/x86/time.c2
-rw-r--r--xen/include/asm-x86/hvm/vpt.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/xen/arch/x86/i8259.c b/xen/arch/x86/i8259.c
index 815e9e57f3..525bf1720e 100644
--- a/xen/arch/x86/i8259.c
+++ b/xen/arch/x86/i8259.c
@@ -411,7 +411,7 @@ void __init init_IRQ(void)
apic_intr_init();
/* Set the clock to HZ Hz */
-#define CLOCK_TICK_RATE 1193180 /* crystal freq (Hz) */
+#define CLOCK_TICK_RATE 1193182 /* crystal freq (Hz) */
#define LATCH (((CLOCK_TICK_RATE)+(HZ/2))/HZ)
outb_p(0x34, PIT_MODE); /* binary, mode 2, LSB/MSB, ch 0 */
outb_p(LATCH & 0xff, PIT_CH0); /* LSB */
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 24df5bcbe4..24bd8f8acb 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -214,7 +214,7 @@ static struct irqaction irq0 = { timer_interrupt, "timer", NULL };
* Return processor ticks per second / CALIBRATE_FRAC.
*/
-#define CLOCK_TICK_RATE 1193180 /* system crystal frequency (Hz) */
+#define CLOCK_TICK_RATE 1193182 /* system crystal frequency (Hz) */
#define CALIBRATE_FRAC 20 /* calibrate over 50ms */
#define CALIBRATE_LATCH ((CLOCK_TICK_RATE+(CALIBRATE_FRAC/2))/CALIBRATE_FRAC)
diff --git a/xen/include/asm-x86/hvm/vpt.h b/xen/include/asm-x86/hvm/vpt.h
index db58653411..b43f5aea2e 100644
--- a/xen/include/asm-x86/hvm/vpt.h
+++ b/xen/include/asm-x86/hvm/vpt.h
@@ -95,7 +95,7 @@ struct periodic_time {
};
-#define PIT_FREQ 1193181
+#define PIT_FREQ 1193182
#define PIT_BASE 0x40
typedef struct PITState {