Re: i386 start routine
Maxime Villard <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.i386 |
|---|---|
| Message-ID | <[email protected]> |
Le 21/09/2019 à 04:22, Emmanuel Dreyfus a écrit : > Emmanuel Dreyfus <[email protected]> wrote: > >> The CR0 change cause the memory pointed by the stack pointer to be >> unmapped. As a result, the pushl $begin does not push begin adddress on >> the stack, and ret launches us in the twilight zone. >> >> Why enabling protected mode and paging makes a mapping disapear? > > Further reading teaches me that setting CR0_PG enable the mapping given > in CR3, which was built earlier in the file. I understand the temporary > stack is not mapped. I wonder how this is supposed to work. The temporary stack is part of .data, which is mapped.