aboutsummaryrefslogtreecommitdiff
path: root/hw/mc146818rtc_regs.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-10-01 14:22:07 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2012-10-05 08:02:30 -0500
commite67edb943f0c812530aaae2491da56f9542f928b (patch)
tree882a919b6e3490b4050d6c914d2a4c22bf0ea1e8 /hw/mc146818rtc_regs.h
parentb6db4aca20e9af4f62c9c9e08b9b9672a6ed3390 (diff)
downloadqemu-e67edb943f0c812530aaae2491da56f9542f928b.zip
qemu-e67edb943f0c812530aaae2491da56f9542f928b.tar.gz
qemu-e67edb943f0c812530aaae2491da56f9542f928b.tar.bz2
rtc: map CMOS index 0x37 to 0x32 on read and writes
QEMU's attempt to implement the century byte cover two possible places for the byte. A common one on modern chipsets is 0x32, but QEMU also stores the value in 0x37 (apparently for IBM PS/2 compatibility---it's only been 25 years). To simplify the implementation of the century byte, store it only at 0x32 but remap transparently 0x37 to 0x32 when reading and writing from CMOS. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/mc146818rtc_regs.h')
-rw-r--r--hw/mc146818rtc_regs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/mc146818rtc_regs.h b/hw/mc146818rtc_regs.h
index fc10076..ccdee42 100644
--- a/hw/mc146818rtc_regs.h
+++ b/hw/mc146818rtc_regs.h
@@ -44,6 +44,10 @@
#define RTC_REG_C 12
#define RTC_REG_D 13
+/* PC cmos mappings */
+#define RTC_CENTURY 0x32
+#define RTC_IBM_PS2_CENTURY_BYTE 0x37
+
#define REG_A_UIP 0x80
#define REG_B_SET 0x80