BITS: Running Python in GRUB to test BIOS and ACPI
|Project:||BITS: BIOS Implementation Test Suite|
Modern hardware platforms include numerous features to support awesome OS and application functionality. Often, those platform features require careful initialization by BIOS to work correctly, and require carefully written ACPI tables to tell the OS how it can use them. Often, BIOS gets these wrong, and the functionality depending on those platform features suffers.
We created BITS, the BIOS Implementation Test Suite, to allow experts in platform-level functionality to produce BIOS tests for that functionality, and to support BIOS and OS developers who want to validate that functionality. BITS allows domain experts to use and test platform functionality without having to write low-level C code or become an expert in a special-purpose test environment.
BITS uses GNU GRUB2 as a capable pre-OS environment; to that, it adds the full Python interpreter and much of the standard library, as well as the ACPICA interpreter, and various additional Python modules to interact with the hardware platform. You can write high-level Python code to evaluate ACPI methods and access arbitrary hardware, either to produce tests or just to explore.
We'll demo BITS and its functionality, and talk about how we made Python run in a bootloader. We'll show you how to turn your understanding of platform issues into test suites, and how we use BITS to ensure that those issues won't appear in new BIOSes. Along the way, we'll give you an overview of just how much your system still depends on BIOS, and we'll show you how to use BITS to explore your own system's functionality.
Josh Triplett is a PhD student at Portland State University and a Free and Open Source Software hacker. Josh researches relativistic programming, advanced synchronization techniques for highly parallel systems. In his "free time", Josh builds and launches Linux-powered rockets with the Portland State Aerospace Society, and hacks on numerous other projects.