]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
x86/boot: Reposition trampoline data
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 19 Aug 2019 13:16:53 +0000 (14:16 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 22 Aug 2019 10:55:56 +0000 (11:55 +0100)
... to separate code from data.

Reformat the comments for trampoline_gdt to reduce their volume.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wl@xen.org>
CC: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/boot/trampoline.S

index 76354afd9fbfcb22a96ccc734b519a07fe983ad5..729a373573a21377e871d8b8fd47b8f50c48a9ee 100644 (file)
@@ -107,49 +107,6 @@ GLOBAL(trampoline_realmode_entry)
         lmsw    %ax                       # CR0.PE = 1 (enter protected mode)
         ljmpl   $BOOT_CS32,$tramp32sym_rel(trampoline_protmode_entry,6)
 
-GLOBAL(trampoline_cpu_started)
-        .byte   0
-
-trampoline_gdt:
-        /* 0x0000: unused */
-        .quad   0x0000000000000000
-        /* 0x0008: ring 0 code, 32-bit mode */
-        .quad   0x00cf9b000000ffff
-        /* 0x0010: ring 0 code, 64-bit mode */
-        .quad   0x00af9b000000ffff
-        /* 0x0018: ring 0 data */
-        .quad   0x00cf93000000ffff
-        /* 0x0020: real-mode code @ BOOT_TRAMPOLINE */
-        .long   0x0000ffff
-        .long   0x00009b00
-        /* 0x0028: real-mode data @ BOOT_TRAMPOLINE */
-        .long   0x0000ffff
-        .long   0x00009300
-        /*
-         * 0x0030: ring 0 Xen data, 16 MiB size, base
-         * address is computed at runtime.
-         */
-        .quad   0x00c0930000000fff
-.Ltrampoline_gdt_end:
-        /*
-         * BOOT_PSEUDORM_CS and BOOT_PSEUDORM_DS are usable only at boot time,
-         * and their base addresses must reference the low location to which
-         * the boot-time code was loaded. Hence bootsym.
-         */
-        .pushsection .bootsym_rel, "a"
-        .long   trampoline_gdt + BOOT_PSEUDORM_CS + 2 - .
-        .long   trampoline_gdt + BOOT_PSEUDORM_DS + 2 - .
-        .popsection
-
-GLOBAL(trampoline_misc_enable_off)
-        .quad   0
-
-GLOBAL(cpuid_ext_features)
-        .long   0
-
-GLOBAL(trampoline_xen_phys_start)
-        .long   0
-
         .code32
 trampoline_protmode_entry:
         /* Set up a few descriptors: on entry only CS is guaranteed good. */
@@ -238,6 +195,37 @@ idt_48: .word   0, 0, 0 # base = limit = 0
 gdt_48: .word   .Ltrampoline_gdt_end - trampoline_gdt - 1
         .long   tramp32sym_rel(trampoline_gdt,4)
 
+trampoline_gdt:
+        .quad   0x0000000000000000 /* 0x0000: unused */
+        .quad   0x00cf9b000000ffff /* 0x0008: ring 0 code, 32-bit mode */
+        .quad   0x00af9b000000ffff /* 0x0010: ring 0 code, 64-bit mode */
+        .quad   0x00cf93000000ffff /* 0x0018: ring 0 data */
+        .quad   0x00009b000000ffff /* 0x0020: real-mode code @ BOOT_TRAMPOLINE */
+        .quad   0x000093000000ffff /* 0x0028: real-mode data @ BOOT_TRAMPOLINE */
+        .quad   0x00c0930000000fff /* 0x0030: ring 0 Xen data, 16M @ XEN */
+.Ltrampoline_gdt_end:
+        /*
+         * BOOT_PSEUDORM_CS and BOOT_PSEUDORM_DS are usable only at boot time,
+         * and their base addresses must reference the low location to which
+         * the boot-time code was loaded. Hence bootsym.
+         */
+        .pushsection .bootsym_rel, "a"
+        .long   trampoline_gdt + BOOT_PSEUDORM_CS + 2 - .
+        .long   trampoline_gdt + BOOT_PSEUDORM_DS + 2 - .
+        .popsection
+
+GLOBAL(trampoline_misc_enable_off)
+        .quad   0
+
+GLOBAL(cpuid_ext_features)
+        .long   0
+
+GLOBAL(trampoline_xen_phys_start)
+        .long   0
+
+GLOBAL(trampoline_cpu_started)
+        .byte   0
+
 /* The first page of trampoline is permanent, the rest boot-time only. */
 /* Reuse the boot trampoline on the 1st trampoline page as stack for wakeup. */
         .equ    wakeup_stack, perm_trampoline_start + PAGE_SIZE