[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] x86/wakeup: Stop using %fs for lidt/lgdt
commit c1740dc20ae5ea74d9dfc101cb9d2c2ed437f8a6 Author: David Woodhouse <dwmw@xxxxxxxxxxxx> AuthorDate: Sun Apr 28 17:13:37 2019 +0300 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Mon May 13 10:35:37 2019 +0100 x86/wakeup: Stop using %fs for lidt/lgdt The wakeup code is now relocated alongside the trampoline code, so as long as we move idt_48 and gdt_48 up a little bit so that they're visible in the real-mode segment that the wakeup code runs in, using %ds is just fine here. Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Tested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/boot/trampoline.S | 14 +++++++------- xen/arch/x86/boot/wakeup.S | 11 ++--------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/xen/arch/x86/boot/trampoline.S b/xen/arch/x86/boot/trampoline.S index 5588c7986a..125bdb5a58 100644 --- a/xen/arch/x86/boot/trampoline.S +++ b/xen/arch/x86/boot/trampoline.S @@ -52,13 +52,6 @@ GLOBAL(trampoline_realmode_entry) lmsw %ax # CR0.PE = 1 (enter protected mode) ljmpl $BOOT_CS32,$bootsym_rel(trampoline_protmode_entry,6) - .balign 8 - .word 0 -idt_48: .word 0, 0, 0 # base = limit = 0 - .word 0 -gdt_48: .word 6*8-1 - .long bootsym_rel(trampoline_gdt,4) - trampoline_gdt: /* 0x0000: unused */ .quad 0x0000000000000000 @@ -178,6 +171,13 @@ start64: #include "wakeup.S" + .balign 8 + .word 0 +idt_48: .word 0, 0, 0 # base = limit = 0 + .word 0 +gdt_48: .word 6*8-1 + .long bootsym_rel(trampoline_gdt,4) + /* 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, trampoline_start + PAGE_SIZE diff --git a/xen/arch/x86/boot/wakeup.S b/xen/arch/x86/boot/wakeup.S index f9632eef95..89df2617ae 100644 --- a/xen/arch/x86/boot/wakeup.S +++ b/xen/arch/x86/boot/wakeup.S @@ -40,11 +40,8 @@ ENTRY(wakeup_start) movw %ax, %fs movw $0x0e00 + 'L', %fs:(0x10) - # boot trampoline is under 1M, and shift its start into - # %fs to reference symbols in that area - mov wakesym(trampoline_seg), %fs - lidt %fs:bootsym(idt_48) - lgdt %fs:bootsym(gdt_48) + lidt wakesym(idt_48) + lgdt wakesym(gdt_48) movw $1, %ax lmsw %ax # Turn on CR0.PE @@ -102,10 +99,6 @@ GLOBAL(video_mode) .long 0 GLOBAL(video_flags) .long 0 -trampoline_seg: .word 0 - .pushsection .trampoline_seg, "a" - .long trampoline_seg - . - .popsection .code32 -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |