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] rombios: fix int15/86h (wait for microsec

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] rombios: fix int15/86h (wait for microseconds)
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 12 Feb 2009 05:55:13 -0800
Delivery-date: Thu, 12 Feb 2009 05:54:53 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1234435925 0
# Node ID a624353a668d72d3c3397ae19c3437d5173101f9
# Parent  9e3be0660c1e7214cbb83700285b8ef33a9916c9
rombios: fix int15/86h (wait for microseconds)

The bcc compiler generates wrong stack pointer offset of a local
variable within ASM code if another local variable is declared
later.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
---
 tools/firmware/rombios/rombios.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff -r 9e3be0660c1e -r a624353a668d tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c  Thu Feb 12 10:48:55 2009 +0000
+++ b/tools/firmware/rombios/rombios.c  Thu Feb 12 10:52:05 2009 +0000
@@ -4609,6 +4609,10 @@ int15_function32(regs, ES, DS, FLAGS)
 {
   Bit32u  extended_memory_size=0; // 64bits long
   Bit16u  CX,DX;
+#ifdef HVMASSIST
+  Bit16u off, e820_table_size;
+  Bit32u base, type, size;
+#endif
 
 BX_DEBUG_INT15("int15 AX=%04x\n",regs.u.r16.ax);
 
@@ -4625,8 +4629,10 @@ ASM_START
 
       ;; Get the count in eax
       mov  bx, sp
+SEG SS
       mov  ax, _int15_function32.CX [bx]
       shl  eax, #16
+SEG SS
       mov  ax, _int15_function32.DX [bx]
 
       ;; convert to numbers of 15usec ticks
@@ -4660,8 +4666,7 @@ ASM_END
         {
 #ifdef HVMASSIST
        case 0x20: {
-            Bit16u e820_table_size =
-                read_word(E820_SEG, E820_NR_OFFSET) * 0x14;
+            e820_table_size = read_word(E820_SEG, E820_NR_OFFSET) * 0x14;
 
             if (regs.u.r32.edx != 0x534D4150) /* SMAP */
                 goto int15_unimplemented;
@@ -4674,8 +4679,6 @@ ASM_END
                 if ((regs.u.r32.ebx + 0x14 - 1) > e820_table_size)
                     regs.u.r32.ebx = 0;
             } else if (regs.u.r16.bx == 1) {
-                Bit32u base, type;
-                Bit16u off;
                 for (off = 0; off < e820_table_size; off += 0x14) {
                     base = read_dword(E820_SEG, E820_OFFSET + off);
                     type = read_dword(E820_SEG, E820_OFFSET + 0x10 + off);
@@ -4699,9 +4702,7 @@ ASM_END
         }
 
         case 0x01: {
-            Bit16u off, e820_table_size =
-                read_word(E820_SEG, E820_NR_OFFSET) * 0x14;
-            Bit32u base, type, size;
+            e820_table_size = read_word(E820_SEG, E820_NR_OFFSET) * 0x14;
 
             // do we have any reason to fail here ?
             CLEAR_CF();

_______________________________________________
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] rombios: fix int15/86h (wait for microseconds), Xen patchbot-unstable <=