From: James Mckenzie Date: Wed, 9 Sep 2009 16:30:32 +0000 (+0100) Subject: And then remap the cds so that vista's look for the first algorythm works X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d6a7b96fec5f178b2f53df68b734767db65e7c8a;p=xenclient%2Fxen-pq.git And then remap the cds so that vista's look for the first algorythm works --- diff --git a/master/boot-second-cd b/master/boot-second-cd index 1c5676d..cfd0ccb 100644 --- a/master/boot-second-cd +++ b/master/boot-second-cd @@ -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) 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 */