From 0aa49ebc5e3f9061f5e9d2d94ec29a994f663493 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 31 Mar 2008 16:32:33 +0100 Subject: [PATCH] x86_64: Initialise upper half of 32-bit parameter registers when making Target Mode BIOS call. Fixes boot problems with some buggy BIOSes. Signed-off-by: Keir Fraser --- xen/arch/x86/boot/trampoline.S | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/boot/trampoline.S b/xen/arch/x86/boot/trampoline.S index 143612c91f..af4de553a8 100644 --- a/xen/arch/x86/boot/trampoline.S +++ b/xen/arch/x86/boot/trampoline.S @@ -156,9 +156,12 @@ trampoline_boot_cpu_entry: sti #if defined(__x86_64__) - /* Declare that our target operating mode is long mode. */ - movw $0xec00,%ax # declare target operating mode - movw $0x0002,%bx # long mode + /* + * Declare that our target operating mode is long mode. + * Initialise 32-bit registers since some buggy BIOSes depend on it. + */ + movl $0xec00,%eax # declare target operating mode + movl $0x0002,%ebx # long mode int $0x15 #endif -- 2.39.5