Convert front matters to hugo's toml-based format

This commit is contained in:
Philipp Oppermann
2016-04-25 21:54:02 +02:00
parent 814fc5c3c0
commit cdc0b0748b
11 changed files with 68 additions and 52 deletions

View File

@@ -1,7 +1,7 @@
---
layout: page
title: Cross Compile Binutils
---
+++
title = "Cross Compile Binutils"
+++
The [GNU Binutils] are a collection of various binary tools such as `ld`, `as`, `objdump`, or `readelf`. These tools are platform-specific, so you need to compile them again if your host system and target system are different. In our case, we need `ld` and `objdump` for the x86_64 architecture.
[GNU Binutils]: https://www.gnu.org/software/binutils/

View File

@@ -1,7 +1,7 @@
---
layout: page
title: "Cross Compiling: libcore"
---
+++
title = "Cross Compiling: libcore"
+++
So you're getting an ``error: can't find crate for `core` [E0463]`` when using `--target x86_64-unknown-linux-gnu`. That means that you're not running Linux or not using using a x86_64 processor.
**If you have an x86_64 processor and want a quick fix**, try it with `x86_64-pc-windows-gnu` or `x86_64-apple-darwin` (or simply omit the explicit `--target`).

View File

@@ -1,7 +1,7 @@
---
layout: page
title: "Set Up GDB"
---
+++
title = "Set Up GDB"
+++
There are a lot of things that can go wrong when developing an OS. So it's a good idea to add a debugger to our toolset, which allows us to set breakpoints and examine variables. We will use [GDB](https://www.gnu.org/software/gdb/) as QEMU supports it out of the box.
### QEMU parameters

View File

@@ -1,8 +1,12 @@
---
layout: post
title: 'A minimal x86 kernel'
redirect_from: '/2015/08/18/multiboot-kernel/'
---
+++
title = "A minimal x86 kernel"
slug = "multiboot-kernel"
date = "2015-08-18"
aliases = [
"/2015/08/18/multiboot-kernel/",
]
+++
This post explains how to create a minimal x86 operating system kernel. In fact, it will just boot and print `OK` to the screen. The following blog posts we will extend it using the [Rust] programming language.
I tried to explain everything in detail and to keep the code as simple as possible. If you have any questions, suggestions or other issues, please leave a comment or [create an issue] on Github. The source code is available in a [repository][source code], too.

View File

@@ -1,9 +1,13 @@
---
layout: post
title: 'Entering Long Mode'
redirect_from: "/2015/08/25/entering-longmode/"
updated: 2015-10-29 00:00:00 +0000
---
+++
title = "Entering Long Mode"
slug = "entering-longmode"
date = "2015-08-25"
updated = "2015-10-29"
aliases = [
"/2015/08/25/entering-longmode/",
]
+++
In the [previous post] we created a minimal multiboot kernel. It just prints `OK` and hangs. The goal is to extend it and call 64-bit [Rust] code. But the CPU is currently in [protected mode] and allows only 32-bit instructions and up to 4GiB memory. So we need to set up _Paging_ and switch to the 64-bit [long mode] first.
I tried to explain everything in detail and to keep the code as simple as possible. If you have any questions, suggestions, or issues, please leave a comment or [create an issue] on Github. The source code is available in a [repository][source code], too.
@@ -155,7 +159,7 @@ check_long_mode:
cpuid ; get highest supported argument
cmp eax, 0x80000001 ; it needs to be at least 0x80000001
jb .no_long_mode ; if it's less, the CPU is too old for long mode
; use extended info to test if long mode is available
mov eax, 0x80000001 ; argument for extended processor info
cpuid ; returns various feature bits in ecx and edx

View File

@@ -1,9 +1,12 @@
---
layout: post
title: 'Set Up Rust'
redirect_from: "/2015/09/02/setup-rust/"
redirect_from: "/setup-rust.html"
---
+++
title = "Set Up Rust"
date = "2015-09-02"
aliases = [
"/2015/09/02/setup-rust/",
"/setup-rust.html",
]
+++
In the previous posts we created a [minimal Multiboot kernel][multiboot post] and [switched to Long Mode][long mode post]. Now we can finally switch to [Rust] code. Rust is a high-level language without runtime. It allows us to not link the standard library and write bare metal code. Unfortunately the setup is not quite hassle-free yet.
This blog post tries to set up Rust step-by-step and point out the different problems. If you have any questions, problems, or suggestions please [file an issue] or create a comment at the bottom. The code from this post is in a [Github repository], too.

View File

@@ -1,8 +1,11 @@
---
layout: post
title: 'Printing to Screen'
redirect_from: "/2015/10/23/printing-to-screen/"
---
+++
title = "Printing to Screen"
date = "2015-10-23"
aliases = [
"/2015/10/23/printing-to-screen/",
]
+++
In the [previous post] we switched from assembly to [Rust], a systems programming language that provides great safety. But so far we are using unsafe features like [raw pointers] whenever we want to print to screen. In this post we will create a Rust module that provides a safe and easy-to-use interface for the VGA text buffer. It will support Rust's [formatting macros], too.
[previous post]: {{ page.previous.url }}

View File

@@ -1,7 +1,7 @@
---
layout: post
title: 'Allocating Frames'
---
+++
title = "Allocating Frames"
date = "2015-11-15"
+++
In this post we create an allocator that provides free physical frames for a future paging module. To get the required information about available and used memory we use the Multiboot information structure. Additionally, we improve the `panic` handler to print the corresponding message and source line.

View File

@@ -1,7 +1,8 @@
---
layout: post
title: 'Page Tables'
---
+++
title = "Page Tables"
slug = "modifying-page-tables"
date = "2015-12-09"
+++
In this post we will create a paging module, which allows us to access and modify the 4-level page table. We will explore recursive page table mapping and use some Rust features to make it safe. Finally we will create functions to translate virtual addresses and to map and unmap pages.

View File

@@ -1,8 +1,9 @@
---
layout: post
title: 'Remap the Kernel'
updated: 2016-03-06 00:00:00 +0000
---
+++
title = "Remap the Kernel"
date = "2016-01-01"
updated = "2016-03-06"
+++
In this post we will create a new page table to map the kernel sections correctly. Therefor we will extend the paging module to support modifications of _inactive_ page tables as well. Then we will switch to the new table and secure our kernel stack by creating a guard page.
As always, you can find the source code on [Github]. Don't hesitate to file issues there if you have any problems or improvement suggestions. There is also a comment section at the end of this page. Note that this post requires a current Rust nightly.

View File

@@ -1,7 +1,7 @@
---
layout: post
title: 'Kernel Heap'
---
+++
title = "Kernel Heap"
date = "2016-04-11"
+++
In the previous posts we have created a [frame allocator] and a [page table module]. Now we are ready to create a kernel heap and a memory allocator. Thus, we will unlock `Box`, `Vec`, `BTreeMap`, and the rest of the [alloc] and [collections] crates.