|
| 1 | ++++ |
| 2 | +title = "This Month in Rust OSDev (November 2020)" |
| 3 | +date = 2020-12-10 |
| 4 | + |
| 5 | +[extra] |
| 6 | +month = "November 2020" |
| 7 | +authors = [ |
| 8 | + "phil-opp", |
| 9 | + "IsaacWoods", |
| 10 | + # add yourself here |
| 11 | +] |
| 12 | ++++ |
| 13 | + |
| 14 | +Welcome to a new issue of _"This Month in Rust OSDev"_. In these posts, we will give a regular overview of notable changes in the Rust operating system development ecosystem. |
| 15 | + |
| 16 | +<!-- more --> |
| 17 | + |
| 18 | +This series is openly developed [on GitHub](https://github.com/rust-osdev/homepage/). 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](https://github.com/rust-osdev/homepage/issues/new). |
| 19 | + |
| 20 | +<!-- |
| 21 | + This is a draft for the upcoming "This Month in Rust OSDev (November 2020)" post. |
| 22 | + Feel free to create pull requests against the `next` branch to add your |
| 23 | + content here. |
| 24 | + Please take a look at the past posts on https://rust-osdev.com/ to see the |
| 25 | + general structure of these posts. |
| 26 | +--> |
| 27 | + |
| 28 | +## Project Updates |
| 29 | + |
| 30 | +In this section, we give an overview of notable changes to the projects hosted under the [`rust-osdev`] organization. |
| 31 | + |
| 32 | +[`rust-osdev`]: https://github.com/rust-osdev/about |
| 33 | + |
| 34 | +### [`acpi`](https://github.com/rust-osdev/acpi) |
| 35 | + |
| 36 | +The `acpi` repository contains crates for parsing the ACPI tables – data structures that the firmware of modern |
| 37 | +computers use to relay information about the hardware to the OS. In November, we started fuzzing the AML parser to |
| 38 | +help find inputs that crash it and we [found](https://github.com/rust-osdev/acpi/commit/56472490c9564b6740eb5e416624d73be8841faa) |
| 39 | +[a](https://github.com/rust-osdev/acpi/commit/5ab486d1a8a8a8160025b88e369e22dc8d993273) [few](https://github.com/rust-osdev/acpi/commit/747bcfd28d44bbdfd39ad4805bba574ac320daf8). |
| 40 | +We even found [a case](https://github.com/rust-osdev/acpi/commit/52b05fd91ebb40e9c5511d568b19cb5f10b33d83) where |
| 41 | +we'd misinterpreted the spec. This is an important task for the project, as the AML parser will often run in |
| 42 | +kernelspace, and so should not panic from any input, however invalid (some more work is needed to make this the |
| 43 | +case, however). |
| 44 | + |
| 45 | +[Lexicographic comparison was also implemented for `Buffer` and `String` AML objects](https://github.com/rust-osdev/acpi/commit/6d2045de3acb9b74347ac6ce9ad01051be7bea82), |
| 46 | +which means we should now be able to perform all comparisons tables are allowed to make (bar some object |
| 47 | +conversions, which still need some work). |
| 48 | + |
| 49 | +The changes this month, as well as some made in December that should improve compile speed a little, have been |
| 50 | +published as [`aml v0.10.0`](https://crates.io/crates/aml). |
| 51 | + |
| 52 | +### [`x86_64`](https://github.com/rust-osdev/x86_64) |
| 53 | + |
| 54 | +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. |
| 55 | + |
| 56 | +In November, we merged the following updates: |
| 57 | + |
| 58 | +- [Don't deny warnings on CI](https://github.com/rust-osdev/x86_64/pull/201) |
| 59 | +- [Rename `enable_interrupts_and_hlt` to `enable_and_hlt`](https://github.com/rust-osdev/x86_64/pull/206) |
| 60 | +- [Release version 0.12.3](https://github.com/rust-osdev/x86_64/pull/200) |
| 61 | + |
| 62 | +Thanks to [@toku-sa-n](https://github.com/toku-sa-n) for their contribution! |
| 63 | + |
| 64 | +### [`multiboot2`](https://github.com/rust-osdev/multiboot2-elf64) |
| 65 | + |
| 66 | +The `multiboot2` crate provides abstraction types for the boot information of multiboot2 bootloaders. We merged the following updates this month: |
| 67 | + |
| 68 | +- [Access to non-available memory areas](https://github.com/rust-osdev/multiboot2-elf64/pull/71) <span class="gray">(published as `v0.10.0`)</span> |
| 69 | +- [Fix a few warnings](https://github.com/rust-osdev/multiboot2-elf64/commit/a1237bcf357e5d4a5a6c40038fd1e690ef7305d9) <span class="gray">(published as `v0.10.1`)</span> |
| 70 | + |
| 71 | +Thanks to [@CalebLBaker](https://github.com/CalebLBaker) for their contribution! |
| 72 | + |
| 73 | +## Personal Projects |
| 74 | + |
| 75 | +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](https://github.com/rust-osdev/homepage/pulls) with the updates of your OS project for the next post. |
| 76 | + |
| 77 | +### [`IsaacWoods/pebble`](https://github.com/IsaacWoods/pebble) |
| 78 | + |
| 79 | +<span class="gray">(Section written by [@IsaacWoods](https://github.com/IsaacWoods))</span> |
| 80 | + |
| 81 | +Between university and work on `acpi`, I haven't had a huge amount of time to work on Pebble for the last couple of |
| 82 | +months, but in November I: |
| 83 | +- Implemented a basic form of [TLS](https://en.wikipedia.org/wiki/Thread-local_storage) for userspace tasks. Pebble |
| 84 | + doesn't have threads, but an Address Space can have multiple Tasks running from the same image, each of which |
| 85 | + need their copy of the master TLS record. TLS support is also needed very early in Rust's `std`, so this was the |
| 86 | + next step in creating a `std` implementation for Pebble. |
| 87 | +- Tried to fix a bug in Pebble's UEFI bootloader, where we crash if memory allocated to Boot Services is unmapped |
| 88 | + after `ExitBootServices`. This may be a bug in OVMF - please get in touch if you've come across something |
| 89 | + similar and know what's going on! |
| 90 | +- Continued work on the USB XHCI driver |
| 91 | +- Improved detection of Intel microarchitectures - we can now differentiate Kaby Lake and Coffee Lake processors |
| 92 | + based on their `cpuid` steppings |
| 93 | + |
| 94 | +### [`phil-opp/blog_os`](https://github.com/phil-opp/blog_os) |
| 95 | + |
| 96 | +<span class="gray">(Section written by [@phil-opp](https://github.com/phil-opp))</span> |
| 97 | + |
| 98 | +In November, we merged the following changes to the [_Writing an OS in Rust_](https://os.phil-opp.com/) blog: |
| 99 | + |
| 100 | +- [Add Right-to-Left support for template](https://github.com/phil-opp/blog_os/pull/875) |
| 101 | +- [Add Persian translation for posts of `Bare Bone` Chapter](https://github.com/phil-opp/blog_os/pull/878) |
| 102 | +- [Show all available languages](https://github.com/phil-opp/blog_os/pull/880) |
| 103 | +- [Emphasize moving code](https://github.com/phil-opp/blog_os/pull/883) |
| 104 | + |
| 105 | +Thanks to [@hamidrezakp](https://github.com/hamidrezakp), [@Undin](https://github.com/Undin), and [@briankung](https://github.com/briankung) for their contributions! |
| 106 | + |
| 107 | +Behind the scenes, I'm still working on the upcoming revision of the blog with UEFI and framebuffer support. One fundamental problem of the new build approach planned for this revision is that we can no longer use `.cargo/config` files for specifying defaults. See my comment on GitHub for [more details on the problem](https://github.com/rust-lang/cargo/pull/8757#issuecomment-713897532). |
| 108 | + |
| 109 | +To solve this issue, I created a proposal on the Rust internals forum to [_move some cargo config settings to `Cargo.toml`_](https://internals.rust-lang.org/t/proposal-move-some-cargo-config-settings-to-cargo-toml/13336). While it is still not implemented yet, the great news is that the proposal was [approved by the Cargo team](https://internals.rust-lang.org/t/proposal-move-some-cargo-config-settings-to-cargo-toml/13336/14) 🎉! Now I (or someone else) just needs to find the time to implement this, then the last remaining blocker for the new build system should be resolved. |
| 110 | + |
| 111 | +### [`lucis-fluxum/ps2-rs`](https://github.com/lucis-fluxum/ps2-rs) |
| 112 | + |
| 113 | +<span class="gray">(Section written by [@lucis-fluxum](https://github.com/lucis-fluxum))</span> |
| 114 | + |
| 115 | +This is a new library I created to provide OS kernels with low-level access to the PS/2 controller and devices. It |
| 116 | +uses a poll-based approach with a timeout to read and write data to the IO ports. |
| 117 | + |
| 118 | +While some of the library's functionality won't work on modern devices due to differing implementations of PS/2 |
| 119 | +emulation between manufacturers, it should be enough to get initialized and receiving scancodes and mouse events. |
| 120 | +Theoretically, it should work with PS/2-compatible keyboards all the way back to the IBM Model M! |
| 121 | + |
| 122 | +## Join Us? |
| 123 | + |
| 124 | +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 [gitter channel](https://gitter.im/rust-osdev/Lobby). |
0 commit comments