Are you working on a bare-metal software project for Intel or ARM? Are you sick of hunting through a 6,000-page PDF file to find basic facts about the contents of a system register? Do you hate reading and writing code that sets |= (bitfields && like) << this; (and accidentally using logical AND instead of bitwise AND in the process)? Is your software so tightly coupled to your CPU that unit testing seems impossible? You could use a PAL!
The Bareflank™ Processor Abstraction Layer (PAL) transforms facts about your CPU into a software support library. This lets you access and manipulate the low-level details of your hardware’s instructions, system registers, and bitfields through a convenient software API. Suppose you are working on a C++ project for the Intel platform and compiling/assembling with a GNU toolchain. PAL allows you to specify these criteria as input configurations, and then generates a C++ library containing thousands of functions for manipulating an Intel CPU. As your project matures, PAL makes it possible to adapt the details about your CPU interactions to growing and changing software needs. For example, adding support for unit testing or additional compiler toolchains becomes as easy as reconfiguring PAL with new input configurations.
Generate C and C++ code for accessing and manipulating system instructions, registers and bit fields within a CPU.
Separates the architecture and toolchain specific details of assembly language away from the high-level programming language used to write system software.
Use PAL’s generated APIs from a variety of different execution contexts such as “bare-metal”, unit tests, or deprivileged execution states.
Not yet, but it does support a whole lot.
At the moment, portions of Intel (64-bit), AMD (64-bit), and ARMv8-A (aarch32 and aarch64) are supported. The project also has experimental support for ACPI tables.
Help us add it! There are a few different ways you can contribute new definitions to the project. Check out the project’s documentation to more details.
PAL can generate C and C++ code, as well as YAML for the purposes of re-generating the project’s own data definitions. Rust support is currently in the works.
Reach out to us on Slack, ask a question in our GitHub issue tracker or fill out the form below and an AIS representative will be in touch.