diff --git a/blog/templates/first-edition/comments/allocating-frames.html b/blog/templates/first-edition/comments/allocating-frames.html index 500f3600..5604d773 100644 --- a/blog/templates/first-edition/comments/allocating-frames.html +++ b/blog/templates/first-edition/comments/allocating-frames.html @@ -1,213 +1,213 @@ {% raw %} -
Philipp Oppermann

There is some interesting discussion on reddit.

{% endraw %} diff --git a/blog/templates/first-edition/comments/better-exception-messages.html b/blog/templates/first-edition/comments/better-exception-messages.html index 9e17af5e..139c5e67 100644 --- a/blog/templates/first-edition/comments/better-exception-messages.html +++ b/blog/templates/first-edition/comments/better-exception-messages.html @@ -1,159 +1,159 @@ {% raw %} -
SmallEgg

Yay ! New post !

I'm so impatient to read the next one ^^
Thank you a lot for what you're doing :)

{% endraw %} diff --git a/blog/templates/first-edition/comments/catching-exceptions.html b/blog/templates/first-edition/comments/catching-exceptions.html index ed9c0467..6ec13669 100644 --- a/blog/templates/first-edition/comments/catching-exceptions.html +++ b/blog/templates/first-edition/comments/catching-exceptions.html @@ -1,171 +1,171 @@ {% raw %} -
Michelle Ramur

Phil these tutorials are awesome, keep going!

{% endraw %} diff --git a/blog/templates/first-edition/comments/double-faults.html b/blog/templates/first-edition/comments/double-faults.html index d0b0b4d4..e5c307e9 100644 --- a/blog/templates/first-edition/comments/double-faults.html +++ b/blog/templates/first-edition/comments/double-faults.html @@ -1,301 +1,301 @@ {% raw %} -
Blaž Šnuderl

Hey. This post seems to break returning from interruptions.

Eg. int!(3) produces a double fault while it returned correctly in the previous post

Aside from that, thanks for this series. It is superbly written with lots of useful info :)

{% endraw %} diff --git a/blog/templates/first-edition/comments/entering-longmode.html b/blog/templates/first-edition/comments/entering-longmode.html index b3a812db..6cb42f38 100644 --- a/blog/templates/first-edition/comments/entering-longmode.html +++ b/blog/templates/first-edition/comments/entering-longmode.html @@ -1,782 +1,782 @@ {% raw %} -
Daniel

Hi, thank you for the blog posts, finding them really accessible and interesting.

The test_long_mode function doesn't look quite right:


test_long_mode:
mov eax, 0x80000000 ; Set the A-register to 0x80000000.
cpuid ; CPU identification.
cmp eax, 0x80000001 ; Compare the A-register with 0x80000001.
jb .no_long_mode ; It is less, there is no long mode.
mov eax, 0x80000000 ; Set the A-register to 0x80000000.
cpuid ; CPU identification.
cmp eax, 0x80000001 ; Compare the A-register with 0x80000001.
jb .no_long_mode ; It is less, there is no long mode.
ret


^ should probaly be (according to your linked OSDEV page):


test_long_mode:
mov eax, 0x80000000 ; Set the A-register to 0x80000000.
cpuid ; CPU identification.
cmp eax, 0x80000001 ; Compare the A-register with 0x80000001.
jb .no_long_mode ; It is less, there is no long mode.
mov eax, 0x80000001 ; Set the A-register to 0x80000001.
cpuid ; CPU identification.
test edx, 1 << 29 ; Test if the LM-bit, which is bit 29, is set in the D-register.
jz .no_long_mode ; They aren't, there is no long mode.
ret

{% endraw %} diff --git a/blog/templates/first-edition/comments/handling-exceptions.html b/blog/templates/first-edition/comments/handling-exceptions.html index 15b0889e..f0c31baa 100644 --- a/blog/templates/first-edition/comments/handling-exceptions.html +++ b/blog/templates/first-edition/comments/handling-exceptions.html @@ -1,63 +1,63 @@ {% raw %} -
Rajivteja Nagipogu

error[E0425]: cannot find function `int3` in module `x86_64::instructions::interrupts`
--> src/lib.rs:55:39
|
55 | x86_64::instructions::interrupts::int3();
| ^^^^ not found in `x86_64::instructions::interrupts`

