Try this in kernel mode:
uint64_t null_idtr = 0; asm("xor %%eax, %%eax; lidt %0; int3" :: "m" (null_idtr));
This can be quite helpful when doing operating system development on an i386/x86_64 system. You can use this for the regular restart case or when a kernel panic is supposed to restart immediately and you cannot make any assumptions on what is still working in the system.
You can also use this for debugging very low-level code if you don’t have a serial port or even an LED to report the most basic information: First make sure your code is reached by putting the reset code there. Then remove it again and put this code in:
if (condition) reset(); else for(;;);
The system will either hang or reset, depending on the condition.