From f6a1faab967e1a0c54e74be7900a9dc9a7f64d39 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Mon, 2 Jan 2017 19:39:19 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20broken=20links=20in=20=E2=80=9CDouble=20F?= =?UTF-8?q?aults=E2=80=9D=20(#275)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog/post/12-double-faults.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blog/post/12-double-faults.md b/blog/post/12-double-faults.md index 3d8d8666..d94ef0de 100644 --- a/blog/post/12-double-faults.md +++ b/blog/post/12-double-faults.md @@ -366,8 +366,8 @@ impl MemoryController { ``` The `MemoryController` struct holds the three types that are required for `alloc_stack` and provides a simpler interface (only one argument). The `alloc_stack` wrapper just takes the tree types as `&mut` through [destructuring] and forwards them to the `stack_allocator`. The [ref mut]-s are needed to take the inner fields by mutable reference. Note that we're re-exporting the `Stack` type since it is returned by `alloc_stack`. -[destructuring]: http://rust-lang.github.io/book/chXX-patterns.html#Destructuring -[ref mut]: http://rust-lang.github.io/book/chXX-patterns.html#ref-and-ref-mut +[destructuring]: http://rust-lang.github.io/book/ch18-00-patterns.html#Destructuring +[ref mut]: http://rust-lang.github.io/book/ch18-00-patterns.html#ref-and-ref-mut The last step is to create a `StackAllocator` and return a `MemoryController` from `memory::init`: @@ -500,7 +500,7 @@ pub fn init(memory_controller: &mut MemoryController) { We define that the 0th IST entry is the double fault stack (any other IST index would work too). We create a new TSS through the `TaskStateSegment::new` function and load the top address (stacks grow downwards) of the double fault stack into the 0th entry. #### Loading the TSS -Now that we created a new TSS, we need a way to tell the CPU that it should use it. Unfortunately, this is a bit cumbersome, since the TSS is a Task State _Segment_ (for historical reasons). So instead of loading the table directly, we need to add a new segment descriptor to the [Global Descriptor Table] (GDT). Then we can load our TSS invoking the [`ltr` instruction] with the respective GDT index. +Now that we created a new TSS, we need a way to tell the CPU that it should use it. Unfortunately, this is a bit cumbersome, since the TSS is a Task State _Segment_ (for historical reasons). So instead of loading the table directly, we need to add a new segment descriptor to the [Global Descriptor Table] \(GDT). Then we can load our TSS invoking the [`ltr` instruction] with the respective GDT index. [Global Descriptor Table]: http://www.flingos.co.uk/docs/reference/Global-Descriptor-Table/ [`ltr` instruction]: http://x86.renejeschke.de/html/file_module_x86_id_163.html