Skip to contentSkip to conversation

x86: Don't honour ACPI indicating absence of CMOS RTC

PATCH In review Andrew Cooper 3 participants 10 messages Jun 17, 2014 – Jun 18, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: Don't honour ACPI indicating absence of CMOS RTC

This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"

Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS being present and working.

Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS, combined with the erroneous assumption that the only OSes using legacy boot are too old to know about ACPI v5 and therefore to understand this bit.

As a result, the change being reverted prevented modern Xen from booting on modern HP hardware, despite older Xen working perfectly fine on the same hardware.

CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
---
 xen/arch/x86/time.c |    3 ---
 1 file changed, 3 deletions(-)
xen/arch/x86/time.c +0 -3
index a4e1656..8745186 100644
@@ -693,9 +693,6 @@ static unsigned long get_cmos_time(void)
             return res;
     }
 
-    if ( unlikely(acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_CMOS_RTC) )
-        panic("System without CMOS RTC must be booted from EFI");
-
     spin_lock_irqsave(&rtc_lock, flags);
 
     /* read RTC exactly on falling edge of update flag */
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 16:58, <[email protected]> wrote:

This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"

Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS being present and working.

Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS, combined with the erroneous assumption that the only OSes using legacy boot are too old to know about ACPI v5 and therefore to understand this bit.

Which implies you can boot from EFI on those systems, which is precisely what the panic message says you ought to do. Why do you not boot via EFI in the first place?

Quoted 3 lines

As a result, the change being reverted prevented modern Xen from booting on modern HP hardware, despite older Xen working perfectly fine on the same hardware.

Still, the flag has a purpose, and HP assigning a slightly non-standard meaning to it doesn't mean we should outright revert that change. Options I could live with (short of them revisiting the bogus assumption) are
- a command line option suppressing the mandated behavior,
- a DMI quirk suppressing the mandated behavior,
- code probing for a functional CMOS RTC gating the panic() invocation.

Jan

#2 lore raw
Quoted 6 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 16:58, <[email protected]> wrote:

This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"

Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS being present and working.

Quoted 7 lines
Quoted 3 lines

Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS, combined with the erroneous assumption that the only OSes using legacy boot are too old to know about ACPI v5 and therefore to understand this bit.

Which implies you can boot from EFI on those systems, which is precisely what the panic message says you ought to do. Why do you not boot via EFI in the first place?

You can swap between legacy and EFI in the BIOS. Customers can choose either option.

Quoted 5 lines
Quoted 4 lines

As a result, the change being reverted prevented modern Xen from booting on modern HP hardware, despite older Xen working perfectly fine on the same hardware.

Quoted 8 lines

Still, the flag has a purpose, and HP assigning a slightly non-standard meaning to it doesn't mean we should outright revert that change. Options I could live with (short of them revisiting the bogus assumption) are
- a command line option suppressing the mandated behavior,
- a DMI quirk suppressing the mandated behavior,
- code probing for a functional CMOS RTC gating the panic() invocation.

That is probably the best option. The DMI is going to get large as it would probably include the G8 family.

Quoted 8 lines

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 17:47, <[email protected]> wrote:
Quoted 10 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 16:58, <[email protected]> wrote:

This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"

Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS being present and working.

Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS, combined with the erroneous assumption that the only OSes using legacy boot are too old to know about ACPI v5 and therefore to understand this bit.

Quoted 6 lines
Quoted 3 lines

Which implies you can boot from EFI on those systems, which is precisely what the panic message says you ought to do. Why do you not boot via EFI in the first place?

You can swap between legacy and EFI in the BIOS. Customers can choose either option.

I know on many systems you still can, but the question is "Why would you?" In particular when you know the firmware is assuming that the CSM is only being used by old OSes.

Jan

#4 lore raw
Quoted 16 lines · Jan Beulich
Quoted 16 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 17:47, <[email protected]> wrote:
Quoted 13 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 16:58, <[email protected]> wrote:

This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"

Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS being present and working.

Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS, combined with the erroneous assumption that the only OSes using legacy boot are too old to know about ACPI v5 and therefore to understand this bit.

Which implies you can boot from EFI on those systems, which is precisely what the panic message says you ought to do. Why do you not boot via EFI in the first place?

Quoted 6 lines
Quoted 2 lines

You can swap between legacy and EFI in the BIOS. Customers can choose either option.

I know on many systems you still can, but the question is "Why would you?" In particular when you know the firmware is assuming that the CSM is only being used by old OSes.

PCIe devices that don't EFI for setting up.

Quoted 3 lines

Jan

#5 lore raw
Quoted 19 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 18:31, <[email protected]> wrote:
Quoted 10 lines · Jan Beulich
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 17:47, <[email protected]> wrote:
Quoted 8 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 16:58, <[email protected]> wrote:

This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"

Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS being present and working.

Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS, combined with the erroneous assumption that the only OSes using legacy

boot

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 1 line

are too old to know about ACPI v5 and therefore to understand this bit.

Which implies you can boot from EFI on those systems, which is precisely what the panic message says you ought to do. Why do you not boot via EFI in the first place?

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

You can swap between legacy and EFI in the BIOS. Customers can choose either option.

I know on many systems you still can, but the question is "Why would you?" In particular when you know the firmware is assuming that the CSM is only being used by old OSes.

PCIe devices that don't EFI for setting up.

I'm sorry, but I don't understand what you're trying to tell me.

Jan

