Host-side ACPI tables generation within coreboot

Main Room,

One of the core firmware responsibilities is preparation of a hardware description used by the OS for power management and devices configuration. Vast majority of mainboards running coreboot use ACPI tables as a format for conveying this information.

While there are examples of tables compiled during a coreboot build phase from ASL (ACPI Source Language), most of them, including System Service Descriptor Tables (SSDT), are generated at runtime in a form of AML (ACPI Machine Language) by acpigen library. Defining a configuration for drivers - which create entries in SSDT - is one of the most important and time-consuming parts of a bring-up process for any new board.

Currently, the developers need to perform a long-lasting and complicated process, in order to verify what is the outcome of changes introduced in the SSDT generation path. It includes booting the platform till the OS is up and running, which is often not possible due to… improper ACPI description - typical vicious circle. There is a need to make developers' lives easier and shorten the development cycle.

Application running on the build machine, which is able to emulate acpigen behavior and generate output AML files, may greatly help with mitigating the issues described above. Once the result is (almost immediately) disassembled into ASL, it gives a developer a chance to catch all issues early.

This talk will cover a deep dive into the SSDT generation process in coreboot. Furthermore, a proof-of-concept implementation of host-side SSDT generator will be presented, with focus on issues already solved and ones yet to be closed. Moreover, limitations of this solution, as well as possible future benefits including verification of ACPI tables correctness by CI system will be discussed.