This Month in Rust OSDev (May 2020)

栏目: IT技术 · 发布时间: 4年前

内容简介:Welcome to the second issue ofThis series is openly developedIn this section, we give an overview of notable changes to the projects hosted under the

Welcome to the second 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.

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 .

Project Updates

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

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 May, the crate received a bugfix for inclusive page/frame ranges. We also landed a long-awaited change to the Mapper::map_to function to set certain page table flags also in higher level page tables:

Thanks to @haraldh and @mrll for their contributions!

cargo-xbuild

The cargo-xbuild project provides cargo command wrappers to cross-compile the sysroot crates core and alloc .

This month, rustc / cargo changed their codegen behavior for builds with link-time optimization (LTO) , which lead to breakage for LTO builds with cargo-xbuild . Fixing this issue was not easy and required multiple tries until we found a proper solution .

Unfortunately, the solution still led to link issues for some people, which was caused by a bug in cargo / rustc . Thanks to @alexcrichton , this was quickly fixed in rustc , so that now everything should work again.

Apart from these bugfixes, there were also two other changes this month:

Thanks to @Nils-TUD for their contribution and to all the people that helped investigating the build errors!

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.

Not a lot happened this month, but preparations were made to change how the AML namespace is stored on the heap, in order to avoid a lot of small heap allocations for AML paths, and reduce the number of heap allocations overall. However, some more profiling infrastructure will need to be built before starting this.

In preparation, a change to how DefName s are stored in the namespace was made, which avoids an extra heap allocation per DefName , and also allows us to simplify some code around the aml crate.

bootloader

The bootloader crate implements a custom Rust-based bootloader for easy loading of 64-bit ELF executables. It received the following updates this month:

Thanks to @mark-i-m and @Aaron1011 for their contributions!

bootimage

The bootimage tool allows the creation of bootable disk images for bootloader -based kernels. It also provides a runner executable for cargo to make cargo xrun and cargo xtest work using QEMU. In May, the crate was almost completely rewritten with a smaller API to make it more maintainable:

uart_16550

The uart_16550 crate provides basic support for serial port I/O for 16550-compatible UARTs. This month, the crate received the following updates:

Thanks to @dbeckwith for their contribution!

uefi

The uefi crate provides abstractions for the UEFI standard that replaces the traditional BIOS on modern systems. This month, the crate's dependencies were updated, and a bug was fixed in the graphics protocol:

Thanks to @imtsuki and @BinaryTENSHi for their contributions!

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.

IsaacWoods/pebble

(Section written by @IsaacWoods )

This month, I've been tracking down a bug in the kernel that causes usermode stacks to become corrupted on the return of some system calls. While I've not found the root cause, I've taken this opportunity to add some more debugging capabilities, which have found a number of other kernel bugs.

I also started working on the Rust implementation of Ptah , the wire format for Pebble's message passing interface. It allows libraries to easily use Serde to serialize and deserialize Rust types to and from the wire format. In the future, a compiler will be able to generate bindings for Ptah for a number of different supported languages, which will allow tasks written in different languages to communicate over Pebble Channel s using idiomatic types.

RustyHermit

(Section written by @stlankes )

RustyHermit is a unikernel targeting a scalable and predictable runtime. Unikernel means, you bundle your application directly with the kernel library, so that it can run without any installed operating system. This reduces image size and overhead, therefore, interesting applications include virtual machines and high-performance computing.

This month the integration of smoltcp has been improved and first support for virtio has been integrated. The integration in Rust's standard runtime is already in progress and clients can be developed with TcpStream . Server side applications will follow soon.

phil-opp/blog_os

(Section written by @phil-opp )

This month, support for the legacy asm! macro was removed from rustc . This lead to build errors for the Writing an OS in Rust project because some dependencies were still using the macro. To fix this, I landed a number of dependency updates:

I also decided to change the design of the executor in the Async/Await post to simplify it:

While I already started a draft on the next blog post about processes, I currently plan to look into adding UEFI support to the bootloader crate first. The reason is that UEFI support will require some fundamental changes to the blog because the VGA text buffer and the legacy PIC are not supported on UEFI. This is also relevant to the upcoming post about processes, since different designs would be possible if we used the APIC instead of the legacy PIC. It therefore makes most sense to me to sort this out first.

rust-embedded/rust-raspberrypi-OS-tutorials

(Section written by @andre-richter )

May was a quiet month for the project, since I am currently taking a little hiatus. I am planning to restart working on new content two or three months down the road.

Therefore, only some maintenance updates went in, e.g. bumping all dependency crates to versions that support the new llvm_asm! macros. Also, the :cn: chinese translations received updates/additions ( main Readme ; 00_before_we_start ).

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 gitter channel .


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

游戏编程算法与技巧

游戏编程算法与技巧

【美】Sanjay Madhav / 刘瀚阳 / 电子工业出版社 / 2016-10 / 89

《游戏编程算法与技巧》介绍了大量今天在游戏行业中用到的算法与技术。《游戏编程算法与技巧》是为广大熟悉面向对象编程以及基础数据结构的游戏开发者所设计的。作者采用了一种独立于平台框架的方法来展示开发,包括2D 和3D 图形学、物理、人工智能、摄像机等多个方面的技术。《游戏编程算法与技巧》中内容几乎兼容所有游戏,无论这些游戏采用何种风格、开发语言和框架。 《游戏编程算法与技巧》的每个概念都是用C#......一起来看看 《游戏编程算法与技巧》 这本书的介绍吧!

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具