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 int13h for floppy disk

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] rombios: fix int13h for floppy disk
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Thu, 30 Oct 2008 13:55:57 +0900
Delivery-date: Wed, 29 Oct 2008 21:56:34 -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
A floppy on HVM can't be read correctly.
This fix is taken from upstream bochs-2.3.7.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>

diff -r 85a2a54c70c8 tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c  Wed Oct 29 19:06:52 2008 +0000
+++ b/tools/firmware/rombios/rombios.c  Thu Oct 30 13:07:34 2008 +0900
@@ -7216,7 +7216,7 @@ BX_INFO("floppy: drive>1 || head>1 ...\n
         outb(0x03f5, head);
         outb(0x03f5, sector);
         outb(0x03f5, 2); // 512 byte sector size
-        outb(0x03f5, 0); // last sector number possible on track
+        outb(0x03f5, sector + num_sectors - 1); // last sector to read on track
         outb(0x03f5, 0); // Gap length
         outb(0x03f5, 0xff); // Gap length
 
@@ -7364,7 +7364,7 @@ BX_INFO("floppy: drive>1 || head>1 ...\n
         outb(0x03f5, head);
         outb(0x03f5, sector);
         outb(0x03f5, 2); // 512 byte sector size
-        outb(0x03f5, 0); // last sector number possible on track
+        outb(0x03f5, sector + num_sectors - 1); // last sector to write on 
track
         outb(0x03f5, 0); // Gap length
         outb(0x03f5, 0xff); // Gap length
 
_______________________________________________
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 int13h for floppy disk, Kouya Shimura <=