mirror of
https://github.com/0xAX/linux-insides.git
synced 2025-01-18 11:41:08 +00:00
boot/pm: fix some expressions
This commit is contained in:
parent
6703f0ace4
commit
b5d147bf72
@ -556,13 +556,15 @@ movl %ecx, %gs
|
|||||||
movl %ecx, %ss
|
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
|
```assembly
|
||||||
addl %ebx, %esp
|
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
|
```assembly
|
||||||
xorl %ecx, %ecx
|
xorl %ecx, %ecx
|
||||||
|
Loading…
Reference in New Issue
Block a user