Use jekyll features to link to next/previous posts

This commit is contained in:
Philipp Oppermann
2015-08-25 17:07:40 +02:00
parent 1e831e2266
commit 87f36584c2
3 changed files with 9 additions and 8 deletions

View File

@@ -2,12 +2,12 @@
layout: post layout: post
title: 'Setup Rust in small steps' title: 'Setup Rust in small steps'
--- ---
In the last posts we created a [minimal Multiboot kernel][multiboot post] and [switched to Long Mode][long mode post]. Now we can finally switch to sweet Rust code. [Rust] is a beautiful high-level language that has no runtime. It allows us to not link the standard library and write bare metal code. Unfortunately the setup is not quite hassle-free yet. 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 sweet Rust code. [Rust] is a beautiful high-level language that has no 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 setup 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. This blog post tries to setup 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.
[multiboot post]: {% post_url 2015-08-18-multiboot-kernel %} [multiboot post]: {{ site.url }}{{ page.previous.previous.url }}
[long mode post]: #TODO [long mode post]: {{ site.url }}{{ page.previous.url }}
[Rust]: https://www.rust-lang.org/ [Rust]: https://www.rust-lang.org/
[file an issue]: https://github.com/phil-opp/phil-opp.github.io/issues [file an issue]: https://github.com/phil-opp/phil-opp.github.io/issues
[Github repository]: https://github.com/phil-opp/blogOS/tree/rust_setup [Github repository]: https://github.com/phil-opp/blogOS/tree/rust_setup
@@ -363,4 +363,4 @@ Let's break it down:
## What's next? ## What's next?
Right now we write magic bits to memory every time we want to print something. It's time to end the hackery. In the [next post] we create a VGA buffer module that allows us to print strings in different colors. Right now we write magic bits to memory every time we want to print something. It's time to end the hackery. In the [next post] we create a VGA buffer module that allows us to print strings in different colors.
[next post]: #TODO [next post]: #TODO {{ site.url }}{{ page.next.url }}

View File

@@ -281,4 +281,4 @@ In the [next post] we will create a page table and do some CPU configuration to
[Makefile tutorial]: http://mrbook.org/blog/tutorials/make/ [Makefile tutorial]: http://mrbook.org/blog/tutorials/make/
[automatic variables]: https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html [automatic variables]: https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html
[next post]: {% post_url 2015-08-25-entering-longmode %} [next post]: {{ site.url }}{{ page.next.url }}

View File

@@ -2,11 +2,11 @@
layout: post layout: post
title: 'Entering Long Mode in small steps' title: 'Entering Long Mode in small steps'
--- ---
In the [last post] we created a minimal multiboot kernel. It just prints `OK` and hangs. Let's extend it! The goal is to 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 setup _Paging_ and switch to the 64-bit [Long Mode] first. In the [previous post] we created a minimal multiboot kernel. It just prints `OK` and hangs. Let's extend it! The goal is to 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 setup _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 other issues, please leave a comment or [create an issue] on Github. The source code is available in a [repository][source code], too. 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.
[last post]: {% post_url 2015-08-18-multiboot-kernel %} [previous post]: {{ site.url }}{{ page.previous.url }}
[Rust]: http://www.rust-lang.org/ [Rust]: http://www.rust-lang.org/
[Real Mode]: http://wiki.osdev.org/Real_Mode [Real Mode]: http://wiki.osdev.org/Real_Mode
[Protected Mode]: https://en.wikipedia.org/wiki/Protected_mode [Protected Mode]: https://en.wikipedia.org/wiki/Protected_mode
@@ -426,8 +426,9 @@ _Congratulations_! You have successfully wrestled through this CPU configuration
- and we can write these 64-bit registers directly to memory using `mov qword` (quad word) - and we can write these 64-bit registers directly to memory using `mov qword` (quad word)
## Whats next? ## Whats next?
It's time to leave assembly behind[^leave_assembly_behind] and switch to some higher level language. We won't use any C or C++ (not even a single line). Instead we will use the relatively new [Rust] language. It's a systems language without garbage collections but with guaranteed memory safety. Through a real type system and many abstractions it feels like a high-level language but can still be low-level enough for OS development. It's time to leave assembly behind[^leave_assembly_behind] and switch to some higher level language. We won't use any C or C++ (not even a single line). Instead we will use the relatively new [Rust] language. It's a systems language without garbage collections but with guaranteed memory safety. Through a real type system and many abstractions it feels like a high-level language but can still be low-level enough for OS development. The [next post] describes the Rust setup.
[Rust]: https://www.rust-lang.org/ [Rust]: https://www.rust-lang.org/
[next post]: {{ site.url }}{{ page.next.url }}
[^leave_assembly_behind]: Actually we will still need some assembly in the future, but I'll try to minimize it. [^leave_assembly_behind]: Actually we will still need some assembly in the future, but I'll try to minimize it.