hw_x86_64: Set segment registers prior to mode transition

The registers for the ds, es, fs and gs segments are hardcoded to GDT
index 4 with requested privilege level set to 3.
This commit is contained in:
Adrian-Ken Rueegsegger 2015-02-18 00:30:14 +01:00 committed by Christian Helmuth
parent fe22858550
commit 60e799f7b4
1 changed files with 7 additions and 0 deletions

View File

@ -90,6 +90,13 @@
pushq $0x1b
pushq (%rax)
/* Restore segment registers */
mov $0x23, %rbx
mov %rbx, %ds
mov %rbx, %es
mov %rbx, %fs
mov %rbx, %gs
1: jmp 1b
/* end of the mode transition code */