diff --git a/blog/content/status-update/2019-09-09.md b/blog/content/status-update/2019-09-09.md new file mode 100644 index 00000000..66e63c8a --- /dev/null +++ b/blog/content/status-update/2019-09-09.md @@ -0,0 +1,32 @@ ++++ +title = "Updates in August 2019" +date = 2019-09-09 ++++ + +This post gives an overview of the recent updates to the _Writing an OS in Rust_ blog and the used libraries and tools. + +I was very busy with finishing my master's thesis, so I didn't have any to implement any notable changes myself. Thanks to contributions by [@vinaychandra](https://github.com/vinaychandra) and [@64](https://github.com/64), we were still able to publish new versions of the `x86_64`, `bootimage` and `bootloader` crates. + +## `blog_os` + +Apart from [rewriting the section about no-harness tests](https://github.com/phil-opp/blog_os/pull/650) of the _Testing_ post, there were no notable changes to the blog in August. Now that I have some more free time again, I plan to upgrade the blog to the latest versions of `bootloader` and `bootimage`, evaluate the use of [GitHub Actions](https://github.com/features/actions) for the repository, and continue the work on the upcoming post about heap allocator implementations. + +## `x86_64` + +Thanks to [@vinaychandra](https://github.com/vinaychandra), the `x86_64` crate now has [support for the `FsBase` and `GsBase` registers](https://github.com/rust-osdev/x86_64/pull/87). The change was published as version 0.7.5. + +## `bootimage` + +To allow bootloaders to read configuration from the `Cargo.toml` file of the kernel, the `bootimage` crate now [passes the location of the kernel's Cargo.toml to bootloader crates](https://github.com/rust-osdev/bootimage/pull/45). This change was implemented by [@64] and published as version 0.7.7. + +## `bootloader` + +Apart from initializing the CPU and loading the kernel, the `bootloader` crate is also responsible for creating several memory regions for the kernel, for example a program stack and the boot information struct. These regions must be mapped at some address in the virtual address space. + +As a stop-gap solution, the `bootloader` crate used fixed virtual addresses for these regions, which resulted in errors if the kernel tried to use the same address ranges itself. For example, the (optional) recursive mapping of page tables often conflicted with so-called _higher half kernels_, which live at the upper end of the address space. To avoid these conflicts, [@64] updated the `bootloader` crate to [dynamically map the kernel stack, boot info, physical memory, and recursive table regions](https://github.com/rust-osdev/bootloader/pull/71) at an unused virtual address range. + +To also support specifying explicit addresses for these regions, [@64] further added support for [parsing bootloader configuration from the kernel's Cargo.toml](https://github.com/rust-osdev/bootloader/pull/73). This way, the virtual addresses of the kernel stack and physical memory mapping can now be configured using a `package.metadata.bootloader` key in the `Cargo.toml` of the kernel. In a third pull request, [@64] also made the [kernel stack size configurable](https://github.com/rust-osdev/bootloader/pull/72). + +The changes were published together as version 0.8.0. This is a breaking update because the new configuration system requires at least version 0.7.7 of `bootimage`, which is the first version that passes the location of the kernel's `Cargo.toml` file. + +[@64]: https://github.com/64