Bare metal: do not use push/pop in long mode until stack set up

This patch fixes a random problem with text segment corruption
that would crop up occasionally.
This commit is contained in:
tkchia 2022-09-11 22:49:04 +00:00
parent b5cb71ab84
commit 1c6aea2b05

View file

@ -1425,8 +1425,8 @@ golong: cli
// Long mode is long.
.code64
long: push $GDT_LONG_DATA
pop %rax
long: xor %eax,%eax
mov $GDT_LONG_DATA,%al
mov %eax,%ds
mov %eax,%ss
mov %eax,%es