qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Michael Tsirkin <mtsirkin@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu devel list <qemu-devel@nongnu.org>
Subject: [Qemu-devel] setting fadt->century
Date: Thu, 10 Dec 2015 15:08:46 +0100	[thread overview]
Message-ID: <5669876E.1040102@redhat.com> (raw)

Hi,

an edk2-devel discussion made me look at how QEMU builds the FADT, in
particular the "century" field.

    The RTC CMOS RAM index to the century of data value (hundred and
    thousand year decimals). If this field contains a zero, then the
    RTC centenary feature is not supported. If this field has a
    non-zero value, then this field contains an index into RTC RAM
    space that OSPM can use to program the centenary field.

Since the i440fx and Q35 machine types of the i386/x86_64 targets always
include the RTC device -- rtc_init() --, and said RTC device supports
the "centenary feature" -- see RTC_CENTURY in "hw/timer/mc146818rtc.c"
--, I think the fadt_setup() function should set fadt->century to
RTC_CENTURY.

Do you guys agree?

If so, should 2.5 and earlier machine types be shielded from this change?

Currently the field is left at zero:

[06Ch 0108   1]            RTC Century Index : 00

which -- according to analysis done by Ruiyu Ni at Intel -- should cause
Linux and Windows 8+ to think the RTC centenary feature is unavailable,
and cause Windows 7 to (incorrectly) assume that the offset to use is
0x32. (Which happens to be the right value, but Windows 7 is wrong to
assume anything at all).

Fixing this would inform Linux and Windows 8+ about the right
capabilities of the hardware, plus retrofit the FADT to Windows 7's
behavior.

Thanks,
Laszlo

             reply	other threads:[~2015-12-10 14:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10 14:08 Laszlo Ersek [this message]
2015-12-10 14:17 ` [Qemu-devel] setting fadt->century Paolo Bonzini

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=5669876E.1040102@redhat.com \
    --to=lersek@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mtsirkin@redhat.com \
    --cc=pbonzini@redhat.com \
    --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).