| * Copyright (C) 2003,2004 Eric Biederman (ebiederm@xmission.com) |
| * Copyright (C) 2014 Red Hat Inc. |
| * This code has been taken from kexec-tools. |
| * This source code is licensed under the GNU General Public License, |
| * Version 2. See the file COPYING for more details. |
| #include <asm/purgatory.h> |
| /* Load a gdt so I know what the segment registers are */ |
| /* load the data segments */ |
| movl $0x18, %eax /* data segment */ |
| leaq lstack_end(%rip), %rsp |
| gdt: /* 0x00 unusable segment |
| * so use them as the gdt ptr |
| /* 0x10 4GB flat code segment */ |
| .word 0xFFFF, 0x0000, 0x9A00, 0x00AF |
| /* 0x18 4GB flat data segment */ |
| .word 0xFFFF, 0x0000, 0x9200, 0x00CF |