/* Prepare the machine for transition to protected mode. Invoke the realmode switch hook if present; otherwise disable all interrupts.  */
static void realmode_switch_hook(void)
/* Prepare the machine for transition to protected mode. Invoke the realmode switch hook if present; otherwise disable all interrupts.  */
static void realmode_switch_hook(void)
{
	if (boot_params.hdr.realmode_swtch) {
		asm volatile("lcallw *%0"
			     : : "m" (boot_params.hdr.realmode_swtch)
			     : "eax", "ebx", "ecx", "edx");
	} else {
		asm volatile("cli");
		outb(0x80, 0x70);
		io_delay();
	}
}