I am using x86_64 v0.1.0. I looked in both x86_64 and x86 crates.io documentation. There is no such function as int3() in them. May be they stopped support in the newer versions?

{% endraw %} diff --git a/blog/templates/first-edition/comments/kernel-heap.html b/blog/templates/first-edition/comments/kernel-heap.html index e586244c..1ff28bd2 100644 --- a/blog/templates/first-edition/comments/kernel-heap.html +++ b/blog/templates/first-edition/comments/kernel-heap.html @@ -1,163 +1,163 @@ {% raw %} -
Maksadbek

Nice article, thanks

{% endraw %} diff --git a/blog/templates/first-edition/comments/multiboot-kernel.html b/blog/templates/first-edition/comments/multiboot-kernel.html index e780b2ee..3d6142ee 100644 --- a/blog/templates/first-edition/comments/multiboot-kernel.html +++ b/blog/templates/first-edition/comments/multiboot-kernel.html @@ -1,774 +1,774 @@ {% raw %} -
Ali Shapal

great work in explaining how all the different pieces of hardware/software come together

{% endraw %} diff --git a/blog/templates/first-edition/comments/page-tables.html b/blog/templates/first-edition/comments/page-tables.html index 8c59434f..6293b6a2 100644 --- a/blog/templates/first-edition/comments/page-tables.html +++ b/blog/templates/first-edition/comments/page-tables.html @@ -1,544 +1,544 @@ {% raw %} -
Philipp Oppermann

There is some interesting discussion on /r/programming and /r/rust.

{% endraw %} diff --git a/blog/templates/first-edition/comments/printing-to-screen.html b/blog/templates/first-edition/comments/printing-to-screen.html index d3f19956..44316f07 100644 --- a/blog/templates/first-edition/comments/printing-to-screen.html +++ b/blog/templates/first-edition/comments/printing-to-screen.html @@ -1,394 +1,394 @@ {% raw %} -
Retep998

Please add #[repr(C)] to some of your structs, in particular the ones that depend on having a specific layout.

{% endraw %} diff --git a/blog/templates/first-edition/comments/remap-the-kernel.html b/blog/templates/first-edition/comments/remap-the-kernel.html index e8f86768..f0bd28f4 100644 --- a/blog/templates/first-edition/comments/remap-the-kernel.html +++ b/blog/templates/first-edition/comments/remap-the-kernel.html @@ -1,83 +1,83 @@ {% raw %} -
Philipp Oppermann

There is some discussion on hacker news, /r/rust, and /r/programming.

{% endraw %} diff --git a/blog/templates/first-edition/comments/returning-from-exceptions.html b/blog/templates/first-edition/comments/returning-from-exceptions.html index 3900fa9c..fcc7422e 100644 --- a/blog/templates/first-edition/comments/returning-from-exceptions.html +++ b/blog/templates/first-edition/comments/returning-from-exceptions.html @@ -1,111 +1,111 @@ {% raw %} -
Philipp Oppermann

There are also great comments on hackernews and /r/rust!

{% endraw %} diff --git a/blog/templates/first-edition/comments/set-up-rust.html b/blog/templates/first-edition/comments/set-up-rust.html index e66dd5de..6bd57bcf 100644 --- a/blog/templates/first-edition/comments/set-up-rust.html +++ b/blog/templates/first-edition/comments/set-up-rust.html @@ -1,393 +1,393 @@ {% raw %} -
emk1024

If you decide to add interrupt support to your OS (for keyboard input, for example), you may not want Rust to be generating SSE code. If you use SEE code in the kernel, then you need to save SSE registers in interrupts, and saving SSE registers is slow and takes a lot of RAM. As far as I can tell, a lot of kernels simply avoid floating point to help keep interrupts and system calls efficient.

Also, as you noted in your bug on GitHub, you'll also want to set no-redzone to prevent memory corruption during interrupts.

Since we need to set a bunch of compiler flags for all generated code, including libcore, the right answer may be to replace the target x86_64-unknown-linux-gnu with a custom target that uses the right options by default. There's a discussion here and an example target file in the zinc OS.

{% endraw %}