2 * (C) Copyright 2015 Google, Inc
3 * Written by Simon Glass <sjg@chromium.org>
5 * SPDX-License-Identifier: GPL-2.0+
8 #include <asm/global_data.h>
9 #include <asm/msr-index.h>
10 #include <asm/processor-flags.h>
13 * rdi - 32-bit code segment selector
14 * rsi - target address
15 * rdx - table address (0 if none)
22 /* Save table pointer */
26 * Debugging option, this outputs characters to the console UART
33 push %rdi /* 32-bit code segment */
34 lea compat(%rip), %rax
36 .byte 0x48 /* REX prefix to force 64-bit far return */
41 * We are now in compatibility mode with a default operand size of
42 * 32 bits. First disable paging.
45 andl $~X86_CR0_PG, %eax
52 /* Disable Long mode in EFER (Extended Feature Enable Register) */
58 /* Set up table pointer for _x86boot_start */
61 /* Jump to the required target */
62 pushl %edi /* 32-bit code segment */
63 pushl %esi /* 32-bit target address */