haiku/src/system
Michael Lotz ddb1ff5587 kernel/x86_64: Fix overwriting the GDT/IDT by each CPU.
The constructor calls for GlobalDescriptorTable and
InterruptDescriptorTable were run on each CPU, each time clearing out
any changes already done on other CPUs.

For the IDT this didn't matter as the result would always be the same.
In case of the GDT the result would surprisingly be mostly hidden. The
used GDT entries are for the double fault stacks (which is rarely hit),
the user TLS (which will only be used in compat mode) and the TSS which
is immediately cached in the task register.

The clearing of the GDT allowed for a tiny window of time between
setting up the entry for the TSS and it actually being loaded (and
cached) in the task register. When this happened, the load of the TR
caused a not present fault, which at this point leads to a tripple
fault and reset due to no fault handlers being installed yet.

Fixes #14659.

Change-Id: I6e5c00d412ab17c3ef05740ba71228e6ca266c1e
Reviewed-on: https://review.haiku-os.org/810
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-01-02 16:27:53 +00:00
..
boot EFI: Architecture-specific code depends on GNUEFI headers. 2018-12-02 17:06:54 -05:00
glue system/glue: Get your arm outta my risc! 2018-12-05 10:30:42 -06:00
kernel kernel/x86_64: Fix overwriting the GDT/IDT by each CPU. 2019-01-02 16:27:53 +00:00
ldscripts kernel: Binary code patches on x86. 2018-01-14 13:20:38 +01:00
libnetwork freebsd11_network -> freebsd_network. 2018-12-24 19:49:35 -05:00
libroot libroot: Fix GCC2 build. 2018-12-25 18:34:18 -05:00
runtime_loader runtime_loader: Export the correct reinit_after_fork. 2018-12-19 21:43:11 -05:00
Jamfile libnetwork: Move from src/kits to src/system. 2018-11-25 17:49:00 +00:00