WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] AMD HVM: Fix enter-realmode stub to initi

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] AMD HVM: Fix enter-realmode stub to initialise 32-bit GPRs.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 14 Mar 2007 07:50:06 -0700
Delivery-date: Wed, 14 Mar 2007 07:49:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1173870553 0
# Node ID f233456b89d59e63498e6e2e5736d61d5683d0b3
# Parent  2955b067731093888e7f97e3da93b51dc8b5d255
AMD HVM: Fix enter-realmode stub to initialise 32-bit GPRs.

This fixes booting Ubuntu live ISO, which assumes the upper half of
%esp is zero on entry.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/firmware/hvmloader/hvmloader.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff -r 2955b0677310 -r f233456b89d5 tools/firmware/hvmloader/hvmloader.c
--- a/tools/firmware/hvmloader/hvmloader.c      Wed Mar 14 10:44:56 2007 +0000
+++ b/tools/firmware/hvmloader/hvmloader.c      Wed Mar 14 11:09:13 2007 +0000
@@ -62,15 +62,21 @@ asm(
     "    mov  %ax,%fs                \n"
     "    mov  %ax,%gs                \n"
     "    mov  %ax,%ss                \n"
+    /* Initialise all 32-bit GPRs to zero. */
+    "    xor  %eax,%eax              \n"
+    "    xor  %ebx,%ebx              \n"
+    "    xor  %ecx,%ecx              \n"
+    "    xor  %edx,%edx              \n"
+    "    xor  %esp,%esp              \n"
+    "    xor  %ebp,%ebp              \n"
+    "    xor  %esi,%esi              \n"
+    "    xor  %edi,%edi              \n"
+    /* Enter real mode, reload all segment registers and IDT. */
     "    ljmp $0x8,$0x0              \n"
-    /* Enter real mode, reload all segment registers and IDT. */
     "trampoline_start: .code16       \n"
-    "    mov  %cr0,%eax              \n"
-    "    and  $0xfe,%al              \n"
     "    mov  %eax,%cr0              \n"
     "    ljmp $0,$1f-trampoline_start\n"
-    "1:  xor  %ax,%ax                \n"
-    "    mov  %ax,%ds                \n"
+    "1:  mov  %ax,%ds                \n"
     "    mov  %ax,%es                \n"
     "    mov  %ax,%fs                \n"
     "    mov  %ax,%gs                \n"

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] AMD HVM: Fix enter-realmode stub to initialise 32-bit GPRs., Xen patchbot-unstable <=