Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
smallkirby authored Oct 25, 2024
1 parent 2292890 commit 027d335
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kernel/gdt.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ pub fn init() void {
```

GDTR は GDT のアドレスとサイズのみを持ちます。
アドレスは本来であれば物理アドレスをしていするべきですが、Ymir はまだ UEFI が提供してくれたストレートマップを利用しており、
アドレスは本来であれば物理アドレスを指定するべきですが、Ymir はまだ UEFI が提供してくれたストレートマップを利用しており、
仮想アドレスと物理アドレスが等しいです。
そのため、`&gdt` をそのまま物理アドレスとして使っています。

Expand Down Expand Up @@ -380,7 +380,7 @@ fn loadKernelCs() void {
}
```

`lret` はスタックに積んだ CS/RI を POP して設定してくれます。
`lret` はスタックに積んだ CS/RIP を POP して設定してくれます。
RIP は変更させたくないため直後の `lret` の次の命令を PUSH することで、CS を設定する効果だけを得ています。

以上で GDT の更新が反映されるように成ります。
Expand Down

0 comments on commit 027d335

Please sign in to comment.