x86: add preinit hook for bootloader upgrade