trampoline code on x64, some other stuff, TODO: refactor hal_idt.cpp