From cfd31a977d65ee838abe1190f3a1aa0baf7b2444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pontus=20Lundstr=C3=B6m?= Date: Wed, 31 May 2023 17:14:43 +0300 Subject: [PATCH] Repeat previous for post-08 --- .../edition-2/posts/08-paging-introduction/index.fa.md | 4 ++-- .../edition-2/posts/08-paging-introduction/index.ja.md | 4 ++-- blog/content/edition-2/posts/08-paging-introduction/index.md | 4 ++-- .../edition-2/posts/08-paging-introduction/index.zh-CN.md | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/blog/content/edition-2/posts/08-paging-introduction/index.fa.md b/blog/content/edition-2/posts/08-paging-introduction/index.fa.md index 27b0714e..a196d794 100644 --- a/blog/content/edition-2/posts/08-paging-introduction/index.fa.md +++ b/blog/content/edition-2/posts/08-paging-introduction/index.fa.md @@ -322,7 +322,7 @@ pub extern "C" fn _start() -> ! { blog_os::init(); // new - let ptr = 0xdeadbeaf as *mut u32; + let ptr = 0xdeadbeaf as *mut u8; unsafe { *ptr = 42; } // as before @@ -347,7 +347,7 @@ pub extern "C" fn _start() -> ! { ```rust // Note: The actual address might be different for you. Use the address that // your page fault handler reports. -let ptr = 0x2031b2 as *mut u32; +let ptr = 0x2031b2 as *mut u8; // read from a code page unsafe { let x = *ptr; } diff --git a/blog/content/edition-2/posts/08-paging-introduction/index.ja.md b/blog/content/edition-2/posts/08-paging-introduction/index.ja.md index 03be001c..f938067a 100644 --- a/blog/content/edition-2/posts/08-paging-introduction/index.ja.md +++ b/blog/content/edition-2/posts/08-paging-introduction/index.ja.md @@ -329,7 +329,7 @@ pub extern "C" fn _start() -> ! { blog_os::init(); // ここを追加 - let ptr = 0xdeadbeaf as *mut u32; + let ptr = 0xdeadbeaf as *mut u8; unsafe { *ptr = 42; } // ここはこれまでと同じ @@ -354,7 +354,7 @@ pub extern "C" fn _start() -> ! { ```rust // 注意:実際のアドレスは個々人で違うかもしれません。 // あなたのページフォルトハンドラが報告した値を使ってください。 -let ptr = 0x2031b2 as *mut u32; +let ptr = 0x2031b2 as *mut u8; // コードページから読み込む unsafe { let x = *ptr; } diff --git a/blog/content/edition-2/posts/08-paging-introduction/index.md b/blog/content/edition-2/posts/08-paging-introduction/index.md index ab1e8941..10bff5b5 100644 --- a/blog/content/edition-2/posts/08-paging-introduction/index.md +++ b/blog/content/edition-2/posts/08-paging-introduction/index.md @@ -316,7 +316,7 @@ pub extern "C" fn _start() -> ! { blog_os::init(); // new - let ptr = 0xdeadbeaf as *mut u32; + let ptr = 0xdeadbeaf as *mut u8; unsafe { *ptr = 42; } // as before @@ -341,7 +341,7 @@ We see that the current instruction pointer is `0x2031b2`, so we know that this ```rust // Note: The actual address might be different for you. Use the address that // your page fault handler reports. -let ptr = 0x2031b2 as *mut u32; +let ptr = 0x2031b2 as *mut u8; // read from a code page unsafe { let x = *ptr; } diff --git a/blog/content/edition-2/posts/08-paging-introduction/index.zh-CN.md b/blog/content/edition-2/posts/08-paging-introduction/index.zh-CN.md index f535bfb9..a3f60a8e 100644 --- a/blog/content/edition-2/posts/08-paging-introduction/index.zh-CN.md +++ b/blog/content/edition-2/posts/08-paging-introduction/index.zh-CN.md @@ -325,7 +325,7 @@ pub extern "C" fn _start() -> ! { blog_os::init(); // new - let ptr = 0xdeadbeaf as *mut u32; + let ptr = 0xdeadbeaf as *mut u8; unsafe { *ptr = 42; } // as before @@ -350,7 +350,7 @@ pub extern "C" fn _start() -> ! { ```rust // Note: The actual address might be different for you. Use the address that // your page fault handler reports. -let ptr = 0x2031b2 as *mut u32; +let ptr = 0x2031b2 as *mut u8; // read from a code page unsafe { let x = *ptr; }