qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Hervé Poussineau" <hpoussin@reactos.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Fix day of week in mc146818
Date: Sun, 11 Jan 2009 15:31:14 +0100	[thread overview]
Message-ID: <496A02B2.1000309@reactos.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 492 bytes --]

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 <hpoussin@reactos.org>

Hervé

[-- Attachment #2: mc146818.diff --]
[-- Type: plain/text, Size: 1636 bytes --]

             reply	other threads:[~2009-01-11 14:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-11 14:31 Hervé Poussineau [this message]
2009-01-14 21:10 ` [Qemu-devel] [PATCH] Fix day of week in mc146818 Aurelien Jarno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=496A02B2.1000309@reactos.org \
    --to=hpoussin@reactos.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).