Commit a368741bf2508b7ca29d9ade73ec1b0f29ae2286

Authored by bellard
1 parent 61271e5c

suppressed ppc ide hack - fixed read toc for Darwin/PPC


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1509 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 10 additions and 9 deletions
hw/ide.c
... ... @@ -1118,10 +1118,16 @@ static int cdrom_read_toc_raw(IDEState *s, uint8_t *buf, int msf,
1118 1118 *q++ = 0; /* min */
1119 1119 *q++ = 0; /* sec */
1120 1120 *q++ = 0; /* frame */
1121   - *q++ = 0;
1122   - *q++ = 0;
1123   - *q++ = 0;
1124   - *q++ = 0;
  1121 + if (msf) {
  1122 + *q++ = 0;
  1123 + lba_to_msf(q, 0);
  1124 + q += 3;
  1125 + } else {
  1126 + *q++ = 0;
  1127 + *q++ = 0;
  1128 + *q++ = 0;
  1129 + *q++ = 0;
  1130 + }
1125 1131  
1126 1132 len = q - buf;
1127 1133 cpu_to_ube16(buf, len - 2);
... ... @@ -1488,11 +1494,6 @@ static void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val)
1488 1494 unit = (val >> 4) & 1;
1489 1495 s = ide_if + unit;
1490 1496 ide_if->cur_drive = s;
1491   -#ifdef TARGET_PPC
1492   - /* XXX: currently a workaround for Darwin/PPC. Need to check
1493   - the IDE spec to see if it is correct */
1494   - ide_set_signature(s);
1495   -#endif
1496 1497 break;
1497 1498 default:
1498 1499 case 7:
... ...