- Timestamp:
- May 31, 2021 9:43:28 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/eltorito.c
r89367 r89384 182 182 // the only important data is this one for now 183 183 cdemu->active = 0x00; 184 cdemu->ptr_unaligned = cdemu_bounce_buf_alloc() :> 0;185 184 } 186 185 … … 295 294 } 296 295 297 static uint16_t atapi_read(uint8_t device, uint32_t lba, uint16_t nbsectors, void __far *buf)296 static uint16_t cdrom_read(uint8_t device, uint32_t lba, uint16_t nbsectors, void __far *buf) 298 297 { 299 298 uint16_t ebda_seg=read_word(0x0040,0x000E); … … 332 331 uint16_t xfer_sect = MIN(nbsectors, 4 - before); 333 332 334 error = atapi_read(device, ilba + slba, 1, cdemu->ptr_unaligned);333 error = cdrom_read(device, ilba + slba, 1, cdemu->ptr_unaligned); 335 334 if (error != 0) 336 335 return error; … … 347 346 uint16_t xfer_sect = nbsectors / 4; 348 347 349 error = atapi_read(device, ilba + slba, xfer_sect, dst);348 error = cdrom_read(device, ilba + slba, xfer_sect, dst); 350 349 if (error != 0) 351 350 return error; … … 358 357 if (nbsectors) 359 358 { 360 error = atapi_read(device, ilba + slba, 1, cdemu->ptr_unaligned);359 error = cdrom_read(device, ilba + slba, 1, cdemu->ptr_unaligned); 361 360 if (error != 0) 362 361 return error; … … 404 403 for (read_try = 0; read_try <= 4; ++read_try) 405 404 { 406 error = atapi_read(device, 0x11, 1, &buffer);405 error = cdrom_read(device, 0x11, 1, &buffer); 407 406 if (!error) 408 407 break; … … 428 427 429 428 /* Now we read the Boot Catalog. */ 430 error = atapi_read(device, lba, 1, buffer);429 error = cdrom_read(device, lba, 1, buffer); 431 430 if (error != 0) 432 431 return 7; … … 488 487 if (error != 0) 489 488 return 13; 489 490 cdemu->ptr_unaligned = cdemu_bounce_buf_alloc() :> 0; 491 if (cdemu->ptr_unaligned == NULL) 492 return 14; 490 493 491 494 BX_DEBUG_ELTORITO("Emulate drive %02x, type %02x, LBA %lu\n", … … 893 896 __func__, count, lba, segment, offset); 894 897 895 status = atapi_read(device, lba, count, MK_FP(segment,offset));898 status = cdrom_read(device, lba, count, MK_FP(segment,offset)); 896 899 count = (uint16_t)(bios_dsk->drqp.trsfbytes >> 11); 897 900 i13x->count = count;
Note:
See TracChangeset
for help on using the changeset viewer.