mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Move old exception posts to old_posts folder
This commit is contained in:
@@ -295,7 +295,7 @@ Unfortunately, Rust does not support such a calling convention. It was [proposed
|
||||
|
||||
[interrupt calling conventions]: https://github.com/rust-lang/rfcs/pull/1275
|
||||
[Naked functions]: https://github.com/rust-lang/rfcs/blob/master/text/1201-naked-fns.md
|
||||
[naked fn post]: {{% relref "10-better-exception-messages.md#naked-functions" %}}
|
||||
[naked fn post]: {{% relref "better-exception-messages.md#naked-functions" %}}
|
||||
|
||||
### A naked wrapper function
|
||||
|
||||
@@ -499,8 +499,8 @@ _Congratulations_! You have successfully wrestled through this CPU configuration
|
||||
#### One Last Thing
|
||||
Above, we reloaded the code segment register `cs` with the new GDT offset. However, the data segment registers `ss`, `ds`, `es`, `fs`, and `gs` still contain the data segment offsets of the old GDT. This isn't necessarily bad, since they're ignored by almost all instructions in 64-bit mode. However, there are a few instructions that expect a valid data segment descriptor _or the null descriptor_ in those registers. An example is the the [iretq] instruction that we'll need in the [_Returning from Exceptions_] post.
|
||||
|
||||
[iretq]: {{% relref "11-returning-from-exceptions.md#the-iretq-instruction" %}}
|
||||
[_Returning from Exceptions_]: {{% relref "11-returning-from-exceptions.md" %}}
|
||||
[iretq]: {{% relref "returning-from-exceptions.md#the-iretq-instruction" %}}
|
||||
[_Returning from Exceptions_]: {{% relref "returning-from-exceptions.md" %}}
|
||||
|
||||
To avoid future problems, we reload all data segment registers with null:
|
||||
|
||||
|
||||
@@ -835,4 +835,4 @@ Now we're able to use heap storage in our kernel without leaking memory. This al
|
||||
## What's next?
|
||||
This post concludes the section about memory management for now. We will revisit this topic eventually, but now it's time to explore other topics. The upcoming posts will be about CPU exceptions and interrupts. We will catch all page, double, and triple faults and create a driver to read keyboard input. The [next post] starts by setting up a so-called _Interrupt Descriptor Table_.
|
||||
|
||||
[next post]: {{% relref "09-catching-exceptions.md" %}}
|
||||
[next post]: {{% relref "09-handling-exceptions.md" %}}
|
||||
|
||||
Reference in New Issue
Block a user