both Context64 and TrapFrame define architecture specific registers and
combine into the full execution context of a thread.
Context64 includes the callee saved registers plus FP state, and
TrapFrame includes caller saved registers.
the x86 gdt struct is so obscure and it’s not worth the lines of code to
write proper high level representaion. Also since it only needs to be
written to once or twice, I’ll live with the hard coded stuffs in this mod.
You need to suffer all this pain exists because intel/amd doens’t want to
ditch segmentation due to backward compatibility. THIS REALLY SUCKS.