|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [Patch 4/4] x86/hpet: Don't clear reserved bits in the General Configuration Register
It is a violation of the specification.
The reserved bits in the General Configuration Register, unlike all other
reserved bits I have found in the spec, are specified as 'must never be
changed by the OS'.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/arch/x86/hpet.c | 10 +++-------
xen/include/asm-x86/hpet.h | 2 ++
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c
index 091e624..eb48f84 100644
--- a/xen/arch/x86/hpet.c
+++ b/xen/arch/x86/hpet.c
@@ -814,15 +814,11 @@ void hpet_resume(u32 *boot_cfg)
cfg = hpet_read32(HPET_CFG);
if ( boot_cfg )
*boot_cfg = cfg;
- cfg &= ~(HPET_CFG_ENABLE | HPET_CFG_LEGACY);
- if ( cfg )
- {
+
+ if ( cfg & HPET_CFG_RESERVED )
printk(XENLOG_WARNING
"HPET: reserved bits %#x set in global config register\n",
- cfg);
- cfg = 0;
- }
- hpet_write32(cfg, HPET_CFG);
+ cfg & HPET_CFG_RESERVED);
hpet_id = hpet_read32(HPET_ID);
last = (hpet_id & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT;
diff --git a/xen/include/asm-x86/hpet.h b/xen/include/asm-x86/hpet.h
index 875f1de..22a11da 100644
--- a/xen/include/asm-x86/hpet.h
+++ b/xen/include/asm-x86/hpet.h
@@ -28,6 +28,8 @@
#define HPET_CFG_ENABLE 0x001
#define HPET_CFG_LEGACY 0x002
+#define HPET_CFG_RESERVED 0xfffffffc
+
#define HPET_LEGACY_8254 2
#define HPET_LEGACY_RTC 8
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |