Processor Abstraction Layer (PAL)

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.

Features

Write Less Code

Generate C and C++ code for accessing and manipulating system instructions, registers and bit fields within a CPU.

Flexible Toolchain Support

Separates the architecture and toolchain specific details of assembly language away from the high-level programming language used to write system software.

Decouple System Interactions

Use PAL’s generated APIs from a variety of different execution contexts such as “bare-metal”, unit tests, or deprivileged execution states.

Common Questions

Does PAL generate everything from the architecture reference manuals it models?

Not yet, but it does support a whole lot.

What architectures does PAL support?

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.

Is the project missing something that you need?

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.

Which languages does PAL support?

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.

Want To Learn More?

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.

    Privacy Settings
    We use cookies to enhance your experience while using our website. If you are using our Services via a browser you can restrict, block or remove cookies through your web browser settings. We also use content and scripts from third parties that may use tracking technologies. You can selectively provide your consent below to allow such third party embeds. For complete information about the cookies we use, data we collect and how we process them, please check our Privacy Policy
    Youtube
    Consent to display content from Youtube
    Vimeo
    Consent to display content from Vimeo
    Google Maps
    Consent to display content from Google
    Spotify
    Consent to display content from Spotify
    Sound Cloud
    Consent to display content from Sound