When rebooting (exiting) from the BTX loader, make sure to restore the
GDT from the correct segment, otherwise a triple fault would be caused. In some virtual environments (VMware, VirtualBox, etc) this could lead to a unhandled error or hang in the guest emulation software. Thanks to avg and jhb for a few hints in the right direction. Noticed by: Jeremy Chadwick <jdc@koitsu.org> (and many others) MFC after: 1 week
This commit is contained in:
parent
0d3ea3b043
commit
b2f606714a
@ -248,7 +248,7 @@ exit: cli # Disable interrupts
|
||||
/*
|
||||
* Restore the GDT in case we caught a kernel trap.
|
||||
*/
|
||||
lgdt gdtdesc # Set GDT
|
||||
lgdt %cs:gdtdesc # Set GDT
|
||||
/*
|
||||
* To 16 bits.
|
||||
*/
|
||||
|
@ -248,7 +248,7 @@ exit: cli # Disable interrupts
|
||||
/*
|
||||
* Restore the GDT in case we caught a kernel trap.
|
||||
*/
|
||||
lgdt gdtdesc # Set GDT
|
||||
lgdt %cs:gdtdesc # Set GDT
|
||||
/*
|
||||
* To 16 bits.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user