hust-open-atom-club / linux-insides-zh

Linux 内核揭秘
https://docs.hust.openatom.club/linux-insides-zh/
Other
7.19k stars 1.19k forks source link

1.0 error #217

Closed void0red closed 1 year ago

void0red commented 4 years ago

First of all, the kernel ensures that the ds and es segment registers point to the same address. Next, it clears the direction flag using the cld instruction:

movw %ds, %ax
movw %ax, %es
cld

cld not sti

mudongliang commented 1 year ago

Please provide more information. Do you mean some errors in one chapter?

void0red commented 1 year ago

https://github.com/MintCN/linux-insides-zh/blob/44ad5ac5fb82c9038048e27209a784d077f122d8/Booting/linux-bootstrap-1.md?plain=1#L344

it seems to be cld not sti see at:

  1. https://github.com/0xAX/linux-insides/blob/2cceabdd31d8a11c188cb03f5d943eb5d57f27c2/Booting/linux-bootstrap-1.md?plain=1#L435
  2. https://elixir.bootlin.com/linux/latest/source/arch/x86/boot/header.S#L592
mudongliang commented 1 year ago

应该是上游更新了,但是下游的翻译还用之前的版本。

mudongliang commented 1 year ago

你如果有时间的话,可以提交一个PR来更新一下

mudongliang commented 1 year ago

Fixed in commit ad33bb1