You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PVH starts in 32-bit mode, so we have to transition to 64-bit mode
before we can start running Rust code. As we have not yet initialized
the stack, we can only use registers and static memory.
This transition does the following:
- Sets up page tables to identity map 2 MiB
- Loads page tables into CR3
- Sets CR4.PAE, EFER.LME, and CRO.PG
- Sets up a 64-bit GDT
- Long Jumps to 64-bit code
We put the GDT in the .rodata section, and we put the 32-bit code in its
own section. This makes it easier to debug and dissassemble the binary.
Signed-off-by: Joe Richey <[email protected]>
0 commit comments