RSSAmplifier

Blog

Stephen Marz

Operating Systems and General Computer Science Topics

blog.stephenmarz.comRSS feed ↗10 posts

Latest posts

The RISC-V APLIC’s New Features

Contents Repository Introduction The APLIC Conclusion Repository This blog series refers to the code written here: https://github.com/sgmarz/riscv_msi. The APLIC specification (still in draft) is part of the Advanced Interrupt Architecture (AIA) specification, and it is kept here: https://github.com/riscv/riscv-aia. I am using AIA specification version 0.3.0-draft.31 to write this article.…

RISC-V Is Getting MSIs!

Contents Overview Repository Message Signaled Interrupts (MSI) Incoming MSI Controller (IMSIC) Conclusion What s Next Overview Message signaled interrupts or MSIs describe a way to signal an interrupt without a dedicated interrupt request pin (IRQ). One of the most prevalent uses for MSIs is the PCI bus, and the PCI specification defines the MSI and MSI-X [ ]

Five Tips to Writing RISC-V Assembly

Writing assembly is itself an art. When C, C++, or any other language is compiled, the compiler determines the art of writing assembly. However, this time, we will some of the techniques and decisions we can make to write these ourselves. We will use RISC-V to see how to design logic, write up the logic, [ ]

Writing Pong in Rust for my OS Written in Rust

This post is part of a larger effort you can view over here: https://osblog.stephenmarz.com. Video Contents Overview Application Programmer s Interface (API) Starting Routines System Calls Drawing Primitives Event Handling Start Our Game Game Loop PLAY Overview We last left off writing a graphics driver and an event driver for our operating system. We also added [ ]

Why did I catch s*** for my use of the RISC-V SFENCE.VMA instruction?

This post is part of a longer OS tutorial which can be found here: https://osblog.stephenmarz.com Contents Introduction What is SATP? What is SFENCE.VMA? What is happening? The Translation Lookaside Buffer Conclusion References Introduction My last post garnered some attention by those telling me that I forgot to execute an SFENCE.VMA after I wrote to the [ ]

Back That ‘S’ Up: Moving to RISC-V’s Supervisor Mode

This is a continuation of an ongoing theme which is started here: https://osblog.stephenmarz.com. Contents What is Supervisor Mode? Why Supervisor Mode? Complications while in Supervisor Mode Complications with Interrupts Conclusion What is Supervisor Mode? My original OS Blog (see here: https://osblog.stephenmarz.com) ran the operating system in RISC-V s machine mode, which is the most privileged…

Getting Graphical Output from our Custom RISC-V Operating System in Rust

An operating system is used to make our job easier when using graphics. In our instance, in addition to everything else. In this post, we will be writing a GPU (graphics processing unit) driver using the VirtIO specification. In here, we will allow user applications to have a portion of the screen as RAM--with what is commonly known as a framebuffer.

Hooking up our Custom OS to a Standard Library

The standard library contains a ton of code that we don t want to write ourselves, including printf, scanf, math functions, and so forth. So, we need to make sure our operating system can link to this library and everything just works . This post will show you how I linked our operating system to a standard [ ]

Talking with our new Operating System by Handling Input Events and Devices

Input devices give our operating system the ability to accept mouse and keyboard inputs from the graphical user interface (GUI). We originally used the UART (universal asynchronous receiver/transmitter) for console I/O, but we're high class now--we have a GUI! So, we will use the virtio protocol to communicate with a mouse and keyboard.

Dynamic Linking

Static vs dynamic linking usually has to do with our tolerance for the size of our final executable. A static executable contains all code necessary to run the executable, so the operating system loads the executable into memory, and it's off to the races. However, if we keep duplicating code over and over again, such as printf, then it starts to use up more and more space. So, dynamic linking…