ia64/xen-unstable

changeset 5850:3acc0ae6a001

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>
author kaf24@firebug.cl.cam.ac.uk
date Mon Jul 25 21:01:42 2005 +0000 (2005-07-25)
parents 5f77050a58f6
children edc6e8921dd1
files tools/firmware/rombios/rombios.c
line diff
     1.1 --- a/tools/firmware/rombios/rombios.c	Mon Jul 25 21:00:30 2005 +0000
     1.2 +++ b/tools/firmware/rombios/rombios.c	Mon Jul 25 21:01:42 2005 +0000
     1.3 @@ -29,6 +29,11 @@
     1.4  #define VMXASSIST
     1.5  #undef VMXTEST
     1.6  
     1.7 +// Xen full virtualization does not handle unaligned IO with page crossing.
     1.8 +// Disable 32-bit PIO as a workaround.
     1.9 +#define NO_PIO32
    1.10 +
    1.11 +
    1.12  // ROM BIOS compatability entry points:
    1.13  // ===================================
    1.14  // $e05b ; POST Entry Point
    1.15 @@ -2248,6 +2253,9 @@ void ata_detect( )
    1.16        Bit16u cylinders, heads, spt, blksize;
    1.17        Bit8u  translation, removable, mode;
    1.18  
    1.19 +      // default mode to PIO16
    1.20 +      mode = ATA_MODE_PIO16;
    1.21 +
    1.22        //Temporary values to do the transfer
    1.23        write_byte(ebda_seg,&EbdaData->ata.devices[device].device,ATA_DEVICE_HD);
    1.24        write_byte(ebda_seg,&EbdaData->ata.devices[device].mode, ATA_MODE_PIO16);
    1.25 @@ -2256,7 +2264,10 @@ void ata_detect( )
    1.26          BX_PANIC("ata-detect: Failed to detect ATA device\n");
    1.27  
    1.28        removable = (read_byte(get_SS(),buffer+0) & 0x80) ? 1 : 0;
    1.29 +#ifndef	NO_PIO32
    1.30        mode      = read_byte(get_SS(),buffer+96) ? ATA_MODE_PIO32 : ATA_MODE_PIO16;
    1.31 +#endif
    1.32 +
    1.33        blksize   = read_word(get_SS(),buffer+10);
    1.34        
    1.35        cylinders = read_word(get_SS(),buffer+(1*2)); // word 1
    1.36 @@ -2346,6 +2357,9 @@ void ata_detect( )
    1.37        Bit8u  type, removable, mode;
    1.38        Bit16u blksize;
    1.39  
    1.40 +      // default mode to PIO16
    1.41 +      mode = ATA_MODE_PIO16;
    1.42 +
    1.43        //Temporary values to do the transfer
    1.44        write_byte(ebda_seg,&EbdaData->ata.devices[device].device,ATA_DEVICE_CDROM);
    1.45        write_byte(ebda_seg,&EbdaData->ata.devices[device].mode, ATA_MODE_PIO16);
    1.46 @@ -2355,7 +2369,9 @@ void ata_detect( )
    1.47  
    1.48        type      = read_byte(get_SS(),buffer+1) & 0x1f;
    1.49        removable = (read_byte(get_SS(),buffer+0) & 0x80) ? 1 : 0;
    1.50 +#ifndef	NO_PIO32
    1.51        mode      = read_byte(get_SS(),buffer+96) ? ATA_MODE_PIO32 : ATA_MODE_PIO16;
    1.52 +#endif
    1.53        blksize   = 2048;
    1.54  
    1.55        write_byte(ebda_seg,&EbdaData->ata.devices[device].device, type);