内容简介:Welcome to the first issue ofThese posts are the successor of theThis series is openly developed
Welcome to the first 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 community.
These posts are the successor of the
"Status Update"
posts
on the "Writing an OS in Rust"
blog. Instead of only focusing on the updates to the blog and the directly related crates, we try to give an overview of the full Rust OSDev ecosystem in this new series. This includes all the projects under the
rust-osdev
GitHub organization, relevant projects of other organizations, and also personal OS projects.
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 .
News and Blog Posts
We try to collect posts that are relevant to Rust-based OS development each month. Please create pull requests for any posts that you want linked in the next issue.
- Rust/WinRT Public Preview
- Georgia Tech CS-3210: Write an OS for the Raspberry Pi in Rust
- Rust-Written Redox OS Booting The 128-Thread AMD Ryzen Threadripper 3990X
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.
This month, we released version 0.10.0
of x86_64
, which includes some breaking changes:
-
Breaking:
Make
map_to
andupdate_flags
unsafe - Breaking: Make FrameDeallocator::deallocate_frame unsafe
- Breaking: Don't pass small trivially copyable types by reference
-
Use
#[inline]
everywhere -
Add
{PhysFrame,Page}::from_start_address_unchecked
After v0.10.0
, the following changes were merged:
-
Add
InterruptDescriptorTable::load_unsafe
(published asv0.10.1
) -
Use
llvm_asm!
instead of deprecatedasm!
macro-
This might break older nightlies. Given that version
0.10.x
is so recent, we still decided to release only a patch version. Note that this isn't a breaking change in thesemver
sense since we only guarantee compatibility with recent nightlies.
-
This might break older nightlies. Given that version
-
Return the correct RPL from
GDT::add_entry()
(published asv0.10.2
)
Thanks to @m-ou-se , @tomaka , @haraldh , and @imtsuki for their contributions!
acpi
and aml
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. The crate for parsing the static tables (
acpi
) was stabilised this month – while it needs more work to support the entire spec, it is now in the state where it can be integrated into a Rust kernel to provide useful information, and its overall architecture is unlikely to change in the near future.
The full set of changes is:
- Remove two nightly features in the ACPI crate
- Make local NMI line table optional (published as v0.8.0)
-
Prepare for stabilisation of the
acpi
crate (:tada: published as v1.0.0 :tada:)
Thanks to @tomaka
for their contribution and congratulations to the creator and maintainer @IsaacWoods
on the 1.0
release!
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:
-
SSE feature: remove inline assembly + don't set reserved bits
(published as
v0.9.1
) -
Use
llvm_asm!
instead of deprecatedasm!
(published asv0.9.2
)
Thanks to @Freax13 and @realKennyStrawn93 for these changes!
Right now, @rybot666
and @phil-opp
are working on a rewrite of the bootloader. The goal is to port the 16-bit and 32-bit stages from assembly to Rust, which should make the crate safer, more composable, and easier to understand for outsiders. Our progress is tracked in the
Rewrite
milestone
.
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 April, the crate received the following updates:
- Set empty RUSTFLAGS to ensure that no .cargo/config applies (published as v0.7.9)
- Add support for doctests (published as v0.7.10)
Thanks to @Freax13 for their contribution!
uart_16550
The
uart_16550
crate
provides basic support for serial port I/O for 16550-compatible UARTs. This month, the crate received support for serial input:
Thanks to @imtsuki for their contribution!
cargo-xbuild
The
cargo-xbuild
project provides cargo
command wrappers to cross-compile the sysroot crates core
and alloc
. This month, we added a new environment variable to help debugging build errors:
- Add an environment variable to keep the temp dir (published as v0.5.29)
uefi
The
uefi
crate
provides abstractions for the
UEFI
standard that replaces the traditional BIOS on modern systems. This month, the crate received a new cargo feature to ignore logger errors:
New Projects
There are a number of new projects in the rust-osdev
organization:
-
homepage
: As you might have noticed by now, we have a new organization-level homepage at https://rust-osdev.com/ . Thehomepage
repository contains the source code for this website. Right now, it is still a work-in-progress and only contains the very minimum to host this post, but we plan to add more content soon.Note that we will create a branch for the upcoming May issue of "This Month in Rust OSDev" . Please open pull requests for any content that you would like to see next month.
-
vga
: The goal of thevga
crate is to allow configuration of the VGA hardware. It already makes it possible to switch from a text-based buffer to a pixel-based framebuffer, which enables drawing of lines, geometric shapes, and even images. The library is created by @RKennedy9064 . -
ps2-mouse
: The library provides a basic interface for interacting with a PS/2 mouse. It is also created by @RKennedy9064 .
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 )
Pebble
has been undergoing a bit of a reorganisation, in the interests of supporting a second architecture (ARM64). A hardware abstraction layer (HAL) has been introduced that abstracts away the platform-specifics of managing page tables, creating processes etc. so that the main kernel
crate is now completely platform-independent.
I also wrote a little TFTP server for netbooting a Raspberry Pi 4 from a development machine. This makes iterating the kernel a lot easier because there's no need to write it to an SD card after every compile. In the next few weeks, I hope to clean this code up and publish it for use as both a library and CLI application, and maybe write a blog-post on the intricacies of netbooting the Pi.
rust-embedded/rust-raspberrypi-OS-tutorials
(Section written by @andre-richter )
The Operating System development tutorials in Rust on the Raspberry Pi project received the following updates recently:
-
Add
tutorial 14
: Exceptions Part 2: Peripheral IRQs.-
We write
device drivers
for the two interrupt controllers on the Raspberry Pi 3 (Broadcom custom controller) and Pi 4 (ARM Generic Interrupt Controller v2,GICv2
). -
Modularity is ensured by interfacing everything through a trait named
IRQManager
. -
Handling for our first peripheral IRQ is implemented: The
UART
's receive IRQ - one IRQ per received character.
-
We write
-
Set chainloader relocation address to
32 MiB
.- Enables booting on Pi3 A+ devices.
-
Run the chainloader natively on non-Linux Unix systems
.
-
Adds experimental support for
macOS
and other Unix systems which haveRuby
available.
-
Adds experimental support for
phil-opp/blog_os
(Section written by @phil-opp )
Apart from a few minor fixes
(thanks for all the contributions!), April was a quiet month for the
"Writing an OS in Rust"
project. I focused my work this month on the x86_64
library, the rewrite of the bootloader, and my job search instead. In this regard, I'm excited to announce that I have decided to do Rust-related freelance work for now, which will allow me to continue dedicating some of my time to open-source work.
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
.
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
面向对象技术UML教程
王少峰 / 清华大学出版社 / 2004-2 / 24.00元
《面向对象技术UML教程》主要介绍统一建模语言UML及其应用。全书内容丰富,包括UML的用例图、顺序图、协作图、类图、对象图、状态图、活动图、构件图和部署图等9个图中所涉及的术语、规则和应用,以及数据建模、OCL、业务建模、Web建模、设计模式、OO实现语言、RUP等方面的内容,同时介绍了Rose开发工具中的一些用法。《面向对象技术UML教程》最后是一个课程注册系统的实例研究,以及一些思考题和设计......一起来看看 《面向对象技术UML教程》 这本书的介绍吧!