On Mon, Apr 23, 2012 at 5:18 PM, Andreas Färber <afaer...@suse.de> wrote: > Am 23.04.2012 16:48, schrieb Artyom Tarasenko: >> Fix BCD mask for date. The most visible effect of this patch is >> Solaris 2.5.1 doesn't hang at boot if the day of month is >21. >> >> Signed-off-by: Artyom Tarasenko <atar4q...@gmail.com> >> --- >> hw/m48t59.c | 6 +++--- >> 1 files changed, 3 insertions(+), 3 deletions(-) > > Blue has just added tests/m48t59-test.c - care to add a test case for > this?
It looks like BCD math is already covered in the "check_time" test. I'm not sure though how m48t59 is initialized there. >Ideally the patch would also indicate that it's about "m48t59: ". You mean, like "[PATCH,m48t59] fix BCD mask for date (Solaris 2.5 guest hang fix)" ? Can resend if it's necessary. Artyom > > Andreas > >> diff --git a/hw/m48t59.c b/hw/m48t59.c >> index 60bbb00..0c50f45 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; > > -- > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany > GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg -- Regards, Artyom Tarasenko solaris/sparc under qemu blog: http://tyom.blogspot.com/search/label/qemu