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 implicit assumption that DS

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] rombios: fix implicit assumption that DS == SS
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 08 Jul 2010 02:10:16 -0700
Delivery-date: Thu, 08 Jul 2010 02:10:44 -0700
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 1278431514 -3600
# Node ID b81c8fbf3e6e3af07b69adfd5aafbf74d1265542
# Parent  a1008ce01820849ac77804310b890c07c0fc36d5
rombios: fix implicit assumption that DS == SS
by passing boot device info by value, not by reference.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
---
 tools/firmware/rombios/rombios.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff -r a1008ce01820 -r b81c8fbf3e6e tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c  Tue Jul 06 16:49:59 2010 +0100
+++ b/tools/firmware/rombios/rombios.c  Tue Jul 06 16:51:54 2010 +0100
@@ -2195,21 +2195,19 @@ interactive_bootkey()
 //--------------------------------------------------------------------------
 
 void
-print_boot_device(e)
-  ipl_entry_t *e;
+print_boot_device(type, desc)
+  Bit16u type; Bit32u desc;
 {
-  Bit16u type;
   char description[33];
   Bit16u ss = get_SS();
-  type = e->type;
   /* NIC appears as type 0x80 */
   if (type == IPL_TYPE_BEV) type = 0x4;
   if (type == 0 || type > 0x4) BX_PANIC("Bad drive type\n");
   printf("Booting from %s", drivetypes[type]);
   /* print product string if BEV */
-  if (type == 4 && e->description != 0) {
+  if (type == 4 && desc != 0) {
     /* first 32 bytes are significant */
-    memcpyb(ss, &description, (Bit16u)(e->description >> 16), 
(Bit16u)(e->description & 0xffff), 32);
+    memcpyb(ss, &description, (Bit16u)(desc >> 16), (Bit16u)(desc & 0xffff), 
32);
     /* terminate string */
     description[32] = 0;
     printf(" [%S]", ss, description);
@@ -8284,7 +8282,7 @@ ASM_END
 
   /* Do the loading, and set up vector as a far pointer to the boot
    * address, and bootdrv as the boot drive */
-  print_boot_device(&e);
+  print_boot_device(e.type, e.description);
 
   switch(e.type) {
   case IPL_TYPE_FLOPPY: /* FDD */

_______________________________________________
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 implicit assumption that DS == SS, Xen patchbot-unstable <=