qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] setting fadt->century
@ 2015-12-10 14:08 Laszlo Ersek
  2015-12-10 14:17 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Laszlo Ersek @ 2015-12-10 14:08 UTC (permalink / raw)
  To: Michael Tsirkin, Igor Mammedov; +Cc: Paolo Bonzini, qemu devel list

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] setting fadt->century
  2015-12-10 14:08 [Qemu-devel] setting fadt->century Laszlo Ersek
@ 2015-12-10 14:17 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2015-12-10 14:17 UTC (permalink / raw)
  To: Laszlo Ersek, Michael Tsirkin, Igor Mammedov; +Cc: qemu devel list



On 10/12/2015 15:08, Laszlo Ersek wrote:
> 
>     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?

Yes.

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

I think this shouldn't be necessary.

Paolo

> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-10 14:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-10 14:08 [Qemu-devel] setting fadt->century Laszlo Ersek
2015-12-10 14:17 ` Paolo Bonzini

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).