|
|
Log in / Subscribe / Register

ARM, SBSA, UEFI, and ACPI

By Jonathan Corbet
February 5, 2014
For some years now we have been promised that ARM-based servers were going to start showing up in data centers. Opinions differ on whether ARM processors can be successful in this market, but there tends to be widespread agreement on a related point: the free-form, highly differentiated nature of ARM-based systems would make them painful to support in large, server-oriented environments, where users expect to be able to treat servers like interchangeable parts. ARM Ltd. clearly understands this problem; its recently announced "Server Base System Architecture" (SBSA) is an attempt to improve the situation. SBSA has been greeted with generally optimistic reviews, but the requirements that are coming along for the ride may yet stir things up in the development community.

In truth, it can be hard to say for sure what the SBSA mandates; the standard is currently kept behind a restrictive license, limiting the number of people who have read it. Arnd Bergmann described it this way (in the comments):

SBSA describes various hardware components that are required for a compliant server. Things like CPU, PCIe, timers, IOMMU, UART, watchdog, and interrupts are described in enough detail that it should be possible to take a compliant OS image and boot to the stage where you can load drivers for all other components that are not standardized...

Arnd went on to describe the requirements as "extremely reasonable". Olof Johansson, one of the maintainers of the arm-soc kernel tree, was also supportive of the idea:

It is an incredibly important document, because it does away with so much of the variables where ARM vendors in the past have chosen to differentiate between each other for no useful purpose. It allows us to write software that is much simpler, and that has a better chance to work across a large range of hardware with very small changes made over time.

In short, the SBSA is trying to create a base platform that can be assumed to be present as part of any compliant system. ARM has always lacked that platform, which is part of why supporting ARM systems has traditionally been a messy affair. To the extent that the SBSA succeeds, it will make life easier for kernel developers, hardware manufacturers, and server administrators; it is hard to be upset about that.

Nonetheless, the SBSA announcement has stirred up some heated discussion in the community. But the SBSA is mostly guilty by association; the controversial part of the platform is the firmware requirements, which are not addressed by the SBSA at all. Instead, these requirements will be released as part of a separate specification. The details of that specification are not known, but it has been made clear that it will mandate the use of both UEFI and ACPI on compliant systems.

UEFI is the low-level firmware found on most current PC systems. Like any firmware, UEFI has caused its share of misery, but, for the most part, developers are fine with its use in this context. UEFI works well enough, it has an open-source reference implementation, and supporting UEFI is not hard for the kernel to do. So there is no real opposition to the idea of supporting UEFI on ARM systems.

ACPI (the "Advanced Configuration and Power Interface") is another story. Getting ACPI working solidly on x86 systems was a long and painful process. Its detractors cite a few reasons to believe that it could be just as bad — if not worse — in the ARM world. For example, most ARM system-on-chip (SoC) vendors currently have no experience with ACPI, so they are going to have to come up to speed quickly, repeating lots of mistakes on the way. Each one of those mistakes is likely to find its way into deployed systems, meaning that the kernel would have to support them indefinitely.

There are also concerns about how well an ACPI-based ARM platform will come together. In the PC world, it became clear fairly quickly that the specification only meant so much when it came to hardware support. The real acid test was not compliance with a spec; instead, it was the simple question of "does Windows run on it?" Once Windows worked, firmware authors tended to stop fixing things. That led to numerous situations where the Linux kernel has to carefully do things exactly as Windows does, since that's the only well-tested mode of operation. Windows compatibility is not the most satisfying compliance test out there, but it did result in ACPI implementations converging sufficiently to allow them to be supported in a generic manner.

Windows does not have the same dominating position in the ARM server market; indeed, it's not clear that Windows will be offered on such systems at all. It is certainly possible that, say, Red Hat Enterprise Linux could play a similar role in this space. But it's also possible that vendors will just try to push lots of patches into the kernel to support their specific ACPI implementations. The result could be an incompatible, bug-ridden mess that takes many years to settle out.

Finally, there is the question of whether ACPI is needed at all. ACPI is, in the end, a standardized way to enable the operating system to discover and initialize the system's hardware. But, ACPI critics point out, the ARM architecture already has such a mechanism: device trees. The device tree work is reaching a point where it is reasonably mature; as Olof recently noted in a pull request to Linus:

