aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-04-23 14:15:09 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2012-04-23 14:15:09 -0500
commitcb4c2548ea7cceef7260465773c6b8e634c186d4 (patch)
treeab595ffdb87a6188dd85623938446ff88b79c229
parent5469963394eba2df7c0a093a3792dc82e060cd65 (diff)
parent02f5da11d694df75af454205d8d81ac73dea50f0 (diff)
Merge remote-tracking branch 'origin/master' into staging
* origin/master: fix BCD mask for date (Solaris 2.5 guest hang fix)
-rw-r--r--hw/m48t59.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/m48t59.c b/hw/m48t59.c
index 60bbb00946..0c50f450ad 100644
--- a/hw/m48t59.c
+++ b/hw/m48t59.c
@@ -239,7 +239,7 @@ void m48t59_write (void *opaque, uint32_t addr, uint32_t val)
break;
case 0x1FF5:
/* alarm date */
- tmp = from_bcd(val & 0x1F);
+ tmp = from_bcd(val & 0x3F);
if (tmp != 0) {
NVRAM->alarm.tm_mday = tmp;
NVRAM->buffer[0x1FF5] = val;
@@ -310,8 +310,8 @@ void m48t59_write (void *opaque, uint32_t addr, uint32_t val)
break;
case 0x1FFD:
case 0x07FD:
- /* date */
- tmp = from_bcd(val & 0x1F);
+ /* date (BCD) */
+ tmp = from_bcd(val & 0x3F);
if (tmp != 0) {
get_time(NVRAM, &tm);
tm.tm_mday = tmp;