Rust OSDev Operating System Development in Rust

This Month in Rust OSDev (August 2021)

Welcome to a new issue of "This Month in Rust OSDev". In these posts, we give a regular overview of notable changes in the Rust operating system development ecosystem.

This series is openly developed on GitHub. Feel free to open pull requests there with content you would like to see in the next issue. If you find some issues on this page, please report them by creating an issue or using our comment form at the bottom of this page.

Project Updates

In this section, we give an overview of notable changes to the projects hosted under the rust-osdev organization.

acpi

The acpi repository contains crates for parsing the ACPI tables – data structures that the firmware of modern computers use to relay information about the hardware to the OS.

There was a fair amount of progress this month, including adding support for a major AML feature: buffer fields. These are objects that represent bit-level slices of buffer objects, allowing a section of a buffer to be read and written. This requires us to support multiple namespace objects operating on the same underlying data - currently this is handled simply with spinlocks, but we're looking to improve this situation in the future. With this, we grew support for the DefCreateBitField, DefCreateByteField, DefCreateWordField, DefCreateDWordField, DefCreateQWordField, and DefCreateField opcodes, as well as logic for reading and writing Integers and Buffers out of them. (published as aml v0.16.0)

The acpi crate also saw improvement, and unfortunately some more breakage. We now support X2APIC entries appearing in the MADT, and so have changed the representation of Processor UIDs and Local APIC IDs in acpi::platform::Processor to u32, to support the wider IDs that X2APIC uses to support more processors. On older platforms that only support APIC, the upper bits will simply always be zeroed, and so these values can be cast down to u8 when needed. Note that for complex legacy reasons, you cannot rely upon ACPI for detecting whether a platform has X2APIC support or not, and so whether the MADT actually contained X2APIC entries is not exposed by this interface - this is by design. (published as acpi v4.0.0)

Other changes were:

uefi-rs

The uefi crate provides safe and performant wrappers for UEFI, the successor to the BIOS.

In August, @nicholasbishop joined as a co-maintainer of the crate. Welcome!

Many improvements were merged this month:

Thanks to @HTG-YT, @phip1611, @Andy-Python-Programmer, and @timrobertsdev for their contributions!

x86_64

The x86_64 crate provides various abstractions for x86_64 systems, including wrappers for CPU instructions, access to processor-specific registers, and abstraction types for architecture-specific structures such as page tables and descriptor tables.

In August, we merged the following changes:

These changes were not published yet, but a pull request for a new version is open already: Release version 0.14.5.

Thanks to @toku-sa-n and @ncatelli for their contributions!

bootloader

The bootloader crate implements a custom Rust-based bootloader for easy loading of 64-bit ELF executables.

This month, we merged the following changes:

Thanks to @vinc, @bjorn3, @Freax13, @yusdacra, and @martica for their contributions!

multboot2

The multiboot2 crate provides abstraction types for the boot information of multiboot2 bootloaders.

The following changes were merged this month:

pic_8259

The pic_8259 crate provides abstractions for 8259 and 8259A Programmable Interrupt Controllers (PICs).

In August, we added cargo features to make the crate buildable on stable:

Thanks to @toku-sa-n for this contribution!

Call for Participation

Want to contribute to a Rust OSDev project, but don't know where to start? Pick up one of these outstanding issues in one of our projects and get started!

No tasks were proposed for this section.

If you maintain a Rust OSDev project and are looking for contributors, especially for tasks suited to people getting started in this space, please create a PR against the next branch with the tasks you want to include in the next issue.

Personal Projects

In this section, we describe updates to personal projects that are not directly related to the rust-osdev organization. Feel free to create a pull request with the updates of your OS project for the next post.

phil-opp/blog_os

(Section written by @phil-opp)

We merged the following improvements to the Writing an OS in Rust blog:

Thanks to @Foo-x, @adi-g15, @Kalbiq, and @non-descriptive for their contributions!

Join Us?

Are you interested in Rust-based operating system development? Our rust-osdev organization is always open to new members and new projects. Just let us know if you want to join! A good way for getting in touch is our Zulip chat.

Comments