New boards and systems continue to come in as new devicetree files that don't require corresponding C changes any more, which is indicating that the system is starting to work fairly well.

The developers who have been working on getting this system working well are now asking: why should that work be pushed aside in favor of a PC standard with no history in the ARM world? Among certain developers one can easily pick up a feeling that the kernel should simply refuse ARM ACPI support and mandate the use of device trees on all ARM systems.

In the end, it is hard to see any such thing happening; Linux kernel development has almost always been done in such a way as to favor running on as many systems as possible. And there may well be technical reasons for favoring ACPI on some systems, especially in situations where strict compatibility has to be maintained for years. As Grant Likely put it in a lengthy posting about the upcoming firmware standards, ACPI can make it easier for manufacturers to keep things compatible:

To begin with they already have hardware and process built around ACPI descriptions. Platform management tools are integrated with ACPI and they want to use the same technology between their x86 and ARM product offerings. They also go to great lengths to ensure that existing OS releases will boot on their hardware without patches to the kernel. Using ACPI allows them limited control over low level details of the platform so that they can abstract away differences between systems.

As Grant points out, that abstraction runs counter to the way things have traditionally been done on ARM-based systems; normal practice is to go through a great deal of pin configuration, regulator setup, clock programming, and more just to get things into an operational state. ACPI pushes a lot of that work into the firmware, taking it out of kernel developers' hands. That, perhaps, is where some of the resistance comes from: kernel developers like that control and are reluctant to cede it to firmware authors. It just doesn't feel right if you don't have to establish the right pinmux configuration before anything will work.

Still, ARM servers with ACPI are coming, and the kernel will almost certainly support them. The kernel will also, of course, continue to support device-tree-based systems; the chances of ACPI moving into the embedded world in the near future seem relatively small. After a while, ACPI on ARM will just be another configuration supported by the kernel, and people will be wondering why it was ever controversial. But "a while" may turn out to be a longer period of time than some people expect.


to post comments

ARM, SBSA, UEFI, and ACPI