#6 lore raw
Quoted 22 lines · Jan Beulich
Quoted 22 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 18:31, <[email protected]> wrote:
Quoted 10 lines · Jan Beulich
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 17:47, <[email protected]> wrote:
Quoted 8 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 16:58, <[email protected]> wrote:

This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"

Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS being present and working.

Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS, combined with the erroneous assumption that the only OSes using legacy

boot

Quoted 9 lines
Quoted 8 lines
Quoted 5 lines
Quoted 1 line

are too old to know about ACPI v5 and therefore to understand this bit.

Which implies you can boot from EFI on those systems, which is precisely what the panic message says you ought to do. Why do you not boot via EFI in the first place?

You can swap between legacy and EFI in the BIOS. Customers can choose either option.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

I know on many systems you still can, but the question is "Why would you?" In particular when you know the firmware is assuming that the CSM is only being used by old OSes.

PCIe devices that don't EFI for setting up.

I'm sorry, but I don't understand what you're trying to tell me.

Some of the PCIe devices have an GUI/text which you can invoke during bootup. For example LSI or Adaptec allow one to hit Ctrl-C to get a menu to setup RAID and such.

But for that to work in EFI (and when the BIOS is using the EFI framebuffer) that firmware has to use the EFI to setup the windows and such. Some of those cards don't have it and will not show said menus at all. Hence users stick with Legacy so they can administer those cards as they see fit.

Quoted 3 lines

Jan

#7 lore raw
Quoted 36 lines
Quoted 1 line
Quoted 1 line · On 18.06.14 at 15:06, <[email protected]> wrote:
Quoted 22 lines · Jan Beulich
Quoted 22 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 18:31, <[email protected]> wrote:
Quoted 10 lines · Jan Beulich
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 17:47, <[email protected]> wrote:
Quoted 8 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 16:58, <[email protected]> wrote:

This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"

Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS being present and working.

Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS, combined with the erroneous assumption that the only OSes using legacy

boot

Quoted 9 lines
Quoted 8 lines
Quoted 5 lines
Quoted 1 line

are too old to know about ACPI v5 and therefore to understand this bit.

Which implies you can boot from EFI on those systems, which is precisely what the panic message says you ought to do. Why do you not boot via EFI in the first place?

You can swap between legacy and EFI in the BIOS. Customers can choose either option.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

I know on many systems you still can, but the question is "Why would you?" In particular when you know the firmware is assuming that the CSM is only being used by old OSes.

PCIe devices that don't EFI for setting up.

I'm sorry, but I don't understand what you're trying to tell me.

Some of the PCIe devices have an GUI/text which you can invoke during bootup. For example LSI or Adaptec allow one to hit Ctrl-C to get a menu to setup RAID and such.

Quoted 5 lines

But for that to work in EFI (and when the BIOS is using the EFI framebuffer) that firmware has to use the EFI to setup the windows and such. Some of those cards don't have it and will not show said menus at all. Hence users stick with Legacy so they can administer those cards as they see fit.

At least from an abstract perspective these are different things: When CSM is still there, UEFI can very well run the legacy option ROM init code, and then nevertheless boot the OS from UEFI. Plus the setting up of RAID and such doesn't need to be done before every OS boot - you'd do that once, reset the box (if necessary), and boot your OS from UEFI.

Jan

#8 lore raw
In reply to Jan Beulich
Quoted 10 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 16:58, <[email protected]> wrote:

This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"

Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS being present and working.

Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS, combined with the erroneous assumption that the only OSes using legacy boot are too old to know about ACPI v5 and therefore to understand this bit.

Which implies you can boot from EFI on those systems,

Indeed you can

Quoted 3 lines

which is
precisely what the panic message says you ought to do. Why do you not boot via EFI in the first place?

Inertia mostly. The current state of play of needing experimental patches against grub2 and pvops is suboptimal, and XenServer management decided that our efforts were better spent elsewhere.

Fundamentally though, that patch caused a boot regression on HP DL580 Gen 8 systems, and an unknown number of other systems.

Quoted 10 lines
Quoted 4 lines

As a result, the change being reverted prevented modern Xen from booting on modern HP hardware, despite older Xen working perfectly fine on the same hardware.

Still, the flag has a purpose, and HP assigning a slightly non-standard meaning to it doesn't mean we should outright revert that change. Options I could live with (short of them revisiting the bogus assumption) are
- a command line option suppressing the mandated behavior,
- a DMI quirk suppressing the mandated behavior,

I have no indication on the extent of the issue, but it could be as much as all HP Gen8 and 9 systems. I suspect this option wouldn't scale.

Quoted 2 lines

- code probing for a functional CMOS RTC gating the panic() invocation.

If the firmware claims no RTC, is it even safe to probe? There is nothing I am aware of preventing the IO port space being reused by something else if the firmware has told the OS that there genuinely isn't an RTC there.

~Andrew

#9 lore raw
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 17.06.14 at 19:01, <[email protected]> wrote:
Quoted 2 lines · Jan Beulich

- code probing for a functional CMOS RTC gating the panic() invocation.

If the firmware claims no RTC, is it even safe to probe? There is nothing I am aware of preventing the IO port space being reused by something else if the firmware has told the OS that there genuinely isn't an RTC there.

If you assume it is safe to use the RTC, how can you suggest it to be unsafe to probe it? Furthermore, any such probing should of course come with a way to suppress it.

As a side note - just now HP reported this problem of theirs against SLE12 too.

Jan