All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arun Sharma <arun.sharma@intel.com>
To: Ian Pratt <Ian.Pratt@cl.cam.ac.uk>,
	Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: [PATCH][1/9] Xen full virtualization does not handle unaligned IO with page crossing.
Date: Mon, 25 Jul 2005 14:00:39 -0700	[thread overview]
Message-ID: <20050725210038.GA24273@intel.com> (raw)

Xen full virtualization does not handle unaligned IO with page crossing.
Disable 32-bit PIO as a workaround.

Signed-off-by: Asit Mallick <asit.k.mallick@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>

diff -r c9f0c3619b96 -r ae5dbce3f530 tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c	Tue Jul 12 23:37:57 2005
+++ b/tools/firmware/rombios/rombios.c	Wed Jul 13 19:12:38 2005
@@ -28,6 +28,11 @@
 
 #define VMXASSIST
 #undef VMXTEST
+
+// Xen full virtualization does not handle unaligned IO with page crossing.
+// Disable 32-bit PIO as a workaround.
+#define NO_PIO32
+
 
 // ROM BIOS compatability entry points:
 // ===================================
@@ -2248,6 +2253,9 @@
       Bit16u cylinders, heads, spt, blksize;
       Bit8u  translation, removable, mode;
 
+      // default mode to PIO16
+      mode = ATA_MODE_PIO16;
+
       //Temporary values to do the transfer
       write_byte(ebda_seg,&EbdaData->ata.devices[device].device,ATA_DEVICE_HD);
       write_byte(ebda_seg,&EbdaData->ata.devices[device].mode, ATA_MODE_PIO16);
@@ -2256,7 +2264,10 @@
         BX_PANIC("ata-detect: Failed to detect ATA device\n");
 
       removable = (read_byte(get_SS(),buffer+0) & 0x80) ? 1 : 0;
+#ifndef	NO_PIO32
       mode      = read_byte(get_SS(),buffer+96) ? ATA_MODE_PIO32 : ATA_MODE_PIO16;
+#endif
+
       blksize   = read_word(get_SS(),buffer+10);
       
       cylinders = read_word(get_SS(),buffer+(1*2)); // word 1
@@ -2346,6 +2357,9 @@
       Bit8u  type, removable, mode;
       Bit16u blksize;
 
+      // default mode to PIO16
+      mode = ATA_MODE_PIO16;
+
       //Temporary values to do the transfer
       write_byte(ebda_seg,&EbdaData->ata.devices[device].device,ATA_DEVICE_CDROM);
       write_byte(ebda_seg,&EbdaData->ata.devices[device].mode, ATA_MODE_PIO16);
@@ -2355,7 +2369,9 @@
 
       type      = read_byte(get_SS(),buffer+1) & 0x1f;
       removable = (read_byte(get_SS(),buffer+0) & 0x80) ? 1 : 0;
+#ifndef	NO_PIO32
       mode      = read_byte(get_SS(),buffer+96) ? ATA_MODE_PIO32 : ATA_MODE_PIO16;
+#endif
       blksize   = 2048;
 
       write_byte(ebda_seg,&EbdaData->ata.devices[device].device, type);

                 reply	other threads:[~2005-07-25 21:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050725210038.GA24273@intel.com \
    --to=arun.sharma@intel.com \
    --cc=Ian.Pratt@cl.cam.ac.uk \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.