1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2003,2004 Eric Biederman (ebiederm@xmission.com)
4 * Copyright (C) 2014 Red Hat Inc.
6 * Author(s): Vivek Goyal <vgoyal@redhat.com>
8 * This code has been taken from kexec-tools.
14 .globl entry64, entry64_regs
18 /* Setup a gdt that should be preserved */
21 /* load the data segments */
22 movl $0x18, %eax /* data segment */
30 leaq stack_init(%rip), %rsp
32 leaq new_cs_exit(%rip), %rax
37 /* Load the registers */
55 /* Jump to the new code... */
78 .size entry64_regs, . - entry64_regs
84 /* 0x00 unusable segment
86 * so use them as gdt ptr
88 .word gdt_end - gdt - 1
92 /* 0x10 4GB flat code segment */
93 .word 0xFFFF, 0x0000, 0x9A00, 0x00AF
95 /* 0x18 4GB flat data segment */
96 .word 0xFFFF, 0x0000, 0x9200, 0x00CF