From b5d147bf72d56a1b6777c9114236c8e395793484 Mon Sep 17 00:00:00 2001 From: Alexander Kuleshov Date: Sun, 10 Sep 2017 17:58:45 +0600 Subject: [PATCH] boot/pm: fix some expressions --- Booting/linux-bootstrap-3.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Booting/linux-bootstrap-3.md b/Booting/linux-bootstrap-3.md index 34e6abc..5d61773 100644 --- a/Booting/linux-bootstrap-3.md +++ b/Booting/linux-bootstrap-3.md @@ -556,13 +556,15 @@ movl %ecx, %gs movl %ecx, %ss ``` -If you paid attention, you can remember that we saved `$__BOOT_DS` in the `cx` register. And setup valid stack for debugging purposes: +If you paid attention, you can remember that we saved `$__BOOT_DS` in the `cx` register. Now we fill it with all segment registers besides `cs` (`cs` is already `__BOOT_CS`). + +And setup valid stack for debugging purposes: ```assembly addl %ebx, %esp ``` -Now we fill it with all segment registers besides `cs` (`cs` is already `__BOOT_CS`). Next we zero out all general purpose registers besides `eax` with: +The last step before jump into 32-bit entry point is clearing of general purpose registers: ```assembly xorl %ecx, %ecx