aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hpet.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-03-28 16:59:02 +0200
committerJan Beulich <jbeulich@suse.com>2012-03-28 16:59:02 +0200
commitd5c1c62c19dbdaacaa680d7e72a10a37ef1444b6 (patch)
tree9a209be4a26e4a9867a9b5ecd40ca8dcf2aaa567 /xen/arch/x86/hpet.c
parent7e5c676dd7a17d8290489ad305f12591920a6c01 (diff)
downloadxen-d5c1c62c19dbdaacaa680d7e72a10a37ef1444b6.tar.gz
xen-d5c1c62c19dbdaacaa680d7e72a10a37ef1444b6.tar.bz2
xen-d5c1c62c19dbdaacaa680d7e72a10a37ef1444b6.zip
x86/hpet: warn about and clear reserved set config register bits
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/hpet.c')
-rw-r--r--xen/arch/x86/hpet.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c
index 7394f7456f..1b9fd574e5 100644
--- a/xen/arch/x86/hpet.c
+++ b/xen/arch/x86/hpet.c
@@ -755,6 +755,13 @@ void hpet_resume(u32 *boot_cfg)
if ( boot_cfg )
*boot_cfg = cfg;
cfg &= ~(HPET_CFG_ENABLE | HPET_CFG_LEGACY);
+ if ( cfg )
+ {
+ printk(XENLOG_WARNING
+ "HPET: reserved bits %#x set in global config register\n",
+ cfg);
+ cfg = 0;
+ }
hpet_write32(cfg, HPET_CFG);
hpet_id = hpet_read32(HPET_ID);
@@ -765,6 +772,13 @@ void hpet_resume(u32 *boot_cfg)
if ( boot_cfg )
boot_cfg[i + 1] = cfg;
cfg &= ~HPET_TN_ENABLE;
+ if ( cfg & HPET_TN_RESERVED )
+ {
+ printk(XENLOG_WARNING
+ "HPET: reserved bits %#x set in channel %u config register\n",
+ cfg & HPET_TN_RESERVED, i);
+ cfg &= ~HPET_TN_RESERVED;
+ }
hpet_write32(cfg, HPET_Tn_CFG(i));
}