Combuster wrote:
You're reading an userspace page, which usually is an indication that it's not ready for everybody to read (and I think you just found out why).
Truth is, you'll need an GDT before reloading segment registers, and you need an IDT (and GDT) before enabling interrupts. A write to a segment register causes the CPU to look it up in the current GDT. If that doesn't exist, or is broken, then the CPU tries to fix that problem by invoking an exception and ends up causing another segment load, which ends up in a reboot because it'd otherwise go around in circles.
Actually, Long Mode doesn't care about your SS selector; on an interrupt, it loads a zero into it (!). In fact, it's generally best to load a zero SS for consistency with the rest of the system