mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Merge pull request #729 from phil-opp/front-page-update
Some style updates to the front page
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
title = "Disable the Red Zone"
|
title = "Disable the Red Zone"
|
||||||
weight = 1
|
weight = 1
|
||||||
path = "red-zone"
|
path = "red-zone"
|
||||||
|
template = "second-edition/extra.html"
|
||||||
+++
|
+++
|
||||||
|
|
||||||
The [red zone] is an optimization of the [System V ABI] that allows functions to temporarily use the 128 bytes below its stack frame without adjusting the stack pointer:
|
The [red zone] is an optimization of the [System V ABI] that allows functions to temporarily use the 128 bytes below its stack frame without adjusting the stack pointer:
|
||||||
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@@ -2,7 +2,7 @@
|
|||||||
title = "Disable SIMD"
|
title = "Disable SIMD"
|
||||||
weight = 2
|
weight = 2
|
||||||
path = "disable-simd"
|
path = "disable-simd"
|
||||||
|
template = "second-edition/extra.html"
|
||||||
+++
|
+++
|
||||||
|
|
||||||
[Single Instruction Multiple Data (SIMD)] instructions are able to perform an operation (e.g. addition) simultaneously on multiple data words, which can speed up programs significantly. The `x86_64` architecture supports various SIMD standards:
|
[Single Instruction Multiple Data (SIMD)] instructions are able to perform an operation (e.g. addition) simultaneously on multiple data words, which can speed up programs significantly. The `x86_64` architecture supports various SIMD standards:
|
||||||
@@ -169,7 +169,7 @@ This setting specifies that the target doesn't support [stack unwinding] on pani
|
|||||||
|
|
||||||
We're writing a kernel, so we'll need to handle interrupts at some point. To do that safely, we have to disable a certain stack pointer optimization called the _“red zone”_, because it would cause stack corruptions otherwise. For more information, see our separate post about [disabling the red zone].
|
We're writing a kernel, so we'll need to handle interrupts at some point. To do that safely, we have to disable a certain stack pointer optimization called the _“red zone”_, because it would cause stack corruptions otherwise. For more information, see our separate post about [disabling the red zone].
|
||||||
|
|
||||||
[disabling the red zone]: @/second-edition/extra/disable-red-zone/index.md
|
[disabling the red zone]: @/second-edition/posts/02-minimal-rust-kernel/disable-red-zone/index.md
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"features": "-mmx,-sse,+soft-float",
|
"features": "-mmx,-sse,+soft-float",
|
||||||
@@ -183,7 +183,7 @@ The `mmx` and `sse` features determine support for [Single Instruction Multiple
|
|||||||
|
|
||||||
A problem with disabling SIMD is that floating point operations on `x86_64` require SIMD registers by default. To solve this problem, we add the `soft-float` feature, which emulates all floating point operations through software functions based on normal integers.
|
A problem with disabling SIMD is that floating point operations on `x86_64` require SIMD registers by default. To solve this problem, we add the `soft-float` feature, which emulates all floating point operations through software functions based on normal integers.
|
||||||
|
|
||||||
For more information, see our post on [disabling SIMD](@/second-edition/extra/disable-simd/index.md).
|
For more information, see our post on [disabling SIMD](@/second-edition/posts/02-minimal-rust-kernel/disable-simd/index.md).
|
||||||
|
|
||||||
#### Putting it Together
|
#### Putting it Together
|
||||||
Our target specification file now looks like this:
|
Our target specification file now looks like this:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<h2 class="post-title"><a href="/{{ page.path | safe }}">{{ page.title }}</a></h2>
|
<h2 class="post-title"><a href="/{{ page.path | safe }}">{{ page.title }}</a></h2>
|
||||||
<div class="post-summary">
|
<div class="post-summary">
|
||||||
{{ page.summary | safe}}
|
{{ page.summary | safe}}
|
||||||
<a class="read-more" href="/{{ page.path | safe }}">read more…</a>
|
<a class="read-more" href="/{{ page.path | safe }}"><em>read more »</em></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endmacro post_link %}
|
{% endmacro post_link %}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<header class="masthead">
|
<header class="masthead">
|
||||||
<div style="position:relative">
|
<div style="position:relative">
|
||||||
<h1 class="masthead-title">
|
<h1 class="masthead-title">
|
||||||
<a href="{{ config.base_url | safe }}" title="Home">{{ config.title | safe }} (Second Edition)</a>
|
<a href="{{ config.base_url | safe }}" title="Home">{{ config.title | safe }}</a>
|
||||||
</h1>
|
</h1>
|
||||||
<p><small>{{ config.extra.subtitle | replace(from=" ", to=" ") | safe }}</small></p>
|
<p><small>{{ config.extra.subtitle | replace(from=" ", to=" ") | safe }}</small></p>
|
||||||
{% block header %}{% endblock header %}
|
{% block header %}{% endblock header %}
|
||||||
|
|||||||
@@ -55,26 +55,8 @@
|
|||||||
</ul></p>
|
</ul></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="posts first-edition">
|
|
||||||
<h2 class="post-title">First Edition</h2>
|
|
||||||
You are viewing the second edition of “Writing an OS in Rust”, which is still in progress. The <a href="{{ get_url(path = "/first-edition") | safe }}">first edition</a> has more content, but is no longer updated. We try our best to incorporate the missing content soon.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div class="frontpage-section">
|
|
||||||
{% set extra = get_section(path = "second-edition/extra/_index.md") %}
|
|
||||||
<h1>{{ extra.title }}</h1>
|
|
||||||
<ul>
|
|
||||||
{% for subsection in extra.subsections %}
|
|
||||||
<li><a href="/{{ subsection.path | safe }}">{{ subsection.title }}</a></li>
|
|
||||||
{% endfor %}
|
|
||||||
{% for page in extra.pages %}
|
|
||||||
<li><a href="/{{ page.path | safe }}">{{ page.title }}</a></li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="frontpage-section">
|
<div class="frontpage-section">
|
||||||
<h1>Status Updates</h1>
|
<h1>Status Updates</h1>
|
||||||
{% set status_updates = get_section(path = "status-update/_index.md") %}
|
{% set status_updates = get_section(path = "status-update/_index.md") %}
|
||||||
@@ -88,6 +70,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="frontpage-section">
|
<div class="frontpage-section">
|
||||||
|
<h1 class="post-title">First Edition</h1>
|
||||||
|
<p>You are currently viewing the second edition of “Writing an OS in Rust”. The first edition is very different in many aspects, for example it builds upon the GRUB bootloader instead of using the `bootloader` crate. In case you're interested in it, it is still available. Note that the first edition is no longer updated and might contain outdated information. <a class="read-more" href="{{ get_url(path = "/first-edition") | safe }}"><em>read the first edition »</em></a></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="">
|
||||||
<h1>Support Me</h1>
|
<h1>Support Me</h1>
|
||||||
{% include "support.html" %}
|
{% include "support.html" %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user