]> xenbits.xen.org Git - xenclient/xen-pq.git/commitdiff
And then remap the cds so that vista's look for the first algorythm works
authorJames Mckenzie <jamesmck@taoand.(none)>
Wed, 9 Sep 2009 16:30:32 +0000 (17:30 +0100)
committerJames Mckenzie <jamesmck@taoand.(none)>
Wed, 9 Sep 2009 16:30:32 +0000 (17:30 +0100)
master/boot-second-cd

index 1c5676d2f8c2349f44e9a72e531ec377d75989a6..cfd0ccb09ffb57ecd30690747f50f1381d0bc10c 100644 (file)
@@ -1,8 +1,16 @@
 diff --git a/tools/firmware/rombios/rombios.c b/tools/firmware/rombios/rombios.c
-index bb1c8e7..b2a5627 100644
+index bb1c8e7..8157e33 100644
 --- a/tools/firmware/rombios/rombios.c
 +++ b/tools/firmware/rombios/rombios.c
-@@ -3702,8 +3702,9 @@ static char eltorito[24]="EL TORITO SPECIFICATION";
+@@ -755,6 +755,7 @@ typedef struct {
+ #if BX_ELTORITO_BOOT
+     // El Torito Emulation data
+     cdemu_t cdemu;
++    Bit8u  boot_cdrom_device;
+ #endif // BX_ELTORITO_BOOT
+     } ebda_data_t;
+@@ -3702,8 +3703,9 @@ static char eltorito[24]="EL TORITO SPECIFICATION";
  //
  // Returns ah: emulated drive, al: error code
  //
@@ -14,7 +22,7 @@ index bb1c8e7..b2a5627 100644
  {
    Bit16u ebda_seg=read_word(0x0040,0x000E);
    Bit8u  atacmd[12], buffer[2048];
-@@ -3713,7 +3714,8 @@ cdrom_boot()
+@@ -3713,12 +3715,15 @@ cdrom_boot()
  
    // Find out the first cdrom
    for (device=0; device<BX_MAX_ATA_DEVICES;device++) {
@@ -24,7 +32,27 @@ index bb1c8e7..b2a5627 100644
      }
  
    // if not found
-@@ -8330,7 +8332,9 @@ ASM_END
+   if(device >= BX_MAX_ATA_DEVICES) return 2;
++  write_byte(ebda_seg,&EbdaData->boot_cdrom_device,device);
++
+   if(error = atapi_is_ready(device) != 0)
+     BX_INFO("ata_is_ready returned %d\n",error);
+@@ -5861,7 +5866,11 @@ int13_cdrom(EHBX, DS, ES, DI, SI, BP, ELDX, BX, DX, CX, AX, IP, CS, FLAGS)
+     }
+   // Get the ata channel
+-  device=read_byte(ebda_seg,&EbdaData->ata.cdidmap[GET_ELDL()-0xE0]);
++  if (GET_ELDL() == 0xE0) {
++        device=read_byte(ebda_seg,&EbdaData->boot_cdrom_device);
++  } else {
++        device=read_byte(ebda_seg,&EbdaData->ata.cdidmap[GET_ELDL()-0xE0]);
++  }
+   /* basic check : device has to be valid  */
+   if (device >= BX_MAX_ATA_DEVICES) {
+@@ -8330,7 +8339,9 @@ ASM_END
  
  #if BX_ELTORITO_BOOT
    case IPL_TYPE_CDROM: /* CD-ROM */