hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/x86/purgatory/setup-x86_64.S
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * purgatory: setup code
34 *
....@@ -5,18 +6,15 @@
56 * Copyright (C) 2014 Red Hat Inc.
67 *
78 * This code has been taken from kexec-tools.
8
- *
9
- * This source code is licensed under the GNU General Public License,
10
- * Version 2. See the file COPYING for more details.
119 */
10
+#include <linux/linkage.h>
1211 #include <asm/purgatory.h>
1312
1413 .text
15
- .globl purgatory_start
1614 .balign 16
17
-purgatory_start:
1815 .code64
1916
17
+SYM_CODE_START(purgatory_start)
2018 /* Load a gdt so I know what the segment registers are */
2119 lgdt gdt(%rip)
2220
....@@ -34,10 +32,12 @@
3432 /* Call the C code */
3533 call purgatory
3634 jmp entry64
35
+SYM_CODE_END(purgatory_start)
3736
3837 .section ".rodata"
3938 .balign 16
40
-gdt: /* 0x00 unusable segment
39
+SYM_DATA_START_LOCAL(gdt)
40
+ /* 0x00 unusable segment
4141 * 0x08 unused
4242 * so use them as the gdt ptr
4343 */
....@@ -50,10 +50,10 @@
5050
5151 /* 0x18 4GB flat data segment */
5252 .word 0xFFFF, 0x0000, 0x9200, 0x00CF
53
-gdt_end:
53
+SYM_DATA_END_LABEL(gdt, SYM_L_LOCAL, gdt_end)
5454
5555 .bss
5656 .balign 4096
57
-lstack:
57
+SYM_DATA_START_LOCAL(lstack)
5858 .skip 4096
59
-lstack_end:
59
+SYM_DATA_END_LABEL(lstack, SYM_L_LOCAL, lstack_end)