From: Keir Fraser Date: Thu, 25 Oct 2007 08:43:42 +0000 (+0100) Subject: x86: GDTR must be reset after using real-mode BIOS services. Some X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14828^2~61 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9fec701806f4a61705e75fcee03d590f58562126;p=xen.git x86: GDTR must be reset after using real-mode BIOS services. Some BIOSes clobber GDTR. While we're here reset IDTR too, although it's not really necessary. Signed-off-by: John Byrne Sigend-off-by: Keir Fraser --- diff --git a/xen/arch/x86/boot/trampoline.S b/xen/arch/x86/boot/trampoline.S index 95a9d013de..6ffaa811ef 100644 --- a/xen/arch/x86/boot/trampoline.S +++ b/xen/arch/x86/boot/trampoline.S @@ -168,6 +168,10 @@ trampoline_boot_cpu_entry: /* Disable irqs before returning to protected mode. */ cli + /* Reset GDT and IDT. Some BIOSes clobber GDTR. */ + lidt bootsym(idt_48) + lgdt bootsym(gdt_48) + /* Enter protected mode, and flush insn queue. */ xor %ax,%ax inc %ax