From a33bf9c889ebdea6057c8d02bcc4e2b6fc2cbf67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klemen=20Ko=C5=A1ir?= Date: Sat, 20 Aug 2016 13:02:41 +0200 Subject: [PATCH 1/4] Fix a function name typo --- blog/post/2015-08-25-entering-longmode.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blog/post/2015-08-25-entering-longmode.md b/blog/post/2015-08-25-entering-longmode.md index 9cc9c732..1abb7ae4 100644 --- a/blog/post/2015-08-25-entering-longmode.md +++ b/blog/post/2015-08-25-entering-longmode.md @@ -184,11 +184,11 @@ If you look at the assembly above, you'll probably notice that we call `cpuid` t We just call these check functions right after start: ```nasm -global _start +global start section .text bits 32 -_start: +start: mov esp, stack_top call check_multiboot From 02ef52c6771c139d426da42b0039986d5c70e10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klemen=20Ko=C5=A1ir?= Date: Sat, 20 Aug 2016 13:03:25 +0200 Subject: [PATCH 2/4] Fix an incorrect year of update in post title --- blog/post/2015-09-02-set-up-rust.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/post/2015-09-02-set-up-rust.md b/blog/post/2015-09-02-set-up-rust.md index f21f18fd..e93da1c4 100644 --- a/blog/post/2015-09-02-set-up-rust.md +++ b/blog/post/2015-09-02-set-up-rust.md @@ -1,7 +1,7 @@ +++ title = "Set Up Rust" date = "2015-09-02" -updated = "2015-05-29" +updated = "2016-05-29" aliases = [ "/2015/09/02/setup-rust/", "/setup-rust.html", From e56df793d48b799917586d7f8ba20f9d372d00fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klemen=20Ko=C5=A1ir?= Date: Sat, 20 Aug 2016 13:03:54 +0200 Subject: [PATCH 3/4] Fix an incorrect function name --- blog/post/2015-12-09-page-tables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/post/2015-12-09-page-tables.md b/blog/post/2015-12-09-page-tables.md index a6d6b5b3..d2c0ab9b 100644 --- a/blog/post/2015-12-09-page-tables.md +++ b/blog/post/2015-12-09-page-tables.md @@ -881,7 +881,7 @@ To test the `unmap` function, we unmap the test page so that it translates to `N page_table.unmap(Page::containing_address(addr), allocator); println!("None = {:?}", page_table.translate(addr)); ``` -It causes a panic since we call the unimplemented `deallocate_frame` method in `unwrap`. If we comment this call out, it works without problems. But there is some bug in this function nevertheless. +It causes a panic since we call the unimplemented `deallocate_frame` method in `unmap`. If we comment this call out, it works without problems. But there is some bug in this function nevertheless. Let's read something from the mapped page (of course before we unmap it again): From 30a8c0629554f545affd829f55bcfef5b7ce8924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klemen=20Ko=C5=A1ir?= Date: Sat, 20 Aug 2016 13:04:26 +0200 Subject: [PATCH 4/4] reexport -> re-export --- blog/post/2015-12-09-page-tables.md | 4 ++-- blog/post/2016-01-01-remap-the-kernel.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blog/post/2015-12-09-page-tables.md b/blog/post/2015-12-09-page-tables.md index d2c0ab9b..74e1b926 100644 --- a/blog/post/2015-12-09-page-tables.md +++ b/blog/post/2015-12-09-page-tables.md @@ -598,7 +598,7 @@ pub fn map_to(page: Page, frame: Frame, flags: EntryFlags, p1[page.p1_index()].set(frame, flags | PRESENT); } ``` -We add an reexport for all `entry` types since they are required to call the function. We assert that the page is unmapped and always set the present flag (since it wouldn't make sense to map a page without setting it). +We add an re-export for all `entry` types since they are required to call the function. We assert that the page is unmapped and always set the present flag (since it wouldn't make sense to map a page without setting it). The `Table::next_table_create` method doesn't exist yet. It should return the next table if it exists, or create a new one. For the implementation we need the `FrameAllocator` from the [previous post] and the `Table::zero` method: @@ -781,7 +781,7 @@ pub fn test_paging(allocator: &mut A) // test it } ``` -We borrow the frame allocator since we will need it for the mapping functions. To be able to call that function from main, we need to reexport it in `memory/mod.rs`: +We borrow the frame allocator since we will need it for the mapping functions. To be able to call that function from main, we need to re-export it in `memory/mod.rs`: ```rust // in memory/mod.rs diff --git a/blog/post/2016-01-01-remap-the-kernel.md b/blog/post/2016-01-01-remap-the-kernel.md index ba90a0ca..541cc2a1 100644 --- a/blog/post/2016-01-01-remap-the-kernel.md +++ b/blog/post/2016-01-01-remap-the-kernel.md @@ -707,7 +707,7 @@ SECTIONS { Instead of page aligning the `.multiboot_header` section, we merge it into the `.rodata` section. That way, we don't waste a whole page for the few bytes of the Multiboot header. We could merge it into any section, but `.rodata` fits best because it has the same flags (neither writable nor executable). The Multiboot header still needs to be at the beginning of the file, so `.rodata` must be our first section now. ### Testing it -Time to test it! We reexport the `remap_the_kernel` function from the memory module and call it from `rust_main`: +Time to test it! We re-export the `remap_the_kernel` function from the memory module and call it from `rust_main`: ```rust // in src/memory/mod.rs