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-devel

[Xen-devel] [PATCH] rombios: fix implicit assumption that DS == SS

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] rombios: fix implicit assumption that DS == SS
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Tue, 6 Jul 2010 16:31:42 +0100
Delivery-date: Tue, 06 Jul 2010 08:32:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
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>

diff -r 4976d7b90998 tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c  Tue Jul 06 16:25:42 2010 +0100
+++ b/tools/firmware/rombios/rombios.c  Tue Jul 06 16:25:56 2010 +0100
@@ -2195,21 +2195,19 @@
 //--------------------------------------------------------------------------
 
 void
-print_boot_device(e)
-  ipl_entry_t *e;
-{
-  Bit16u type;
+print_boot_device(type, desc)
+  Bit16u type; Bit32u desc;
+{
   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 @@
 
   /* 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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] rombios: fix implicit assumption that DS == SS, Tim Deegan <=