|
From: | Hervé Poussineau |
Subject: | [Qemu-devel] [PATCH] Fix day of week in mc146818 |
Date: | Sun, 11 Jan 2009 15:31:14 +0100 |
User-agent: | Thunderbird 2.0.0.14 (Windows/20080421) |
Hello,According to mc146818 specification, Day of Week register (#6) is between 1 and 7, 1 representing Sunday. According C specification, tm_wday field in struct tm is between 0 and 6, 0 representing Sunday.
Bit 2 of register B (#11) is named DM (data mode) and specifies if RTC stores values in BCD or in binary form.
Attached patch fixes the off by one error and replaces magic value 0x04 by REG_B_DM.
Signed-off-by: Hervé Poussineau <address@hidden> Hervé
mc146818.diff
Description: plain/text
[Prev in Thread] | Current Thread | [Next in Thread] |