Posted Feb 6, 2014 0:14 UTC (Thu) by PaulWay (guest, #45600) [Link] (10 responses)

Is there, dare I ask, some kind of ACPI implementation test suite? Something that the Kernel developers can point manufacturers to and say "Here, fix your code until it passes these tests". Or is that too implementation specific to make sense?

Presumably when Microsoft was implementing ACPI support, they followed some particular ... interpretation of a standard somewhere. Then manufacturers simply tested it against the "test suite". It'd be nice for Kernel developers to be progressive here and have something that implements things the way _we_ want them, rather than passively waiting for manufacturers to turn up with their own interpretation of the standard and then try to cope with what they've given us.

Maybe I'm just reading the process wrong. There are certainly signs, such as Olof's pull request to Linus referred to in the article, that manufacturers aren't just forging ahead writing dodgy code and expecting others to cope with it because some other OS happens to work that way.

Hopefully yours,

Paul

ARM, SBSA, UEFI, and ACPI

Posted Feb 6, 2014 0:28 UTC (Thu) by mjg59 (subscriber, #23239) [Link] (2 responses)

If there'd been any effort to involve any kernel developers that knew anything about ACPI in the process, maybe? But right now I've got no idea what version of ACPI they're even targeting with this firmware specification (the license means I can't grab it without legal approval from my employers), so figuring out which features actually need to be exercised to develop a meaningful test suite is difficult.

The real risk is that we'll end up implementing features according to ARM's interpretation of the spec, and then later Microsoft will want the same features on x86 and will implement them incompatibly[1]. There isn't a terribly good answer to this. Developing it in the open would, at least, have meant that those of us who have some degree of input into the ACPI standards bodies could provide meaningful feedback and ensured that there was some degree of communication with Microsoft, but as is this is a wonderful opportunity to turn ACPI into even more of an implementation nightmare than it already is.

[1] Or, worse, have already implemented them incompatibly but nobody's shipped hardware that uses those features so we haven't noticed yet

ARM, SBSA, UEFI, and ACPI

Posted Feb 6, 2014 10:10 UTC (Thu) by arnd (subscriber, #8866) [Link] (1 responses)

For all I know, nobody is talking to anybody else about what they may or may not have implemented for ARM ACPI as they are caught in a mexican standoff where they don't want to reveal that they don't know how to do it, but wait for the other parties to first say what the problems are.

The Linaro Enterprise Group developers are posting code for the basic infrastructure, which all seems good but also doesn't touch any of the interesting bits.

The SBSA actually doesn't say anything about ACPI, and the upcoming boot document that Grant mentioned is mainly about how to use UEFI.

ARM, SBSA, UEFI, and ACPI

Posted Feb 6, 2014 10:19 UTC (Thu) by glikely (subscriber, #39601) [Link]

Actually, the upcoming firmware document is equally about ACPI and UEFI

ARM, SBSA, UEFI, and ACPI

Posted Feb 6, 2014 15:02 UTC (Thu) by drag (guest, #31333) [Link] (4 responses)

> Is there, dare I ask, some kind of ACPI implementation test suite?

Yes, In x86 this compliance test is called 'Microsoft Windows'

ARM, SBSA, UEFI, and ACPI

Posted Feb 6, 2014 16:49 UTC (Thu) by raven667 (subscriber, #5198) [Link] (3 responses)

That's always funny because it makes it seems like the hardware with flaky, incorrect ACPI, works well on Windows, it often doesn't work there either with crashes, inability to resume from suspend/hibernate, high unnecessary battery usage, etc. but I think people expect some of that so are less tweaked when their crappy hardware is crappy, everyone else is in the same boat too.

ARM, SBSA, UEFI, and ACPI

Posted Feb 10, 2014 19:29 UTC (Mon) by drag (guest, #31333) [Link] (2 responses)

It's just shit hardware then.

If they can't make it work correctly with Windows, were they have practical test case that directly reflects what their customers are using, then I have no faith in the manufacturer's ability to make it work any better for multiple OSes if somebody tried to hand them a standards document and a test suite.

ARM, SBSA, UEFI, and ACPI

Posted Feb 10, 2014 21:39 UTC (Mon) by khim (subscriber, #9252) [Link] (1 responses)

They could make it work correctly in Windows: you just need to install their own driver which will change Windows internals to ignore some pieces of ACPI. Problem solved. Of course such “solution” is crazy but it works. In many cases when I've seen that something does not work in Windows it could be traced to the fact that one tried to avoid all the crapware by installing fresh version of Windows. Of course that'll fail: Microsoft is not interested in supporting this mode (it wants to shift support bunden on OEMs) and OEMs don't plan to support it either (when you install non-OEM-provided version of Windows you instantly lose support). Microsoft can kinda-maybe-convinced to help you if you are large customer of Enterprise version of Windows, but then Enterprise tend to use limited set of hardware releases anyway thus most hardware fall outside of scope.

ARM, SBSA, UEFI, and ACPI

Posted Feb 10, 2014 22:40 UTC (Mon) by apoelstra (subscriber, #75205) [Link]

This is an interesting strategy from Microsoft, given that it makes Windows appear to have awful hardware support.

ARM, SBSA, UEFI, and ACPI

Posted Feb 6, 2014 17:37 UTC (Thu) by smagoun (guest, #75744) [Link]

The Firmware Test Suite project has grown into a fairly robust set of tests that cover BIOS, UEFI, and ACPI. While focused on x86 PCs, it's adaptable to other architectures and form factors.

Homepage: https://wiki.ubuntu.com/Kernel/Reference/fwts

Code, bugs, etc: https://launchpad.net/fwts

ARM, SBSA, UEFI, and ACPI

Posted Feb 12, 2014 20:53 UTC (Wed) by yuhong (guest, #57183) [Link]

Reminds me of this post from ntdev:
http://www.osronline.com/showThread.cfm?link=21604

Hard to push GPL code for "standardisation", no?

Posted Feb 6, 2014 9:15 UTC (Thu) by renox (guest, #23785) [Link] (6 responses)

AFAIK device trees are a Linux only subsystem and its implementations are GPL (like the rest of the kernel) somehow I kind of doubt that ARM would use this as a basis of standardisation!
At the minimum the code would have to be available under a BSD-like license..

Hard to push GPL code for "standardisation", no?

Posted Feb 6, 2014 9:46 UTC (Thu) by mjg59 (subscriber, #23239) [Link]

Device Tree originated in Open Firmware, significantly predating its support in Linux. Flattened Device Tree is supported by FreeBSD as well, so there's even a non-GPL implementation of that.

Hard to push GPL code for "standardisation", no?

Posted Feb 6, 2014 9:46 UTC (Thu) by simlo (guest, #10866) [Link] (2 responses)

I fail to see why GPL'ed code is a problem for a standeard.

1) The specifications are free: You can reverse engineer the GPL'ed code and make a new implementation without being bound by GPL. Just because the first implementation of something is bound by GPL, not all implementations are bound by it.

2) There is a free standeard implementation everyone can test against.

If any other OS want to support, they can implement it - they just can't reuse the code.

What else do you need for an open standeard?

Hard to push GPL code for "standardisation", no?

Posted Feb 6, 2014 13:12 UTC (Thu) by k3ninho (subscriber, #50375) [Link] (1 responses)

>they just can't reuse the code
It costs time and money to re-implement something you already have in a source code form. If the alternative is getting legal advice to make sure that you're OK with releasing changes back to the source organisation and playing your due part with the GPL and community, then it's still a cost to the business. In the GPL case, sharing forward the changes means we'd all be richer, but the accountants can't include that in the bottom line.

K3n.

Hard to push GPL code for "standardisation", no?

Posted Feb 9, 2014 14:56 UTC (Sun) by oshepherd (guest, #90163) [Link]

libfdt - The device tree parsing code - is BSD. This is no more or less restrictive than ACPICA, which is the reference ACPI implementation.

Both libfdt and ACPICA only cover a miniscule portion of what is being considered, anyway. The rest is intensely OS specific.

FDT is just a data structure and AML is just a byte code. The interesting code is what you do with those, not the data structures themselves.

Hard to push GPL code for "standardisation", no?

Posted Feb 6, 2014 9:56 UTC (Thu) by arnd (subscriber, #8866) [Link] (1 responses)

I think all you said above is wrong, but let's look at the components:

* Device Tree is a subset of the IEEE 1275 specification, normally known as Open Firmware (OF), which is used on all PowerPC and SPARC servers and workstations. There are independent implementations for MacOS, AIX, Solaris, Linux, Windows and the various BSDs.

* The Flattened Device Tree (FDT) format comes from the Linux OF implementation and is a simplified way to pass the OF compatible DT from a non-OF bootloader to the kernel. It's typically used together with extensions that allow you to use DT on embedded systems which need to describe a lot of stuff that you don't have to worry about on servers (GPIO, SPI, clocks, slave dma engines, ...). 14 out of the 28 CPU architectures that Linux supports can now use FDT even if they don't have OF.

* The code for FDT in Linux is hosted on kernel.org (https://git.kernel.org/cgit/utils/dtc/dtc.git/) but is BSD licensed and is also used in FreeBSD as well as in every boot loader (IIRC including UEFI/Tianocore, but I'm not sure about that) that supports the FDT format.

Hard to push GPL code for "standardisation", no?

Posted Feb 6, 2014 10:06 UTC (Thu) by renox (guest, #23785) [Link]

I just wanted to thanks for correcting my mistakes.

ARM, SBSA, UEFI, and ACPI

Posted Feb 15, 2014 11:10 UTC (Sat) by wkevils (guest, #90640) [Link] (1 responses)

I have a question: as I understand, there will be probably difficulties in
implementing ACPI in Linux for ARM according to this SBSA, and this will take time. Is this a show stopper ? I mean, will vendors refrain from using
linux on ARM server because this feature is not implemented fully and in
a stable form ? How long can it take to implement ACPI for ARM in a stable manner ? is it months ? years?

Regards,
Kevin

ARM, SBSA, UEFI, and ACPI

Posted Feb 16, 2014 1:32 UTC (Sun) by mathstuf (subscriber, #69389) [Link]

> How long can it take to implement ACPI for ARM in a stable manner ?

Is ACPI stable for x86 (I kid, I kid…kinda)? How long did that take?


Copyright © 2014, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds